# Project name: test program

SDTPath = f:/project/arm202u
PROCESSOR = ARM7
ARCH = 4
PATH = f:/project/test
TARGET = Release
DEBUGGER = STANDALONE


ARMARCH = $(ARCH)

CC = $(SDTPath)/bin/armcc
CCflags = -c -ARCH$(ARCH) -apcs 3/noswst/fp/softfp \
		-D$(DEBUGGER) \
		-I. -I../ucos-ii -I../ucos-ii/ARM -I../NedHAL
# -fwcah -wda -wp
# -fah -fussy -zpc1
# -w -ff

ASM = $(SDTPath)/bin/armasm
ASMflags = -CPU $(PROCESSOR) -CheckReglist -apcs 3/nosw \
		-PD "STANDALONE SETL {TRUE}" \
		-I.

LINK = $(SDTPath)/bin/armlink
LINKflags = -nozeropad -MAP -LIST eg1.lst

LIB = $(SDTPath)/bin/armlib
LIBflags = -c


# ********************
# *** Core sources ***
# ********************
COREOBJS =	$(TARGET)/eg1.o

# *****************
# *** Libraries ***
# *****************
LIBS = f:/project/NedHAL/$(TARGET)/nedhal.alf f:/project/UCOS-II/$(TARGET)/ucosii.alf

CLIB = f:/project/CLib/armlib_cn.32l

TOTALOBJS = $(COREOBJS)

debug : $(TOTALOBJS) $(LIBS)
	$(LINK) $(LINKflags) -bin -Base 0x01000000 -Data 0x02000000 -o $(TARGET)/eg1.rom $(COREOBJS) $(LIBS) $(CLIB)

clean :
	-del Release\*.o
	-del Release\eg1.rom
	del eg1.rom


# ********************
# *** Dependencies ***
# ********************
$(TARGET)/eg1.o : $(PATH)/eg1.c
	$(CC) $(CCflags) -o $@ $<

