4 # © 1998 Straylight/Edgeware
7 #----- Licensing note -------------------------------------------------------
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)
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.
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.
23 #----- Compilation flags ----------------------------------------------------
25 # --- Uncomment to use the C4 tools ---
29 # --- C compilation ---
31 CC = $(OLD)cc -c -o $@
32 CFLAGS = -depend !Depend -throwback -ffah -Ilibs: -IC:
33 COMPILE = $(CC) $(CFLAGS)
37 AS = $(OLD)objasm -quit -to $@
38 ASFLAGS = -stamp -depend !Depend -throwback
39 ASSEMBLE = $(AS) $(ASFLAGS) -from
47 LD_UTIL = $(LD) -bin -base 0
48 LD_MOD = $(LD) -bin -base 0
49 LD_BIN = $(LD) -bin -base 0
53 # --- Making libraries ---
59 # --- Setting file types ---
61 SET_APP = SetType $@ FF8
62 SET_MOD = SetType $@ FFA
63 SET_UTIL = SetType $@ FFC
64 SET_DLL = SetType $@ FFD
66 # --- Other maintenance things ---
72 DATE = %zdy %mo %ce%yr
73 MODDATE = %dy %m3 %ce%yr
74 CRIGHT = © %ce%yr Straylight
77 #----- Default rules --------------------------------------------------------
79 .SUFFIXES: .o .c .s .bs
87 #----- Object files ---------------------------------------------------------
89 STUBS = o.astubs o.asstubs o.mstubs o.msstubs o.dstubs
91 STUB_ENTRY = o.xentry o.xentry_swi o.xsmall o.xsmall_swi
92 STUB_PERSONALITY = o.xapp o.xdll o.xmodule
93 STUB_OTHER = o.xcommon o.xdata
95 #----- Compiling things -----------------------------------------------------
97 all: o.rdump o.swiv $(STUBS)
100 # --- The `rdump' library ---
103 $(AR) -c o.rdump o._rdump
107 # --- Various flavours of C library stubs ---
109 ASTUBS_OBJ = o.xapp o.xsmall $(STUB_OTHER)
110 o.astubs: $(ASTUBS_OBJ)
111 $(LD_AOF) $(ASTUBS_OBJ)
114 ASSTUBS_OBJ = o.xapp o.xsmall_swi $(STUB_OTHER)
115 o.asstubs: $(ASSTUBS_OBJ)
116 $(LD_AOF) $(ASSTUBS_OBJ)
119 DSTUBS_OBJ = o.xdll o.xentry
120 o.dstubs: $(DSTUBS_OBJ)
121 $(LD_AOF) $(DSTUBS_OBJ)
124 MSTUBS_OBJ = o.xmodule o.xentry $(STUB_OTHER)
125 o.mstubs: $(MSTUBS_OBJ)
126 $(LD_AOF) $(MSTUBS_OBJ)
129 MSSTUBS_OBJ = o.xmodule o.xentry_swi $(STUB_OTHER)
130 o.msstubs: $(MSSTUBS_OBJ)
131 $(LD_AOF) $(MSSTUBS_OBJ)
134 # --- Installation ---
137 submake *.Makefile -- install
139 # --- Cleaning up ---
143 submake *.Makefile -- clean
145 #----- Dynamic dependencies -------------------------------------------------
147 # Dynamic dependencies:
151 o.xsmall_swi: s.xentry
152 o.xmodule: libs:header
154 o.xentry_swi: s.xentry
155 o.xcommon: libs:header
158 o._rdump: libs:header
163 o.swiv: libs:s.swihack