]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/netapi.git/blob - ti/runtime/netapi/makefile_armv7
026733b6f1982c2d314e4851804e14ac1a72aa13
[keystone-rtos/netapi.git] / ti / runtime / netapi / makefile_armv7
1 #*******************************************************************************
2 #* FILE PURPOSE: Top level makefile for Creating Component Libraries for ARM
3 #* architectures
4 #*******************************************************************************
5 #* FILE NAME: makefile
6 #*
7 #* DESCRIPTION: Defines Compiler tools paths, libraries , Build Options 
8 #*
9 #*
10 #*******************************************************************************
11 #*
12 # (Mandatory) Specify where various tools are installed.
14 # Output for prebuilt generated libraries
15 export ARMV7LIBDIR ?= ./lib
16 export ARMV7OBJDIR ?= ./obj
17 export ARMV7BINDIR ?= ./bin
19 export DEVICE ?=k2h
21 #Enable the following to build for tci6614
22 #export CPU ?=cortex-a8
25 # ROOT Directory
26 export ROOTDIR := ../../..
29 # INCLUDE Directory
30 export INCDIR := ../;$(PDK_INSTALL_PATH);$(ROOTDIR)
32 # Common Macros used in make
34 ifndef RM
35 export RM = rm -f
36 endif
38 ifndef CP
39 export CP = cp -p
40 endif
42 export MKDIR = mkdir -p
44 ifndef RMDIR
45 export RMDIR = rm -rf
46 endif
48 ifndef SED
49 export SED = sed
50 endif
52 ifndef MAKE
53 export MAKE = make
54 endif
56 # PHONY Targets
57 .PHONY: all clean lib tests examples install installbin
59 # all rule
60 all: .executables install installbin
61 .executables: lib tests examples
62 lib:
64 # Make rule to create $(ARMV7LIBDIR)/libnetapi.a library
65 lib: $(ARMV7LIBDIR)/libnetapi.a
67 $(ARMV7LIBDIR)/libnetapi.a:
68         -@echo Building library...
69         -@echo ARMV7OBJDIR = $(ARMV7OBJDIR)
70         @$(MAKE) -f ./build/Makefile $@
72 # Rule to clean $(ARMV7LIBDIR)/libnetapi.a library
73 clean:
74         -@echo Cleaning netapi package... $@
75         @$(MAKE) -f ./build/Makefile $@
76         @$(MAKE) -f ./test/build/Makefile $@
78 install:
79         install -d $(INSTALL_INC_BASE_DIR)/ti/runtime/netapi
80         install -d $(INSTALL_INC_BASE_DIR)/ti/runtime/netapi/src
81         install -d $(INSTALL_LIB_BASE_DIR)
82         $(CP) ./*.h                $(INSTALL_INC_BASE_DIR)/ti/runtime/netapi
83         @$(CP) -r $(ARMV7LIBDIR)/*.a         $(INSTALL_LIB_BASE_DIR)
84         $(CP) src/*.h                $(INSTALL_INC_BASE_DIR)/ti/runtime/netapi/src
85         install -d $(INSTALL_BIN_BASE_DIR)
86         install -c -m 755 $(ARMV7BINDIR)/netapi/test/* $(INSTALL_BIN_BASE_DIR)
87         install -d $(SYSCONFDIR)/netapi
88         $(CP) test/net_test_config.txt                $(SYSCONFDIR)/netapi
89         install -c -m 755 test/net_test_setup.sh                  $(SYSCONFDIR)/netapi
90 # Make rule to create tests
91 tests:
92         -@echo compiling tests ..........!
93         @$(MAKE) -f ./test/build/Makefile $@
95 examples: