]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/pa-lld.git/blob - makefile_armv7
updated the makefile for not to install in standalone packge
[keystone-rtos/pa-lld.git] / 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 DEVICE ?=k2h
17 export ARMV7OBJDIR ?= ./obj/$(DEVICE)
18 export ARMV7BINDIR ?= ./bin/$(DEVICE)
20 # ROOT Directory
21 export ROOTDIR := ../../..
24 # INCLUDE Directory
25 export INCDIR := ../../..;$(PDK_INSTALL_PATH);$(ROOTDIR)
27 # Common Macros used in make
29 ifndef RM
30 export RM = rm -f
31 endif
33 ifndef CP
34 export CP = cp -p
35 endif
37 export MKDIR = mkdir -p
39 ifndef RMDIR
40 export RMDIR = rm -rf
41 endif
43 ifndef SED
44 export SED = sed
45 endif
47 ifndef MAKE
48 export MAKE = make
49 endif
51 # PHONY Targets
52 .PHONY: all clean lib tests examples install installbin
54 # all rule
55 all: .executables 
56 .executables: lib tests examples
58 # Libraries
59 lib: .libraries
61 # tests Stub to add tests
62 tests: 
63         @$(MAKE) -f ./test/PAUnitTest2/$(DEVICE)/armv7/linux/build/makefile all
65 # examples Stub to add Examples
66 examples: 
67         @$(MAKE) -f ./example/simpleExample2/$(DEVICE)/armv7/linux/build/makefile all
69 # Make rule to create $(ARMV7LIBDIR)/libpa.a library
70 .libraries: $(ARMV7LIBDIR)/libpa.a
72 $(ARMV7LIBDIR)/libpa.a:
73         @$(MAKE) -f ./build/armv7/libpa_aearmv7.mk $@
75 # Rule to clean $(ARMV7LIBDIR)/libpa.a library
76 clean:
77         @$(MAKE) -f ./build/armv7/libpa_aearmv7.mk $@
78         @$(RM) $(ARMV7LIBDIR)/libpa.a
79         @$(MAKE) -f ./example/simpleExample2/$(DEVICE)/armv7/linux/build/makefile clean
80         @$(MAKE) -f ./test/PAUnitTest2/$(DEVICE)/armv7/linux/build/makefile clean
81         @$(RMDIR) $(ARMV7OBJDIR)/pa
82         @$(RMDIR) $(ARMV7BINDIR)/pa
84 installbin:
85         install -d $(INSTALL_BIN_BASE_DIR)
86         install -c -m 755 $(ARMV7BINDIR)/pa/example/paSimpleExample.out $(INSTALL_BIN_BASE_DIR)/paSimpleExample_$(DEVICE).out
87         install -c -m 755 $(ARMV7BINDIR)/pa/test/paUnitTest2.out    $(INSTALL_BIN_BASE_DIR)/paUnitTest2_$(DEVICE).out
89 install:
90         install -d $(INSTALL_INC_BASE_DIR)/ti/drv/pa/fw
91         install -d $(INSTALL_LIB_BASE_DIR)
92         $(CP) ./*.h          $(INSTALL_INC_BASE_DIR)/ti/drv/pa
93         $(CP) ./fw/pafw.h    $(INSTALL_INC_BASE_DIR)/ti/drv/pa/fw
94         $(CP) ./fw/*_bin.c   $(INSTALL_INC_BASE_DIR)/ti/drv/pa/fw
95         @$(CP) -r $(ARMV7LIBDIR)/*.a         $(INSTALL_LIB_BASE_DIR)