]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/rm-lld.git/blob - makefile_armv7
sdocm00111727: qmInfraDmaSC.out fails on k2l
[keystone-rtos/rm-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
18 export ARMV7BINDIR ?= ./bin
19 export USEDYNAMIC_LIB ?= "no"
21 # ROOT Directory
22 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 examples clean lib tests install installbin
54 # all rule
55 all: .executables 
56 .executables: lib tests
58 # Libraries
59 lib: .libraries
61 # tests Stub to add tests
62 tests: 
63         @$(MAKE) -f ./test/armv7/linux/build/makefile all
65 # examples Stub to add Examples
66 #examples: 
67 #       @$(MAKE) -f ./example/InfraDmaSC/$(DEVICE)/armv7/linux/build/makefile all
69 # Make rule to create $(ARMV7LIBDIR)/librm.a library
70 .libraries: $(ARMV7LIBDIR)/librm.a librm.so
72 $(ARMV7LIBDIR)/librm.a::
73         @$(MAKE) -f ./build/armv7/librm_aearmv7.mk $@
75 librm.so:
76         @$(MAKE) -f ./build/armv7/librm_aearmv7.mk $@
77         
78 # Rule to clean $(ARMV7LIBDIR)/librm.a library
79 clean:
80         @$(MAKE) -f ./build/armv7/librm_aearmv7.mk $@
81         @$(MAKE) -f ./test/armv7/linux/build/makefile $@
82         @$(RMDIR) $(ARMV7OBJDIR)/rm
83         @$(RMDIR) $(ARMV7BINDIR)/rm
84         @$(RM) $(ARMV7LIBDIR)/librm.a
85         @$(RM) $(ARMV7LIBDIR)/librm.so
86         @$(RM) $(ARMV7LIBDIR)/librm.so.*
87         
88 installbin:
89         install -d $(INSTALL_BIN_BASE_DIR)
90         install -d $(INSTALL_BIN_BASE_DIR)/device/k2k/
91         install -d $(INSTALL_BIN_BASE_DIR)/device/k2h/
92         install -d $(INSTALL_BIN_BASE_DIR)/device/k2e/
93         install -d $(INSTALL_BIN_BASE_DIR)/device/k2l/
94         $(CP) ./device/k2h/*.dtb $(INSTALL_BIN_BASE_DIR)/device/k2h
95         $(CP) ./device/k2k/*.dtb $(INSTALL_BIN_BASE_DIR)/device/k2k
96         $(CP) ./device/k2e/*.dtb $(INSTALL_BIN_BASE_DIR)/device/k2e
97         $(CP) ./device/k2l/*.dtb $(INSTALL_BIN_BASE_DIR)/device/k2l
98         install -c -m 755 $(ARMV7BINDIR)/rm/test/rmServer.out    $(INSTALL_BIN_BASE_DIR)/rmServer.out   
99         install -c -m 755 $(ARMV7BINDIR)/rm/test/rmServer_so.out $(INSTALL_BIN_BASE_DIR)/rmServer_so.out        
100         
101 installbin_test:
102         install -d $(INSTALL_BIN_BASE_DIR)/ti/drv/rm/test
103         install -d $(INSTALL_BIN_BASE_DIR)/ti/drv/rm/test/dts_files             
104         $(CP) ./test/dts_files/*.dtb $(INSTALL_BIN_BASE_DIR)/ti/drv/rm/test/dts_files
105         install -c -m 755 $(ARMV7BINDIR)/rm/test/rmLinuxClientTest.out    $(INSTALL_BIN_BASE_DIR)/rmLinuxClientTest.out
106         install -c -m 755 $(ARMV7BINDIR)/rm/test/rmLinuxClientTest_so.out $(INSTALL_BIN_BASE_DIR)/rmLinuxClientTest_so.out      
107         install -c -m 755 $(ARMV7BINDIR)/rm/test/rmDspClientTest.out      $(INSTALL_BIN_BASE_DIR)/rmDspClientTest.out
108         install -c -m 755 $(ARMV7BINDIR)/rm/test/rmDspClientTest_so.out   $(INSTALL_BIN_BASE_DIR)/rmDspClientTest_so.out
110 install:
111         install -d $(INSTALL_INC_BASE_DIR)/ti/drv/rm/util
112         install -d $(INSTALL_INC_BASE_DIR)/ti/drv/rm/util/libfdt
113         install -d $(INSTALL_INC_BASE_DIR)/ti/drv/rm/device/
114         install -d $(INSTALL_LIB_BASE_DIR)
115         $(CP) ./*.h              $(INSTALL_INC_BASE_DIR)/ti/drv/rm
116         $(CP) ./util/*.h         $(INSTALL_INC_BASE_DIR)/ti/drv/rm/util
117         $(CP) ./util/*.sh        $(INSTALL_INC_BASE_DIR)/ti/drv/rm/util 
118         $(CP) ./util/libfdt/*.h  $(INSTALL_INC_BASE_DIR)/ti/drv/rm/util/libfdt  
119         $(CP) -r ./device/       $(INSTALL_INC_BASE_DIR)/ti/drv/rm/
120         $(RM) -r $(INSTALL_INC_BASE_DIR)/ti/drv/rm/device/Module.xs                     
121         @$(CP) -r $(ARMV7LIBDIR)/*.a         $(INSTALL_LIB_BASE_DIR)
122         @$(CP) -r $(ARMV7LIBDIR)/*.so        $(INSTALL_LIB_BASE_DIR)
123         @$(CP) -r $(ARMV7LIBDIR)/*.so.*      $(INSTALL_LIB_BASE_DIR)    
124 # Make rule to create examples Stub
125 examples: