Makefile-> change name of netapi lib
[keystone-rtos/netapi.git] / ti / runtime / netapi / test / build / Makefile
1 TRIE_OBJS=../trie.o
2 NT_OBJS= ../net_test.o  ../stubs.o  
3 # INCLUDE Directories
4 QMSS_INC_DIR = $(PDK_INSTALL_PATH)/ti/drv/qmss
5 CPPI_INC_DIR = $(PDK_INSTALL_PATH)/ti/drv/cppi
6 NETAPI_INC_DIR = ../../
8 #NETAPI LIB Build directory
9 NETAPI_BUILD_DIR = ../../build
11 # Support Libraries used by NETAPI 
12 QMSS_LIB = $(PDK_INSTALL_PATH)/ti/drv/qmss/lib/ti.drv.qmss.aearmv7
13 CPPI_LIB = $(PDK_INSTALL_PATH)/ti/drv/cppi/lib/ti.drv.cppi.aearmv7
14 PA_LIB   = $(PDK_INSTALL_PATH)/ti/drv/pa/lib/ti.drv.pa.aearmv7
15 PKTLIB_LIB   = $(PDK_INSTALL_PATH)/ti/runtime/pktlib/lib/ti.runtime.pktlib.aearmv7
16 NWAL_LIB = $(PDK_INSTALL_PATH)/ti/drv/nwal/lib/ti.drv.nwal.aearmv7
18 #where netapi lib resides after being built
19 NETAPI_LIB_DIR= ../../lib
21 CROSS=arm-none-linux-gnueabi-gcc
22 CROSS_PATH=/opt/CodeSourcery/Sourcery_G++_Lite/bin
23 CC=$(CROSS_PATH)/$(CROSS)
24 AR=$(CROSS_PATH)/arm-none-linux-gnueabi-ar
25 CFLAGS= -g -I../ -I. -I$(NETAPI_INC_DIR) -I$(NETAPI_INC_DIR)/src -I$(PDK_INSTALL_PATH)  -I$(QMSS_INC_DIR) -I$(CPPI_INC_DIR)  -D__ARMv7 -D_VIRTUAL_ADDR_SUPPORT -D__LINUX_USER_SPACE -D_LITTLE_ENDIAN=1 -DMAKEFILE_BUILD -pthread -D _GNU_SOURCE
28 all: net_test synchtest synchtest2 
30 api_clean:
31         rm -rf  $(NETAPI_LIB_DIR)/*.a 
32         rm -rf ../../src/*.o
34 clean:  
35         rm -f ../*.o
36         rm -f ../*.a
37         rm -f net_test synchtest synchtest2
40 %.o: %.c
41         $(CC)  -c  $(CFLAGS)  $<  -o $@
43 $(NETAPI_LIB_DIR)/ti.runtime.netapi.aearmv7.a:
44         make -C $(NETAPI_BUILD_DIR) 
46 net_test:  $(NT_OBJS) $(TRIE_OBJS) $(NETAPI_LIB_DIR)/ti.runtime.netapi.aearmv7.a
47         $(CC) $(LDFLAGS)  $(NT_OBJS) $(TRIE_OBJS) $(NETAPI_LIB_DIR)/ti.runtime.netapi.aearmv7.a $(PKTLIB_LIB) $(QMSS_LIB) $(CPPI_LIB) $(NWAL_LIB) $(PA_LIB)  -o net_test
49         
50 synchtest: ../synchtest.o
51         $(CC) $(LDFLAGS) ../synchtest.o -o synchtest
53 synchtest2: ../synchtest2.o
54         $(CC) $(LDFLAGS) ../synchtest2.o -o synchtest2 -lpthread
55