#WXC2 R9.0 AIFG makefile 
#Create by Roy Jiang 
#2007-3-12

CC = gcc
CFLAG = -g -Wall -c #-fprofile-arcs -ftest-coverage

AIFG_LIB_OBJ = aifg_m.o aifg.o aifg_mpp.o aifg_debug.o aifg_ie.o
AIFG_TST_OBJ = aifg_main.o aifg_test.o

AIFG_LIB = -L../lib -laif
TEST_LIB = -L/usr/local/lib/CUnit -lcunit -lgcov

aifg_main: $(AIFG_TST_OBJ)
	$(CC) $(AIFG_TST_OBJ) -o test_main $(AIFG_LIB) $(TEST_LIB)

aifg_main.o: aifg_main.c
	$(CC) $(CFLAG) $<

aifg_test.o: aifg_test.c
	$(CC) $(CFLAG) $<

aifg.o: aifg.c
	$(CC) $(CFLAG) $<

aifg_m.o: aifg_m.c
	$(CC) $(CFLAG) $<

aifg_mpp.o: aifg_mpp.c
	$(CC) $(CFLAG) $<

aifg_debug.o: aifg_debug.c
	$(CC) $(CFLAG) $<

aifg_ie.o: aifg_ie.c
	$(CC) $(CFLAG) $<

clean:
	rm -f main *.o *.a *.xml *.gcov *.gcda *.gcno core test_main

