chiark / gitweb /
Create readable text `.bas' for each tokenized BASIC `,ffb' file.
[ssr] / StraySrc / SDLS / cdll / Makefile,fe1
1 #
2 # Makefile
3 #
4 # © 1998 Straylight/Edgeware
5 #
6
7 #----- Licensing note -------------------------------------------------------
8 #
9 # This makefile is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 2, or (at your option)
12 # any later version.
13 #
14 # This makefile is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 # GNU General Public License for more details.
18 #
19 # You should have received a copy of the GNU General Public License
20 # along with this makefile.  If not, write to the Free Software Foundation,
21 # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22
23 #----- Compilation flags ----------------------------------------------------
24
25 # --- Uncomment to use the C4 tools ---
26
27 # OLD = o-
28
29 # --- C compilation ---
30
31 CC = $(OLD)cc -c -o $@
32 CFLAGS = -depend !Depend -throwback -ffah -Ilibs: -IC:
33 COMPILE = $(CC) $(CFLAGS)
34
35 # --- Assembling ---
36
37 AS = $(OLD)objasm -quit -to $@
38 ASFLAGS = -stamp -depend !Depend -throwback
39 ASSEMBLE = $(AS) $(ASFLAGS) -from
40
41 BAS = basasm
42
43 # --- Linking ---
44
45 LD = $(OLD)link -o $@
46 LD_APP = $(LD) -aif
47 LD_UTIL = $(LD) -bin -base 0
48 LD_MOD = $(LD) -bin -base 0
49 LD_BIN = $(LD) -bin -base 0
50 LD_DLL = $(LD) -rmf
51 LD_AOF = $(LD) -aof
52
53 # --- Making libraries ---
54
55 AR = $(OLD)libfile -o
56
57 CDLL = cdll
58
59 # --- Setting file types ---
60
61 SET_APP = SetType $@ FF8
62 SET_MOD = SetType $@ FFA
63 SET_UTIL = SetType $@ FFC
64 SET_DLL = SetType $@ FFD
65
66 # --- Other maintenance things ---
67
68 RM = ssrclean
69 INSTALL = inst
70 SETDATE = setdate
71 SQUEEZE = squeeze $@
72 DATE = %zdy %mo %ce%yr
73 MODDATE = %dy %m3 %ce%yr
74 CRIGHT = © %ce%yr Straylight
75 FIXLINK = fixlink $@
76
77 #----- Default rules --------------------------------------------------------
78
79 .SUFFIXES: .o .c .s .bs
80 .c.o:
81         $(COMPILE) $<
82 .s.o:
83         $(ASSEMBLE) $<
84 .bs.o:
85         $(BAS) $< $@
86
87 #----- Object files ---------------------------------------------------------
88
89 PROGS = cdll dissect
90
91 LIBS = libs:aof.o.aof libs:o.swiv libs:o.astubs
92
93 OBJS = \
94         o.dllbinder \
95         o.binding o.cstub o.extentry \
96         o.decode o.error o.readdef \
97         o.crc32 o.hashtable
98
99 VERSION = 1.09
100
101 #----- Compiling things -----------------------------------------------------
102
103 all: $(PROGS)
104
105 cdll: $(OBJS) $(LIBS)
106         $(SETDATE) \
107                 o.version \
108                 _time="$(VERSION) [$(DATE)]" \
109                 cright="$(CRIGHT)"
110         $(LD_APP) $(OBJS) $(LIBS) o.version
111         $(SQUEEZE)
112
113 dissect: o.dissect $(LIBS)
114         $(LD_APP) o.dissect $(LIBS)
115
116 install: $(PROGS)
117         $(INSTALL) $(PROGS) <SSR$BinDir>
118
119 clean:
120         -$(RM) o.* cdll
121
122 #----- Dynamic dependencies -------------------------------------------------
123
124 # Dynamic dependencies:
125 o.dllbinder:    c.dllbinder
126 o.dllbinder:    libs:h._time
127 o.dllbinder:    h.error
128 o.dllbinder:    h.hashtable
129 o.dllbinder:    h.decode
130 o.dllbinder:    h.readdef
131 o.dllbinder:    h.binding
132 o.dllbinder:    h.cstub
133 o.dllbinder:    h.extentry
134 o.binding:      c.binding
135 o.binding:      h.binding
136 o.binding:      h.readdef
137 o.binding:      h.hashtable
138 o.binding:      h.readdef
139 o.binding:      libs:aof.h.aof
140 o.binding:      libs:aof.h.chunk
141 o.binding:      h.hashtable
142 o.binding:      h.error
143 o.cstub:        c.cstub
144 o.cstub:        h.cstub
145 o.cstub:        h.readdef
146 o.cstub:        h.hashtable
147 o.cstub:        h.readdef
148 o.cstub:        libs:aof.h.aof
149 o.cstub:        libs:aof.h.chunk
150 o.cstub:        h.hashtable
151 o.cstub:        h.error
152 o.extentry:     c.extentry
153 o.extentry:     h.extentry
154 o.extentry:     h.readdef
155 o.extentry:     h.hashtable
156 o.extentry:     h.readdef
157 o.extentry:     libs:aof.h.aof
158 o.extentry:     libs:aof.h.chunk
159 o.extentry:     h.hashtable
160 o.extentry:     h.error
161 o.decode:       c.decode
162 o.decode:       h.decode
163 o.decode:       h.hashtable
164 o.decode:       libs:aof.h.chunk
165 o.decode:       libs:aof.h.aof
166 o.decode:       libs:aof.h.alf
167 o.decode:       h.error
168 o.error:        c.error
169 o.error:        h.error
170 o.readdef:      c.readdef
171 o.readdef:      h.hashtable
172 o.readdef:      h.error
173 o.readdef:      h.readdef
174 o.readdef:      libs:h.swiv
175 o.readdef:      c:h.kernel
176 o.readdef:      libs:h.swis
177 o.hashtable:    c.hashtable
178 o.hashtable:    h.hashtable
179 o.hashtable:    h.crc32
180 o.dissect:      c.dissect
181 o.dissect:      libs:aof.h.chunk
182 o.crc32: s.crc32
183 o.crc32: libs:header
184 o.crc32: libs:swis