/[TIS-4000 Rel T60]/Tornado/Makefile.defaults
ViewVC logotype

Contents of /Tornado/Makefile.defaults

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations)
Fri Sep 17 11:53:18 1999 UTC (24 years ago) by tis4000
Branch: MAIN
CVS Tags: CAISO, t55baseline
Changes since 1.1: +0 -2 lines
Remove Id line - irani

1 #
2 # Makefile.defaults
3 #
4 # this file contains 'standard' definitions of various things
5 # required by Makefiles in the '.../Vx/xxx' build tree. Any
6 # changes here will affect ALL subordinate Makefiles and will
7 # cause the auto-regeneration of all the Makefile.Mxx scripts.
8 #
9
10 # CPU,BSP,FLT,CUR,DST,TARG,GCC_BASE,CPU_FAM input from command line for make depend
11 # e.g.
12 # CPU=68000
13 # BSP=msol,mv147
14 # FLT=soft-float,68881,""(X86 hardware default)
15 # CUR=rec
16 # DST=M00,M30,X486
17 # TARG=68k,386
18 # GCC_BASE=68K,386
19 # CPU_FAM=MC68000,MC68030,I80486
20
21 #
22 # 'TOP' is relative to '.../Vx/xxx' so as to be on the
23 # correct sibling level with the "bin" directories '.../Vx/Mnn' -
24 # this facilitates debugging with relative paths
25 #
26
27 TOP = ..\..\..
28 SHR = $(TOP)/share
29 VXW = $(SHR)/vw$(GCC_BASE)
30
31 # ---
32 # environment variables required by GNU/WRS tools
33 #
34
35 EV1 = VX_HOST_TYPE=sun4
36 $(EV1)
37 EV2 = VX_HSP_BASE=$(VXW)
38 $(EV2)
39 EV3 = VX_BSP_BASE=$(VXW)
40 $(EV3)
41 EV4 = VX_VW_BASE=$(VXW)
42 $(EV4)
43 EV5 = GCC_$(GCC_BASE)_BASE=$(VX_VW_BASE)/gnu-toolkit
44 $(EV5)
45 EV6 = GCC_EXEC_PREFIX=$(GCC_$(GCC_BASE)_BASE)/$(VX_HOST_TYPE).$(TARG)/lib/gcc-lib/
46 $(EV6)
47
48 ENV = $(EV1) $(EV2) $(EV3) $(EV4) $(EV5) $(EV6)
49 GPATH = $(ENV) $(GCC_$(GCC_BASE)_BASE)/$(VX_HOST_TYPE).$(TARG)/bin
50 TLBIN = $(VX_VW_BASE)/bin/$(VX_HOST_TYPE)
51
52 # ---
53 # directory alias macros
54 #
55
56 SRCRT = $(SHR)/src
57 BINRT = $(TOP)/Vx
58 CFG = $(VXW)/config/$(BSP)
59 SRC = $(SRCRT)/$(CUR)
60
61 # ---
62 # include paths
63 #
64 # extra include directories for a given '.../Vx/xxx' should
65 # be defined in the Makefile.config file for that target by
66 # setting the INX macro to a non-empty value
67 #
68
69 STDH = $(VXW)/h
70 TISH = $(SHR)/epicsH
71 INC = -I$(STDH) -I$(TISH) -I$(SRC) -I$(VXW)/h/sys -I$(VXW)/h/netinet
72
73 # ---
74 # final bindings for the tool invocations ... modify with care!
75 #
76
77 MF = Makefile.$(DST)
78 68KOPT = -m$(FLT) -pipe -fno-builtin -traditional -O -g
79 386OPT = -pipe -fno-builtin -traditional -O -g
80 CC = $(GPATH)/cc$(TARG) -c -m$(CPU) -DCPU=$(CPU_FAM) $($(GCC_BASE)OPT) $($(DST)OPT) $(INC) $($(DST)INX) $($(DST)CCX)
81 LD = $(GPATH)/ld$(TARG) -r
82
83 #
84 # seriously get down to business...
85 #
86
87 .SUFFIXES:
88
89 .SUFFIXES: .s .c .o
90
91 #
92 # *F = filename part of current dependency
93 # so we are creating a variable CCX = CCX_iocInit which is to be defined in target dir
94 # Makefile.config, see db
95 # for CCY we are creating M00CCX_iocInit (M00 from DST), used for flag for file for specific
96 # machine type in this case M00
97 # the set command makes arg 1 (source path to source file), 2 and 3 are additional compile flags
98 # $@ is the current target ex iocInit.o
99 #
100
101 %.o :
102 @ CCX="$(CCX_$(*F))" ; CCY="$($(DST)CCX_$(*F))" ; set $(SRC)/$(*F) "$${CCX:-} $${CCY:-}" ; \
103 if test -f $$1.c ; then \
104 echo "compiling '$$1.c' to '$@' ... $$2" ; $(RM) $@ ; \
105 $(CC) -o $@ $$1.c $$2 ; \
106 elif test -f $$1.s ; then \
107 echo "translating '$$1.s' to '$@' ... $$2" ; $(RM) $@ ; \
108 cat $$1.s >$(*F).S ; $(CC) -o $@ $(*F).S $$2 ; $(RM) $(*F).S ; \
109 else \
110 echo "-- MAJOR SNAFU! -- ($$1) -> ($@)" ; \
111 fi
112
113 # ---
114 # the 'default' target will be executed when the Makefile.Mxx is called
115 # without any parameters ... we refer it to the 'user_target' defined
116 # in Makefile.target.
117 #
118 # the 'depend' entry point for generating the dependencies in a given
119 # tree for a specific processor is the name of the desired Makefile.Mxx
120 #
121
122 # ---
123 # gather 'uniqueness', i.e. list of sources, for current directory
124 #
125
126 include ../Makefile.config
127
128 default: user_target
129 @ echo "finished $(CUR)/$(DST)."
130
131 $(MF): ../../Makefile.defaults ../Makefile.config ../Makefile.target
132 @ echo "updating '$(CUR)/$(DST)/Makefile.$(DST)' ..."
133 @ $(RM) $(MF) ; touch $(MF)
134 @ echo "#" >> $(MF) ; echo "# Specified configuration:" >> $(MF) ; echo "#" >> $(MF)
135 @ echo "CPU = " $(CPU) >> $(MF) ; echo "FLT = " $(FLT) >> $(MF) ; echo "BSP = " $(BSP) >> $(MF)
136 @ echo "CUR = " $(CUR) >> $(MF) ; echo "DST = " $(DST) >> $(MF) ; echo "TARG = " $(TARG) >> $(MF)
137 @ echo "GCC_BASE = " $(GCC_BASE) >> $(MF) ; echo "CPU_FAM = " $(CPU_FAM) >> $(MF)
138 @ cat ../../Makefile.defaults ../Makefile.target >> $(MF)
139 @ $(CC) -M $(SRCS) | sed >> $(MF) \
140 -e '/\.\.\/\.\.\/\.\.\/share\/epicsH/s||\$$\(TISH\)|g' \
141 -e '/\.\.\/\.\.\/\.\.\/share\/vw$(GCC_BASE)\/h/s||\$$\(STDH\)|g' \
142 -e '/\.\.\/\.\.\/\.\.\/share\/src\/$(CUR)/s||\$$\(SRC\)|g' \
143 # ---
144 #
145 # END of Makefile.defaults
146 #

  ViewVC Help
Powered by ViewVC 1.1.30