#Create by Chen Gengxin
#2008-03-03
#WXC2 R9.0 ISDN makefile 

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

ISDN_LIB_OBJ = ../src/isdn_msg.o ../src/isdn_fsm.o ../src/isdn_uif.o ../src/isdn_rm.o ../src/isdn_ie.o ../src/isdn_debug.o
ISDN_TST_OBJ = isdn_main.o isdn_test.o

ISDN_LIB = -L../../isdn/lib -lisdn 
PLAT_LIB = -L../../8ecp/lib -l8ecp -L../../aif/lib -laif -L../../bicc/lib -lbicc -L../../debug/lib -ldebug -L../../haepub/lib -lhaepub -L../../iptrans/lib -liptrans -L../../isup/lib -lisup -L../../m2ua/lib -lm2ua -L../../mgc/lib -lmgc -L../../mgcp/lib -lmgcp -L../../mtp3/lib -lmtp3 -L../../public/lib -lpublic -L../../rtp/lib -lrtp -L../../sccp/lib -lsccp -L../../scf/lib -lscf -L../../snmp/lib -lsnmp -L../../smpp/lib -lsmpp -L../../tcap/lib -ltcap -L../../xapp/lib -lxapp
MSS_LIB = -L../../../mss/aas/lib -laas -L../../../mss/ae/lib -lae -L../../../mss/hlr/lib -lhlr -L../../../mss/mnp/lib -lmnp -L../../../mss/msc/lib -lmsc -L../../../mss/ssf/lib -lssf -L../../../mss/vlr/lib -lvlr
TEST_LIB = -L/usr/local/lib/CUnit -lcunit -lgcov

isdn_main: $(ISDN_TST_OBJ)
	$(CC) $(ISDN_LIB_OBJ) $(ISDN_TST_OBJ) -o test_main $(ISDN_LIB) $(PLAT_LIB) -lm

isdn_main.o: isdn_main.c
	$(CC) $(CFLAG) $<
	
isdn_test.o: isdn_test.c
	$(CC) $(CFLAG) $<
	
isdn_msg.o: isdn_msg.c
	$(CC) $(CFLAG) $<

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

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

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

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

isdn_debug.o: isdn_debug.c
	$(CC) $(CFLAG) $<
	
clean:
	rm -f main *.o *.a *.xml *.gcov *.gcda *.gcno core test_main

