#**************************************************************************
#* FILE NAME: $RCSfile: makefile,v $         COPYRIGHT (c) FREESCALE 2004 *
#* DESCRIPTION:                                     All Rights Reserved   *
#* This is the makefile for eTPU QOM exmaple programs.                    *
#*========================================================================*
#* MAKE: GNU make        VERSION: 3.80                                    *
#* ORIGINAL AUTHOR: Jeff Loeliger [r12110]                                *
#* $Log: makefile,v $
#* Revision 1.3  2004/12/07 14:56:48  r47354
#* Add test to example2.
#*
#* Revision 1.2  2004/11/11 15:49:10  r12110
#* Cleared up and enhanced, added clean_all.
#*
#* Revision 1.1  2004/11/09 13:18:05  r47354
#* Initial version.
#*........................................................................*
#* 1.0   J. Loeliger  15/Sep/03    Initial version of file.               *
#*************************************************************************/
VPATH = ../etpu_set1 ../utils ../mpc5500 ../etpu_set2/cpu

CC = dcc
AS = das
LD = dld
#DEL = del
DEL = rm -f 

CFLAGS = -tPPC5554EF -c -g -Xnested-interrupts -Xdebug-dwarf2 -I../etpu_set2 -I../mpc5500 -I../utils -I../etpu_set2/cpu -I..
LDFLAGS = -m2 -tPPC5554EF mpc5554_intram.dld
ASFLAGS = -tPPC5554EF
LIBS = -li -lchar -lc -lg

INC = mpc5554.h typedefs.h etpu_util.h makefile
OBJS = ../utils/etpu_util.o etpu_toothgen.o ../test/etpu_test.o ../mpc5500/fs_gpio.o crt0.o

all: etpu_toothgen.o 


etpu_toothgen.o : etpu_toothgen.c etpu_toothgen.h etpu_toothgen_auto.h $(INC) etpu_util.o
	cd ../utils && $(MAKE)
	$(CC) $(CFLAGS) $<

crt0.o: crt0.s makefile
	$(AS) $(ASFLAGS) -o $@ $<

clean:
	$(DEL) *.db *.ou1 *.blk *.db2 *.map *.hex *lst *.err *.elf __*.* *.o