1 # 2 # Copyright 2001-2009 Texas Instruments - http://www.ti.com/ 3 # 4 # Licensed under the Apache License, Version 2.0 (the "License"); 5 # you may not use this file except in compliance with the License. 6 # You may obtain a copy of the License at 7 # 8 # http://www.apache.org/licenses/LICENSE-2.0 9 # 10 # Unless required by applicable law or agreed to in writing, software 11 # distributed under the License is distributed on an "AS IS" BASIS, 12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 # See the License for the specific language governing permissions and 14 # limitations under the License. 15 16 # 17 # dspbridge/mpu_api/make/start.mk 18 # 19 # DSP-BIOS Bridge build rules. 20 # 21 22 # make sure we have a rootdir 23 ifndef PROJROOT 24 $(error Error: variable PROJROOT not defined) 25 endif 26 27 # make sure we have a bridgeroot 28 #ifndef BRIDGEROOT 29 #$(error Error: variable BRIDGEROOT not defined) 30 #endif 31 32 33 CMDDEFS = 34 CMDDEFS_START = 35 36 37 CROSS=arm-none-linux-gnueabi- 38 PROCFAMILY=OMAP_4430 39 40 41 ifndef PROCFAMILY 42 $(error Error: PROCFAMILY can not be determined from Kernel .config) 43 endif 44 45 ifndef TARGETDIR 46 TARGETDIR=$(PROJROOT)/target 47 endif 48 49 50 51 #default (first) target should be "all" 52 #make sure the target directories are created 53 #all: $(HOSTDIR) $(ROOTFSDIR) $(TARGETDIR) 54 #all: $(TARGETDIR) 55 56 CONFIG_SHELL := /bin/bash 57 58 SHELL := $(CONFIG_SHELL) 59 60 # Current version of gmake (3.79.1) cannot run windows shell's internal commands 61 # We need to invoke command interpreter explicitly to do so. 62 # for winnt it is cmd /c <command> 63 SHELLCMD:= 64 65 ifneq ($(SHELL),$(CONFIG_SHELL)) 66 CHECKSHELL:=SHELLERR 67 else 68 CHECKSHELL:= 69 endif 70 71 # Error string to generate fatal error and abort gmake 72 ERR = $(error Makefile generated fatal error while building target "$@") 73 74 CP := cp 75 76 MAKEFLAGS = r 77 78 QUIET := &> /dev/null 79 80 # Should never be := 81 RM = rm $(1) 82 MV = mv $(1) $(2) 83 RMDIR = rm -r $(1) 84 MKDIR = mkdir -p $(1) 85 INSTALL = install 86 87 # Current Makefile directory 88 MAKEDIR := $(CURDIR) 89 90 # Implicit rule search not needed for *.d, *.c, *.h 91 %.d: 92 %.c: 93 %.h: 94 95 # Tools 96 CC := $(CROSS)gcc 97 AR := $(CROSS)ar 98 LD := $(CROSS)ld 99 STRIP := $(CROSS)strip 100 101 102