]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/rm-lld.git/blob - makefile_armv7
Resolved SDOCM00101836
[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/$(DEVICE)
18 export ARMV7BINDIR ?= ./bin/$(DEVICE)
20 # ROOT Directory
21 export ROOTDIR := ../../..
23 # INCLUDE Directory
24 export INCDIR := ../../..;$(PDK_INSTALL_PATH);$(ROOTDIR)
26 # Common Macros used in make
28 ifndef RM
29 export RM = rm -f
30 endif
32 ifndef CP
33 export CP = cp -p
34 endif
36 export MKDIR = mkdir -p
38 ifndef RMDIR
39 export RMDIR = rm -rf
40 endif
42 ifndef SED
43 export SED = sed
44 endif
46 ifndef MAKE
47 export MAKE = make
48 endif
50 # PHONY Targets
51 .PHONY: all examples clean lib tests install installbin
53 # all rule
54 all: .executables 
55 .executables: lib tests
57 # Libraries
58 lib: .libraries
60 # tests Stub to add tests
61 tests: 
62         @$(MAKE) -f ./test/$(DEVICE)/armv7/linux/build/makefile all
64 # examples Stub to add Examples
65 #examples: 
66 #       @$(MAKE) -f ./example/InfraDmaSC/$(DEVICE)/armv7/linux/build/makefile all
68 # Make rule to create $(ARMV7LIBDIR)/librm.a library
69 .libraries: $(ARMV7LIBDIR)/librm.a
71 $(ARMV7LIBDIR)/librm.a::
72         @$(MAKE) -f ./build/armv7/librm_aearmv7.mk $@
74 # Rule to clean $(ARMV7LIBDIR)/librm.a library
75 clean:
76         @$(MAKE) -f ./build/armv7/librm_aearmv7.mk $@
77         @$(MAKE) -f ./test/$(DEVICE)/armv7/linux/build/makefile $@
78         @$(RMDIR) $(ARMV7OBJDIR)/rm
79         @$(RMDIR) $(ARMV7BINDIR)/rm
80         @$(RM) $(ARMV7LIBDIR)/librm.a
82 installbin:
83         install -d $(INSTALL_BIN_BASE_DIR)
84         install -d $(INSTALL_BIN_BASE_DIR)/device/k2k/
85         install -d $(INSTALL_BIN_BASE_DIR)/device/k2h/
86         $(CP) ./device/k2h/*.dtb $(INSTALL_BIN_BASE_DIR)/device/k2h
87         $(CP) ./device/k2k/*.dtb $(INSTALL_BIN_BASE_DIR)/device/k2k
88         install -c -m 755 $(ARMV7BINDIR)/rm/test/rmServer.out    $(INSTALL_BIN_BASE_DIR)/rmServer_$(DEVICE).out 
90 installbin_test:
91         install -d $(INSTALL_BIN_BASE_DIR)/ti/drv/rm/test
92         install -d $(INSTALL_BIN_BASE_DIR)/ti/drv/rm/test/dts_files             
93         $(CP) ./test/dts_files/*.dtb $(INSTALL_BIN_BASE_DIR)/ti/drv/rm/test/dts_files
94         install -c -m 755 $(ARMV7BINDIR)/rm/test/rmLinuxClientTest.out $(INSTALL_BIN_BASE_DIR)/rmLinuxClientTest_$(DEVICE).out
95         install -c -m 755 $(ARMV7BINDIR)/rm/test/rmDspClientTest.out   $(INSTALL_BIN_BASE_DIR)/rmDspClientTest_$(DEVICE).out
97 install:
98         install -d $(INSTALL_INC_BASE_DIR)/ti/drv/rm/util
99         install -d $(INSTALL_INC_BASE_DIR)/ti/drv/rm/util/libfdt
100         install -d $(INSTALL_INC_BASE_DIR)/ti/drv/rm/device/k2k/
101         install -d $(INSTALL_INC_BASE_DIR)/ti/drv/rm/device/k2h/
102         install -d $(INSTALL_LIB_BASE_DIR)
103         $(CP) ./*.h              $(INSTALL_INC_BASE_DIR)/ti/drv/rm
104         $(CP) ./util/*.h         $(INSTALL_INC_BASE_DIR)/ti/drv/rm/util
105         $(CP) ./util/*.sh        $(INSTALL_INC_BASE_DIR)/ti/drv/rm/util 
106         $(CP) ./util/libfdt/*.h  $(INSTALL_INC_BASE_DIR)/ti/drv/rm/util/libfdt  
107         $(CP) ./device/k2h/*.c   $(INSTALL_INC_BASE_DIR)/ti/drv/rm/device/k2h
108         $(CP) ./device/k2h/*.dtb $(INSTALL_INC_BASE_DIR)/ti/drv/rm/device/k2h
109         $(CP) ./device/k2h/*.dts $(INSTALL_INC_BASE_DIR)/ti/drv/rm/device/k2h           
110         $(CP) ./device/k2k/*.c   $(INSTALL_INC_BASE_DIR)/ti/drv/rm/device/k2k   
111         $(CP) ./device/k2k/*.dtb $(INSTALL_INC_BASE_DIR)/ti/drv/rm/device/k2k   
112         $(CP) ./device/k2k/*.dts $(INSTALL_INC_BASE_DIR)/ti/drv/rm/device/k2k                   
113         @$(CP) -r $(ARMV7LIBDIR)/*.a         $(INSTALL_LIB_BASE_DIR)
114 # Make rule to create examples Stub
115 examples: