]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/rm-lld.git/blob - makefile_armv7
b6730fdef3ca87c786a98faf9b08175525bf2e26
[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 # INSTALL default paths
24 export INSTALL_BIN_BASE_DIR ?= ./install/bin
25 export INSTALL_INC_BASE_DIR ?= ./install/include
26 export INSTALL_LIB_BASE_DIR ?= ./install/lib
28 # INCLUDE Directory
29 export INCDIR := ../../..;$(PDK_INSTALL_PATH);$(ROOTDIR)
31 # Common Macros used in make
33 ifndef RM
34 export RM = rm -f
35 endif
37 ifndef CP
38 export CP = cp -p
39 endif
41 export MKDIR = mkdir -p
43 ifndef RMDIR
44 export RMDIR = rm -rf
45 endif
47 ifndef SED
48 export SED = sed
49 endif
51 ifndef MAKE
52 export MAKE = make
53 endif
55 # PHONY Targets
56 #.PHONY: all clean lib tests install installbin
57 .PHONY: all clean lib install installbin
59 # all rule
60 all: .executables install installbin
61 #.executables: lib tests
62 .executables: lib
64 # Libraries
65 lib: .libraries
67 # tests Stub to add tests
68 #tests: 
69 #       @$(MAKE) -f ./test/$(DEVICE)/armv7/linux/build/makefile all
71 # examples Stub to add Examples
72 #examples: 
73 #       @$(MAKE) -f ./example/InfraDmaSC/$(DEVICE)/armv7/linux/build/makefile all
75 # Make rule to create $(ARMV7LIBDIR)/librm.a library
76 .libraries: $(ARMV7LIBDIR)/librm.a
78 $(ARMV7LIBDIR)/librm.a:
79         @$(MAKE) -f ./build/armv7/librm_aearmv7.mk $@
81 # Rule to clean $(ARMV7LIBDIR)/librm.a library
82 clean:
83         @$(MAKE) -f ./build/armv7/librm_aearmv7.mk $@
84 #       @$(MAKE) -f ./test/$(DEVICE)/armv7/linux/build/makefile $@
85         @$(RMDIR) $(ARMV7OBJDIR)/rm
86         @$(RMDIR) $(ARMV7BINDIR)/rm
87         @$(RM) $(ARMV7LIBDIR)/librm.a
89 installbin:
90         install -d $(INSTALL_BIN_BASE_DIR)
91 #       install -c -m 755 $(ARMV7BINDIR)/rm/test/rmTest.out    $(INSTALL_BIN_BASE_DIR)/rmTest_$(DEVICE).out
92 #       install -c -m 755 $(ARMV7BINDIR)/rm/test/rmMemTest.out    $(INSTALL_BIN_BASE_DIR)/rmMemTest_$(DEVICE).out       
93 #       install -c -m 755 $(ARMV7BINDIR)/rm/test/rmSharedTest.out    $(INSTALL_BIN_BASE_DIR)/rmSharedTest_$(DEVICE).out
95 install:
96         install -d $(INSTALL_INC_BASE_DIR)/ti/drv/rm/include
97         install -d $(INSTALL_INC_BASE_DIR)/ti/drv/rm/util
98         install -d $(INSTALL_INC_BASE_DIR)/ti/drv/rm/util/libfdt
99         install -d $(INSTALL_INC_BASE_DIR)/ti/drv/rm/device/k2k/
100         install -d $(INSTALL_INC_BASE_DIR)/ti/drv/rm/device/k2h/        
101         install -d $(INSTALL_LIB_BASE_DIR)
102         $(CP) ./*.h                $(INSTALL_INC_BASE_DIR)/ti/drv/rm
103         $(CP) ./include/*.h        $(INSTALL_INC_BASE_DIR)/ti/drv/rm/include
104         $(CP) ./util/*.h        $(INSTALL_INC_BASE_DIR)/ti/drv/rm/util
105         $(CP) ./util/libfdt/*.h $(INSTALL_INC_BASE_DIR)/ti/drv/rm/util/libfdt   
106         $(CP) ./device/k2h/*.c $(INSTALL_INC_BASE_DIR)/ti/drv/rm/device/k2h
107         $(CP) ./device/k2h/*.dtb $(INSTALL_INC_BASE_DIR)/ti/drv/rm/device/k2h
108         $(CP) ./device/k2h/*.dts $(INSTALL_INC_BASE_DIR)/ti/drv/rm/device/k2h           
109         $(CP) ./device/k2k/*.c $(INSTALL_INC_BASE_DIR)/ti/drv/rm/device/k2k     
110         $(CP) ./device/k2k/*.dtb $(INSTALL_INC_BASE_DIR)/ti/drv/rm/device/k2k   
111         $(CP) ./device/k2k/*.dts $(INSTALL_INC_BASE_DIR)/ti/drv/rm/device/k2k           
112         @$(CP) -r $(ARMV7LIBDIR)/*.a         $(INSTALL_LIB_BASE_DIR)