#******************************************************************************* #* FILE PURPOSE: Top level makefile for Creating Component Libraries for ARM #* architectures #******************************************************************************* #* FILE NAME: makefile #* #* DESCRIPTION: Defines Compiler tools paths, libraries , Build Options #* #* #******************************************************************************* #* # (Mandatory) Specify where various tools are installed. # Output for prebuilt generated libraries export ARMV7LIBDIR ?= ./lib export ARMV7OBJDIR ?= ./obj export ARMV7OBJDIR_SO := $(ARMV7OBJDIR)/netapi/lib_so export ARMV7OBJDIR := $(ARMV7OBJDIR)/netapi/lib export ARMV7BINDIR ?= ./bin export DEVICE ?=k2h #Enable the following to build for tci6614 #export CPU ?=cortex-a8 # ROOT Directory export ROOTDIR := ../../.. # INCLUDE Directory export INCDIR := ../;$(PDK_INSTALL_PATH);$(ROOTDIR) # Common Macros used in make ifndef RM export RM = rm -f endif ifndef CP export CP = cp -p endif export MKDIR = mkdir -p ifndef RMDIR export RMDIR = rm -rf endif ifndef SED export SED = sed endif ifndef MAKE export MAKE = make endif # PHONY Targets .PHONY: all clean lib tests examples install installbin # all rule all: .executables install installbin .executables: lib tests examples # Make rule to create $(ARMV7LIBDIR)/libnetapi.a library lib: $(ARMV7LIBDIR)/libnetapi.a libnetapi.so $(ARMV7LIBDIR)/libnetapi.a: -@echo Building library... -@echo ARMV7OBJDIR = $(ARMV7OBJDIR) @$(MAKE) -f ./build/Makefile $@ libnetapi.so: -@echo Building library... -@echo ARMV7OBJDIR = $(ARMV7OBJDIR_SO) @$(MAKE) -f ./build/Makefile $@ # Rule to clean $(ARMV7LIBDIR)/libnetapi.a library clean: -@echo Cleaning netapi package... $@ @$(MAKE) -f ./build/Makefile $@ @$(MAKE) -f ./test/build/Makefile $@ install: install -d $(INSTALL_INC_BASE_DIR)/ti/runtime/netapi install -d $(INSTALL_INC_BASE_DIR)/ti/runtime/netapi/src install -d $(INSTALL_LIB_BASE_DIR) $(CP) ./*.h $(INSTALL_INC_BASE_DIR)/ti/runtime/netapi @$(CP) -r $(ARMV7LIBDIR)/libnetapi.a $(INSTALL_LIB_BASE_DIR) @$(CP) -rp $(ARMV7LIBDIR)/libnetapi.so* $(INSTALL_LIB_BASE_DIR) $(CP) src/*.h $(INSTALL_INC_BASE_DIR)/ti/runtime/netapi/src installbin: install -d $(INSTALL_BIN_BASE_DIR) install -c -m 755 $(ARMV7BINDIR)/netapi/test/* $(INSTALL_BIN_BASE_DIR) install -d $(SYSCONFDIR)/netapi $(CP) test/net_test_config.txt $(SYSCONFDIR)/netapi install -c -m 755 tools/net_test_loopback_setup.sh $(SYSCONFDIR)/netapi install -c -m 755 tools/net_test_router_setup.sh $(SYSCONFDIR)/netapi install -c -m 755 tools/irqset.sh $(SYSCONFDIR)/netapi install -c -m 755 tools/dsp_core_setup.sh $(SYSCONFDIR)/netapi # Make rule to create tests tests: -@echo compiling tests @$(MAKE) -f ./test/build/Makefile $@ examples: