]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/pa-lld.git/blob - makefile_armv7
PA LLD multiprocess support along with multiprocess and emac examples
[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/PAUnitTest/$(DEVICE)/armv7/linux/build/makefile all
65 # examples Stub to add Examples
66 examples: 
67         @$(MAKE) -f ./example/emacExample/$(DEVICE)/armv7/linux/build/makefile all
68         @$(MAKE) -f ./example/multicoreExample/$(DEVICE)/armv7/linux/build/makefile all
69         
70 # Make rule to create $(ARMV7LIBDIR)/libpa.a library
71 .libraries: $(ARMV7LIBDIR)/libpa.a
73 $(ARMV7LIBDIR)/libpa.a:
74         @$(MAKE) -f ./build/armv7/libpa_aearmv7.mk $@
76 # Rule to clean $(ARMV7LIBDIR)/libpa.a library
77 clean:
78         @$(MAKE) -f ./build/armv7/libpa_aearmv7.mk $@
79         @$(RM) $(ARMV7LIBDIR)/libpa.a
80         @$(MAKE) -f ./example/emacExample/$(DEVICE)/armv7/linux/build/makefile clean
81         @$(MAKE) -f ./example/multicoreExample/$(DEVICE)/armv7/linux/build/makefile clean       
82         @$(MAKE) -f ./test/PAUnitTest/$(DEVICE)/armv7/linux/build/makefile clean
83         @$(RMDIR) $(ARMV7OBJDIR)/pa
84         @$(RMDIR) $(ARMV7BINDIR)/pa
86 installbin:
87         install -d $(INSTALL_BIN_BASE_DIR)
88         install -c -m 755 $(ARMV7BINDIR)/pa/example/paEmacExample.out $(INSTALL_BIN_BASE_DIR)/paEmacExample_$(DEVICE).out
89         install -c -m 755 $(ARMV7BINDIR)/pa/test/paUnitTest.out    $(INSTALL_BIN_BASE_DIR)/paUnitTest_$(DEVICE).out
90         install -c -m 755 $(ARMV7BINDIR)/pa/example/paMCExample.out $(INSTALL_BIN_BASE_DIR)/paMCExample_$(DEVICE).out
91         
92 install:
93         install -d $(INSTALL_INC_BASE_DIR)/ti/drv/pa/fw
94         install -d $(INSTALL_LIB_BASE_DIR)
95         $(CP) ./*.h          $(INSTALL_INC_BASE_DIR)/ti/drv/pa
96         $(CP) ./fw/pafw.h    $(INSTALL_INC_BASE_DIR)/ti/drv/pa/fw
97         $(CP) ./fw/*_bin.c   $(INSTALL_INC_BASE_DIR)/ti/drv/pa/fw
98         @$(CP) -r $(ARMV7LIBDIR)/*.a         $(INSTALL_LIB_BASE_DIR)