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
23ifndef PROJROOT
24$(error Error: variable PROJROOT not defined)
25endif
26
27# make sure we have a bridgeroot
28#ifndef BRIDGEROOT
29#$(error Error: variable BRIDGEROOT not defined)
30#endif
31
32
33CMDDEFS =
34CMDDEFS_START =
35
36
37CROSS=arm-none-linux-gnueabi-
38PROCFAMILY=OMAP_4430
39
40
41ifndef PROCFAMILY
42$(error Error: PROCFAMILY can not be determined from Kernel .config)
43endif
44
45ifndef TARGETDIR
46TARGETDIR=$(PROJROOT)/target
47endif
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
56CONFIG_SHELL := /bin/bash
57
58SHELL := $(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>
63SHELLCMD:=
64
65ifneq ($(SHELL),$(CONFIG_SHELL))
66CHECKSHELL:=SHELLERR
67else
68CHECKSHELL:=
69endif
70
71# Error string to generate fatal error and abort gmake
72ERR = $(error Makefile generated fatal error while building target "$@")
73
74CP  :=   cp
75
76MAKEFLAGS = r
77
78QUIET := &> /dev/null
79
80# Should never be :=
81RM    = rm $(1)
82MV    = mv $(1) $(2)
83RMDIR = rm -r $(1)
84MKDIR = mkdir -p $(1)
85INSTALL = install
86
87# Current Makefile directory
88MAKEDIR := $(CURDIR)
89
90# Implicit rule search not needed for *.d, *.c, *.h
91%.d:
92%.c:
93%.h:
94
95#   Tools
96CC	:= $(CROSS)gcc
97AR	:= $(CROSS)ar
98LD	:= $(CROSS)ld
99STRIP	:= $(CROSS)strip
100
101
102