]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/ibl.git/blob - src/hw/c64x/make/makefile
Post tmp-mike2 merge updates
[keystone-rtos/ibl.git] / src / hw / c64x / make / makefile
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 NAME: makefile
38 #*
39 #* DESCRIPTION: Makes the low level drivers for the hardware modules
40 #*
41 #**************************************************************************
43 ifndef IBL_ROOT
44         export IBL_ROOT=../../..
45 endif
47 ECODIR= $(IBL_ROOT)/hw
49 # If no target specified, set CSRC to all files (used for clean)
50 ifeq ($(TARGET),c6472)
51  CSRC= t64.c cpmacdrv.c pll.c psc.c emif31.c mdio.c gpio.c nandgpio.c i2c.c nandwrgpio.c
52 else
53  ifeq ($(TARGET),c6474)
54   CSRC= t64.c cpmacdrv.c pll.c psc.c emif31.c mdio.c gpio.c nandgpio.c i2c.c nandwrgpio.c sgmii.c
55  else
56   ifeq ($(TARGET),c6474l)
57    CSRC= t64.c cpmacdrv.c pll.c psc.c emif31.c mdio.c gpio.c nandgpio.c i2c.c nandwrgpio.c sgmii.c
58   else
59    ifeq ($(TARGET),c6457)
60     CSRC= t64.c cpmacdrv.c pll.c psc.c emif31.c mdio.c gpio.c nandgpio.c i2c.c nandwrgpio.c sgmii.c
61    else
62     ifeq ($(TARGET),c6455)
63      CSRC= t64.c cpmacdrv.c pll.c emif31.c mdio.c gpio.c nandgpio.c i2c.c nandwrgpio.c
64     else
65      CSRC= t64.c cpmacdrv.c pll.c psc.c emif31.c mdio.c gpio.c nandgpio.c i2c.c nandwrgpio.c sgmii.c
66     endif
67    endif
68   endif
69  endif
70 endif
73 .PHONY: hw
76 include $(IBL_ROOT)/make/$(ARCH)/makeeco.mk
79 C6X_C_DIR=   $(IBL_ROOT)
80 C6X_C_DIR+= ;$(IBL_ROOT)/arch/$(ARCH)
81 C6X_C_DIR+= ;$(ECODIR)
82 C6X_C_DIR+= ;$(STDINC)
83 C6X_C_DIR+= ;$(IBL_ROOT)/cfg/$(TARGET)
84 C6X_C_DIR+= ;$(IBL_ROOT)/hw/timer
85 C6X_C_DIR+= ;$(IBL_ROOT)/hw/macs/cpmac
86 C6X_C_DIR+= ;$(IBL_ROOT)/driver/eth
87 C6X_C_DIR+= ;$(IBL_ROOT)/device
88 C6X_C_DIR+= ;$(IBL_ROOT)/device/$(TARGET)
89 C6X_C_DIR+= ;$(IBL_ROOT)/hw/plls
90 C6X_C_DIR+= ;$(IBL_ROOT)/hw/pscs
91 C6X_C_DIR+= ;$(IBL_ROOT)/hw/mdio
92 C6X_C_DIR+= ;$(IBL_ROOT)/hw/gpio
93 C6X_C_DIR+= ;$(IBL_ROOT)/hw/nands
94 C6X_C_DIR+= ;$(IBL_ROOT)/hw/nands/gpio
95 C6X_C_DIR+= ;$(IBL_ROOT)/hw/i2c
96 C6X_C_DIR+= ;$(IBL_ROOT)/hw/sgmii
97 C6X_C_DIR+= ;$(IBL_ROOT)/ecc
98 export C6X_C_DIR
101 vpath % $(ECODIR)/timer/timer64
103 ifeq ($(TARGET),c6472)
104  vpath % $(ECODIR)/macs/cpmac
105  vpath % $(ECODIR)/plls/pllxx1p8
106  vpath % $(ECODIR)/pscs/psc2
107  vpath % $(ECODIR)/ddrs/emif31
108  vpath % $(ECODIR)/mdio
109  vpath % $(ECODIR)/gpio
110  vpath % $(ECODIR)/nands/gpio
111  vpath % $(ECODIR)/i2c
112 endif
114 ifeq ($(TARGET),c6474)
115  vpath % $(ECODIR)/macs/cpmac
116  vpath % $(ECODIR)/plls/pllxx1p8
117  vpath % $(ECODIR)/pscs/psc2
118  vpath % $(ECODIR)/ddrs/emif31
119  vpath % $(ECODIR)/mdio
120  vpath % $(ECODIR)/gpio
121  vpath % $(ECODIR)/nands/gpio
122  vpath % $(ECODIR)/i2c
123  vpath % $(ECODIR)/sgmii
124 endif
126 ifeq ($(TARGET),c6474l)
127  vpath % $(ECODIR)/macs/cpmac
128  vpath % $(ECODIR)/plls/pllxx1p8
129  vpath % $(ECODIR)/pscs/psc2
130  vpath % $(ECODIR)/ddrs/emif31
131  vpath % $(ECODIR)/mdio
132  vpath % $(ECODIR)/gpio
133  vpath % $(ECODIR)/nands/gpio
134  vpath % $(ECODIR)/i2c
135  vpath % $(ECODIR)/sgmii
136 endif
138 ifeq ($(TARGET),c6457)
139  vpath % $(ECODIR)/macs/cpmac
140  vpath % $(ECODIR)/plls/pllxx1p8
141  vpath % $(ECODIR)/pscs/psc2
142  vpath % $(ECODIR)/ddrs/emif31
143  vpath % $(ECODIR)/mdio
144  vpath % $(ECODIR)/gpio
145  vpath % $(ECODIR)/nands/gpio
146  vpath % $(ECODIR)/i2c
147  vpath % $(ECODIR)/sgmii
148 endif
150 ifeq ($(TARGET),c6455)
151  vpath % $(ECODIR)/macs/cpmac
152  vpath % $(ECODIR)/plls/pllxx1p8
153  vpath % $(ECODIR)/ddrs/emif31
154  vpath % $(ECODIR)/mdio
155  vpath % $(ECODIR)/gpio
156  vpath % $(ECODIR)/nands/gpio
157  vpath % $(ECODIR)/i2c
158 endif
161 hw: gen_cdefdep makefile $(OBJS)
163 $(OBJS): cdefdep
166 gen_cdefdep:
167         @echo Checking command line dependencies
168         @echo $(TARGET) $(ARCH) $(CDEFS) $(DEBUG) > cdefdep.tmp
169         @sh -c 'if diff -q cdefdep.tmp cdefdep ; then echo same ; else $(CP) cdefdep.tmp cdefdep ; fi '
171 cleant:
172         make -f makestg2 clean2 ARCH=c64x