1 #*
2 #*
3 #* Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
4 #*
5 #*
6 #* Redistribution and use in source and binary forms, with or without
7 #* modification, are permitted provided that the following conditions
8 #* are met:
9 #*
10 #* Redistributions of source code must retain the above copyright
11 #* notice, this list of conditions and the following disclaimer.
12 #*
13 #* Redistributions in binary form must reproduce the above copyright
14 #* notice, this list of conditions and the following disclaimer in the
15 #* documentation and/or other materials provided with the
16 #* distribution.
17 #*
18 #* Neither the name of Texas Instruments Incorporated nor the names of
19 #* its contributors may be used to endorse or promote products derived
20 #* from this software without specific prior written permission.
21 #*
22 #* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 #* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 #* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25 #* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26 #* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27 #* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28 #* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29 #* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30 #* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 #* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32 #* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 #*
36 #*************************************************************************
37 #* FILE PURPOSE: Build the IBL device specific module
38 #*************************************************************************
39 #* FILE NAME: makefile
40 #*
41 #* DESCRIPTION: Makes the device specific modules
42 #*
43 #*************************************************************************
45 ifndef IBL_ROOT
46 export IBL_ROOT=../../..
47 endif
49 ECODIR= $(IBL_ROOT)/device
51 ASMSRC= c64x.s
53 # For no target set CSRC to all sources for clean
54 ifeq ($(TARGET),c6472)
55 CSRC= c6472.c c6472init.c
56 else
57 ifeq ($(TARGET),c6455)
58 CSRC= c6455.c c6455init.c
59 else
60 ifeq ($(TARGET),c6474)
61 CSRC= c6474.c c6474init.c
62 else
63 ifeq ($(TARGET),c6474l)
64 CSRC= c6474l.c
65 else
66 ifeq ($(TARGET),c6457)
67 CSRC= c6457.c
68 else
69 ifeq ($(TARGET),c661x)
70 CSRC= c661x.c c661xinit.c c661xutil.c
71 else
72 CSRC= c6472.c c6455.c c6474.c c6474l.c c6457.c c6472init.c c6455init.c c6474init.c c661x.c c661xinit.c c661xutil.c
73 endif
74 endif
75 endif
76 endif
77 endif
78 endif
80 .PHONY: device
83 include $(IBL_ROOT)/make/$(ARCH)/makeeco.mk
86 C6X_C_DIR= $(IBL_ROOT)/device/$(TARGET)
87 C6X_C_DIR+= ;$(IBL_ROOT)/cfg/$(TARGET)
88 C6X_C_DIR+= ;$(IBL_ROOT)/device
89 C6X_C_DIR+= ;$(IBL_ROOT)
90 C6X_C_DIR+= ;$(IBL_ROOT)/arch/$(ARCH)
91 C6X_C_DIR+= ;$(STDINC)
92 C6X_C_DIR+= ;$(IBL_ROOT)/hw/plls
93 C6X_C_DIR+= ;$(IBL_ROOT)/hw/pscs
94 C6X_C_DIR+= ;$(IBL_ROOT)/hw/gpio
95 C6X_C_DIR+= ;$(IBL_ROOT)/hw/ddrs/emif31
96 C6X_C_DIR+= ;$(IBL_ROOT)/hw/qm
97 C6X_C_DIR+= ;$(IBL_ROOT)/hw/cpdma
98 C6X_C_DIR+= ;$(IBL_ROOT)/hw/pa
99 C6X_C_DIR+= ;$(IBL_ROOT)/hw/serdes
100 C6X_C_DIR+= ;$(IBL_ROOT)/driver/eth
101 export C6X_C_DIR
103 vpath % $(IBL_ROOT)/device/$(TARGET)
106 device: gen_cdefdep makefile $(OBJS)
109 $(OBJS): cdefdep
112 gen_cdefdep:
113 @echo Checking command line dependencies
114 @echo $(TARGET) $(ARCH) $(CDEFS) $(DEBUG) > cdefdep.tmp
115 @sh -c 'if diff -q cdefdep.tmp cdefdep ; then echo same ; else $(CP) cdefdep.tmp cdefdep ; fi '