# eCos makefile

# This is a generated file - do not edit

export REPOSITORY := /home/jim/wasabi/xscale/intel-xscale-20030923-branch/ecos/packages
export PREFIX := /home/jim/wasabi/xscale/intel-xscale-20030923-branch/ecos/build/iq80310/rom/install
export COMMAND_PREFIX := xscale-elf-
export CC := $(COMMAND_PREFIX)gcc
export OBJCOPY := $(COMMAND_PREFIX)objcopy
export HOST := UNIX
export AR := $(COMMAND_PREFIX)ar

PACKAGE := devs/flash/arm/iq80310/current
OBJECT_PREFIX := devs_flash_arm_iq80310
CFLAGS := -mcpu=xscale -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority -mapcs-frame
LDFLAGS := -mcpu=xscale -Wl,--gc-sections -Wl,-static -g -O2 -nostdlib
VPATH := $(REPOSITORY)/$(PACKAGE)
INCLUDE_PATH := $(INCLUDE_PATH) -I$(PREFIX)/include $(foreach dir,$(VPATH),-I$(dir) -I$(dir)/src -I$(dir)/tests) -I.
MLT := $(wildcard $(REPOSITORY)/$(PACKAGE)/include/pkgconf/mlt*.ldi $(REPOSITORY)/$(PACKAGE)/include/pkgconf/mlt*.h)
TESTS := 

build: headers libtarget.a.stamp

LIBRARY := libtarget.a
COMPILE := src/iq80310_flash.c
OBJECTS := $(COMPILE:.cxx=.o.d)
OBJECTS := $(OBJECTS:.c=.o.d)
OBJECTS := $(OBJECTS:.S=.o.d)

$(LIBRARY).stamp: $(OBJECTS)
	$(AR) rcs $(PREFIX)/lib/$(@:.stamp=) $(foreach obj,$?,$(dir $(obj))$(OBJECT_PREFIX)_$(notdir $(obj:.o.d=.o)))
	@cat $^ > $(@:.stamp=.deps)
	@touch $@

flash_erase_block.o: $(wildcard $(REPOSITORY)/$(PACKAGE)/src/flash_erase_block.c)
	$(CC) -S $(INCLUDE_PATH) $(CFLAGS) -g0 -fno-function-sections $(REPOSITORY)/$(PACKAGE)/src/flash_erase_block.c
	echo " .globl flash_erase_block_end" >>flash_erase_block.s
	echo "flash_erase_block_end:" >>flash_erase_block.s
	$(CC) $(CFLAGS) -c -o flash_erase_block.o flash_erase_block.s
	$(AR) rcs $(PREFIX)/lib/libtarget.a flash_erase_block.o
	

flash_program_buf.o: $(wildcard $(REPOSITORY)/$(PACKAGE)/src/flash_program_buf.c)
	$(CC) -S $(INCLUDE_PATH) $(CFLAGS) -g0 -fno-function-sections $(REPOSITORY)/$(PACKAGE)/src/flash_program_buf.c
	echo " .globl flash_program_buf_end" >>flash_program_buf.s
	echo "flash_program_buf_end:" >>flash_program_buf.s
	$(CC) $(CFLAGS) -c -o flash_program_buf.o flash_program_buf.s
	$(AR) rcs $(PREFIX)/lib/libtarget.a flash_program_buf.o
	

flash_query.o: $(wildcard $(REPOSITORY)/$(PACKAGE)/src/flash_query.c)
	$(CC) -S $(INCLUDE_PATH) $(CFLAGS) -g0 -fno-function-sections $(REPOSITORY)/$(PACKAGE)/src/flash_query.c
	echo " .globl flash_query_end" >>flash_query.s
	echo "flash_query_end:" >>flash_query.s
	$(CC) $(CFLAGS) -c -o flash_query.o flash_query.s
	$(AR) rcs $(PREFIX)/lib/libtarget.a flash_query.o
	

flash_lock_block.o: $(wildcard $(REPOSITORY)/$(PACKAGE)/src/flash_lock_block.c)
	$(CC) -S $(INCLUDE_PATH) $(CFLAGS) -g0 -fno-function-sections $(REPOSITORY)/$(PACKAGE)/src/flash_lock_block.c
	echo " .globl flash_lock_block_end" >>flash_lock_block.s
	echo "flash_lock_block_end:" >>flash_lock_block.s
	$(CC) $(CFLAGS) -c -o flash_lock_block.o flash_lock_block.s
	$(AR) rcs $(PREFIX)/lib/libtarget.a flash_lock_block.o
	

flash_unlock_block.o: $(wildcard $(REPOSITORY)/$(PACKAGE)/src/flash_unlock_block.c)
	$(CC) -S $(INCLUDE_PATH) $(CFLAGS) -g0 -fno-function-sections $(REPOSITORY)/$(PACKAGE)/src/flash_unlock_block.c
	echo " .globl flash_unlock_block_end" >>flash_unlock_block.s
	echo "flash_unlock_block_end:" >>flash_unlock_block.s
	$(CC) $(CFLAGS) -c -o flash_unlock_block.o flash_unlock_block.s
	$(AR) rcs $(PREFIX)/lib/libtarget.a flash_unlock_block.o
	

headers: mlt_headers

include $(REPOSITORY)/pkgconf/rules.mak

