#**************************************************************************
#* FILE NAME: $RCSfile: makefile,v $         COPYRIGHT (c) FREESCALE 2008 *
#* DESCRIPTION:                                     All Rights Reserved   *
#* This is the makefile for eTPU knock window API.                       *
#*========================================================================*
#* MAKE: GNU make        VERSION: 3.80                                    *
#* ORIGINAL AUTHOR: Jeff Loeliger [r12110]                                *
#* $Log: makefile,v $
#* Revision 1.2  2008/06/25 08:03:14  r43562
#* Fixed revision number.
#*
#* Revision 1.1  2008/06/25 08:00:44  r43562
#* 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 = rm -f #del

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_knock_window.o ../test/etpu_test.o ../mpc5500/fs_gpio.o crt0.o

all: etpu_knock_window.o 

etpu_knock_window.o : etpu_knock_window.c etpu_knock_window.h etpu_knock_window.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