1 |
cebix |
1.1 |
# Unix makefile for Basilisk II |
2 |
|
|
|
3 |
|
|
## System specific configuration |
4 |
|
|
@SET_MAKE@ |
5 |
cebix |
1.9 |
SHELL = /bin/sh |
6 |
cebix |
1.3 |
|
7 |
cebix |
1.6 |
prefix = @prefix@ |
8 |
|
|
exec_prefix = @exec_prefix@ |
9 |
|
|
bindir = @bindir@ |
10 |
|
|
datadir = @datadir@ |
11 |
|
|
mandir = @mandir@ |
12 |
|
|
man1dir = $(mandir)/man1 |
13 |
cebix |
1.3 |
|
14 |
gbeauche |
1.31 |
KEYCODES = @KEYCODES@ |
15 |
|
|
|
16 |
cebix |
1.18 |
DESTDIR = |
17 |
|
|
|
18 |
cebix |
1.1 |
CC = @CC@ |
19 |
|
|
CXX = @CXX@ |
20 |
|
|
CFLAGS = @CFLAGS@ |
21 |
|
|
CXXFLAGS = @CXXFLAGS@ |
22 |
gbeauche |
1.34 |
CPPFLAGS = @CPPFLAGS@ -I../include -I. @CPUINCLUDES@ -I../slirp |
23 |
cebix |
1.6 |
DEFS = @DEFS@ @DEFINES@ -D_REENTRANT -DDATADIR=\"$(datadir)/$(APP)\" |
24 |
cebix |
1.1 |
LDFLAGS = @LDFLAGS@ |
25 |
|
|
LIBS = @LIBS@ |
26 |
|
|
SYSSRCS = @SYSSRCS@ |
27 |
|
|
CPUSRCS = @CPUSRCS@ |
28 |
gbeauche |
1.26 |
BLESS = @BLESS@ |
29 |
gbeauche |
1.32 |
EXEEXT = @EXEEXT@ |
30 |
cebix |
1.3 |
INSTALL = @INSTALL@ |
31 |
|
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@ -s |
32 |
|
|
INSTALL_DATA = @INSTALL_DATA@ |
33 |
cebix |
1.1 |
|
34 |
gbeauche |
1.34 |
SLIRP_CFLAGS = @SLIRP_CFLAGS@ |
35 |
gbeauche |
1.36 |
SLIRP_SRCS = @SLIRP_SRCS@ |
36 |
gbeauche |
1.34 |
SLIRP_OBJS = $(SLIRP_SRCS:../slirp/%.c=obj/%.o) |
37 |
|
|
|
38 |
gbeauche |
1.41 |
STANDALONE_GUI = @STANDALONE_GUI@ |
39 |
gbeauche |
1.42 |
GUI_CFLAGS = @GUI_CFLAGS@ |
40 |
|
|
GUI_LIBS = @GUI_LIBS@ |
41 |
gbeauche |
1.41 |
GUI_SRCS = ../prefs.cpp prefs_unix.cpp prefs_editor_gtk.cpp ../prefs_items.cpp \ |
42 |
gbeauche |
1.42 |
../user_strings.cpp user_strings_unix.cpp xpram_unix.cpp sys_unix.cpp rpc_unix.cpp |
43 |
gbeauche |
1.41 |
|
44 |
cebix |
1.1 |
## Files |
45 |
cebix |
1.17 |
SRCS = ../main.cpp main_unix.cpp ../prefs.cpp ../prefs_items.cpp prefs_unix.cpp \ |
46 |
|
|
sys_unix.cpp ../rom_patches.cpp ../slot_rom.cpp ../rsrc_patches.cpp \ |
47 |
|
|
../emul_op.cpp ../macos_util.cpp ../xpram.cpp xpram_unix.cpp ../timer.cpp \ |
48 |
gbeauche |
1.30 |
timer_unix.cpp ../adb.cpp ../serial.cpp ../ether.cpp \ |
49 |
gbeauche |
1.20 |
../sony.cpp ../disk.cpp ../cdrom.cpp ../scsi.cpp ../video.cpp video_blit.cpp \ |
50 |
gbeauche |
1.35 |
vm_alloc.cpp sigsegv.cpp ../audio.cpp ../extfs.cpp \ |
51 |
gbeauche |
1.42 |
../user_strings.cpp user_strings_unix.cpp sshpty.c strlcpy.c rpc_unix.cpp \ |
52 |
gbeauche |
1.34 |
$(SYSSRCS) $(CPUSRCS) $(SLIRP_SRCS) |
53 |
cebix |
1.1 |
APP = BasiliskII |
54 |
gbeauche |
1.40 |
APP_APP = $(APP).app |
55 |
cebix |
1.1 |
|
56 |
gbeauche |
1.41 |
PROGS = $(APP)$(EXEEXT) |
57 |
|
|
ifeq ($(STANDALONE_GUI),yes) |
58 |
|
|
GUI_APP = BasiliskIIGUI |
59 |
|
|
PROGS += $(GUI_APP)$(EXEEXT) |
60 |
gbeauche |
1.42 |
else |
61 |
|
|
CXXFLAGS += $(GUI_CFLAGS) |
62 |
|
|
LIBS += $(GUI_LIBS) |
63 |
gbeauche |
1.41 |
endif |
64 |
|
|
|
65 |
cebix |
1.1 |
## Rules |
66 |
cebix |
1.18 |
.PHONY: modules install installdirs uninstall mostlyclean clean distclean depend dep |
67 |
cebix |
1.9 |
.SUFFIXES: |
68 |
|
|
.SUFFIXES: .c .cpp .s .o .h |
69 |
cebix |
1.2 |
|
70 |
gbeauche |
1.41 |
all: $(PROGS) |
71 |
cebix |
1.1 |
|
72 |
|
|
OBJ_DIR = obj |
73 |
|
|
$(OBJ_DIR):: |
74 |
|
|
@[ -d $(OBJ_DIR) ] || mkdir $(OBJ_DIR) > /dev/null 2>&1 |
75 |
|
|
|
76 |
|
|
define SRCS_LIST_TO_OBJS |
77 |
|
|
$(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(foreach file, $(SRCS), \ |
78 |
|
|
$(basename $(notdir $(file)))))) |
79 |
|
|
endef |
80 |
|
|
OBJS = $(SRCS_LIST_TO_OBJS) |
81 |
|
|
|
82 |
gbeauche |
1.41 |
define GUI_SRCS_LIST_TO_OBJS |
83 |
gbeauche |
1.42 |
$(addprefix $(OBJ_DIR)/, $(addsuffix .go, $(foreach file, $(GUI_SRCS), \ |
84 |
gbeauche |
1.41 |
$(basename $(notdir $(file)))))) |
85 |
|
|
endef |
86 |
|
|
GUI_OBJS = $(GUI_SRCS_LIST_TO_OBJS) |
87 |
|
|
|
88 |
cebix |
1.1 |
SRC_PATHS += $(sort $(foreach file, $(SRCS), $(dir $(file)))) |
89 |
|
|
VPATH := |
90 |
|
|
VPATH += $(addprefix :, $(subst ,:, $(filter-out $($(subst, :, ,$(VPATH))), $(SRC_PATHS)))) |
91 |
|
|
|
92 |
gbeauche |
1.32 |
$(APP)$(EXEEXT): $(OBJ_DIR) $(OBJS) |
93 |
gbeauche |
1.41 |
$(CXX) -o $@ $(LDFLAGS) $(OBJS) $(LIBS) |
94 |
gbeauche |
1.32 |
$(BLESS) $(APP)$(EXEEXT) |
95 |
cebix |
1.1 |
|
96 |
gbeauche |
1.41 |
$(GUI_APP)$(EXEEXT): $(OBJ_DIR) $(GUI_OBJS) |
97 |
gbeauche |
1.42 |
$(CXX) -o $@ $(LDFLAGS) $(GUI_OBJS) $(LIBS) $(GUI_LIBS) |
98 |
gbeauche |
1.41 |
|
99 |
gbeauche |
1.40 |
$(APP)_app: $(APP) ../MacOSX/Info.plist ../MacOSX/$(APP).icns |
100 |
|
|
mkdir -p $(APP_APP)/Contents |
101 |
|
|
cp -f ../MacOSX/Info.plist $(APP_APP)/Contents/ |
102 |
|
|
echo -n 'APPL????' > $(APP_APP)/Contents/PkgInfo |
103 |
|
|
mkdir -p $(APP_APP)/Contents/MacOS |
104 |
|
|
cp -f $(APP) $(APP_APP)/Contents/MacOS/ |
105 |
|
|
strip $(APP_APP)/Contents/MacOS/$(APP) |
106 |
|
|
mkdir -p $(APP_APP)/Contents/Resources |
107 |
|
|
cp -f ../MacOSX/$(APP).icns $(APP_APP)/Contents/Resources/ |
108 |
|
|
|
109 |
cebix |
1.1 |
modules: |
110 |
cebix |
1.2 |
cd Linux/NetDriver; make |
111 |
cebix |
1.1 |
|
112 |
gbeauche |
1.41 |
install: $(PROGS) installdirs |
113 |
gbeauche |
1.32 |
$(INSTALL_PROGRAM) $(APP)$(EXEEXT) $(DESTDIR)$(bindir)/$(APP)$(EXEEXT) |
114 |
gbeauche |
1.41 |
if test -f "$(GUI_APP)$(EXEEXT)"; then \ |
115 |
|
|
$(INSTALL_PROGRAM) $(GUI_APP)$(EXEEXT) $(DESTDIR)$(bindir)/$(GUI_APP)$(EXEEXT); \ |
116 |
|
|
fi |
117 |
cebix |
1.18 |
-$(INSTALL_DATA) $(APP).1 $(DESTDIR)$(man1dir)/$(APP).1 |
118 |
gbeauche |
1.31 |
$(INSTALL_DATA) $(KEYCODES) $(DESTDIR)$(datadir)/$(APP)/keycodes |
119 |
cebix |
1.18 |
$(INSTALL_DATA) fbdevices $(DESTDIR)$(datadir)/$(APP)/fbdevices |
120 |
gbeauche |
1.28 |
$(INSTALL_DATA) tunconfig $(DESTDIR)$(datadir)/$(APP)/tunconfig |
121 |
cebix |
1.14 |
|
122 |
|
|
installdirs: |
123 |
cebix |
1.19 |
$(SHELL) mkinstalldirs $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir) $(DESTDIR)$(datadir)/$(APP) |
124 |
cebix |
1.5 |
|
125 |
|
|
uninstall: |
126 |
gbeauche |
1.32 |
rm -f $(DESTDIR)$(bindir)/$(APP)$(EXEEXT) |
127 |
gbeauche |
1.41 |
rm -f $(DESTDIR)$(bindir)/$(GUI_APP)$(EXEEXT) |
128 |
cebix |
1.18 |
rm -f $(DESTDIR)$(man1dir)/$(APP).1 |
129 |
|
|
rm -f $(DESTDIR)$(datadir)/$(APP)/keycodes |
130 |
|
|
rm -f $(DESTDIR)$(datadir)/$(APP)/fbdevices |
131 |
gbeauche |
1.28 |
rm -f $(DESTDIR)$(datadir)/$(APP)/tunconfig |
132 |
cebix |
1.18 |
rmdir $(DESTDIR)$(datadir)/$(APP) |
133 |
cebix |
1.9 |
|
134 |
|
|
mostlyclean: |
135 |
gbeauche |
1.41 |
rm -f $(PROGS) $(OBJ_DIR)/* core* *.core *~ *.bak |
136 |
cebix |
1.9 |
|
137 |
|
|
clean: mostlyclean |
138 |
gbeauche |
1.25 |
rm -f cpuemu.cpp cpudefs.cpp cputmp*.s cpufast*.s cpustbl.cpp cputbl.h compemu.cpp compstbl.cpp comptbl.h |
139 |
cebix |
1.1 |
|
140 |
|
|
distclean: clean |
141 |
cebix |
1.9 |
rm -rf $(OBJ_DIR) |
142 |
nigel |
1.27 |
rm -rf autom4te.cache |
143 |
cebix |
1.9 |
rm -f Makefile |
144 |
gbeauche |
1.39 |
rm -f config.cache config.log config.status config.h |
145 |
nigel |
1.27 |
rm -f Darwin/lowmem Darwin/pagezero |
146 |
cebix |
1.1 |
|
147 |
|
|
depend dep: |
148 |
cebix |
1.8 |
makedepend $(CPPFLAGS) -Y. $(SRCS) 2>/dev/null |
149 |
cebix |
1.1 |
|
150 |
gbeauche |
1.34 |
$(OBJ_DIR)/%.o : ../slirp/%.c |
151 |
gbeauche |
1.38 |
$(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(SLIRP_CFLAGS) -c $< -o $@ |
152 |
cebix |
1.1 |
$(OBJ_DIR)/%.o : %.c |
153 |
|
|
$(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $< -o $@ |
154 |
|
|
$(OBJ_DIR)/%.o : %.cpp |
155 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@ |
156 |
gbeauche |
1.37 |
$(OBJ_DIR)/%.o : %.mm |
157 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@ |
158 |
cebix |
1.1 |
$(OBJ_DIR)/%.o : %.s |
159 |
|
|
$(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $< -o $@ |
160 |
gbeauche |
1.42 |
$(OBJ_DIR)/%.go : %.cpp |
161 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) $(GUI_CFLAGS) -c $< -o $@ |
162 |
cebix |
1.1 |
|
163 |
gbeauche |
1.33 |
# Windows resources |
164 |
|
|
$(OBJ_DIR)/%.o: %.rc |
165 |
|
|
windres --include-dir ../Windows -i $< -o $@ |
166 |
|
|
|
167 |
gbeauche |
1.32 |
$(OBJ_DIR)/build68k$(EXEEXT): $(OBJ_DIR)/build68k.o |
168 |
|
|
$(CC) $(LDFLAGS) -o $(OBJ_DIR)/build68k$(EXEEXT) $(OBJ_DIR)/build68k.o |
169 |
|
|
$(OBJ_DIR)/gencpu$(EXEEXT): $(OBJ_DIR)/gencpu.o $(OBJ_DIR)/readcpu.o $(OBJ_DIR)/cpudefs.o |
170 |
|
|
$(CXX) $(LDFLAGS) -o $(OBJ_DIR)/gencpu$(EXEEXT) $(OBJ_DIR)/gencpu.o $(OBJ_DIR)/readcpu.o $(OBJ_DIR)/cpudefs.o |
171 |
|
|
$(OBJ_DIR)/gencomp$(EXEEXT): $(OBJ_DIR)/gencomp.o $(OBJ_DIR)/readcpu.o $(OBJ_DIR)/cpudefs.o |
172 |
|
|
$(CXX) $(LDFLAGS) -o $(OBJ_DIR)/gencomp$(EXEEXT) $(OBJ_DIR)/gencomp.o $(OBJ_DIR)/readcpu.o $(OBJ_DIR)/cpudefs.o |
173 |
gbeauche |
1.25 |
|
174 |
gbeauche |
1.32 |
cpudefs.cpp: $(OBJ_DIR)/build68k$(EXEEXT) ../uae_cpu/table68k |
175 |
|
|
$(OBJ_DIR)/build68k$(EXEEXT) <../uae_cpu/table68k >cpudefs.cpp |
176 |
cebix |
1.11 |
cpustbl.cpp: cpuemu.cpp |
177 |
gbeauche |
1.25 |
cpustbl_nf.cpp: cpustbl.cpp |
178 |
|
|
compstbl.cpp: compemu.cpp |
179 |
cebix |
1.11 |
cputbl.h: cpuemu.cpp |
180 |
gbeauche |
1.25 |
comptbl.h: compemu.cpp |
181 |
cebix |
1.11 |
|
182 |
gbeauche |
1.32 |
cpuemu.cpp: $(OBJ_DIR)/gencpu$(EXEEXT) |
183 |
|
|
$(OBJ_DIR)/gencpu$(EXEEXT) |
184 |
cebix |
1.11 |
|
185 |
gbeauche |
1.32 |
compemu.cpp: $(OBJ_DIR)/gencomp$(EXEEXT) |
186 |
|
|
$(OBJ_DIR)/gencomp$(EXEEXT) |
187 |
gbeauche |
1.25 |
|
188 |
|
|
$(OBJ_DIR)/cpustbl_nf.o: cpustbl.cpp |
189 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -DNOFLAGS -c $< -o $@ |
190 |
|
|
|
191 |
|
|
$(OBJ_DIR)/compemu_support.o: compemu_support.cpp comptbl.h |
192 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@ |
193 |
|
|
|
194 |
cebix |
1.11 |
$(OBJ_DIR)/cpuemu1.o: cpuemu.cpp |
195 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_1 $(CXXFLAGS) -c $< -o $@ |
196 |
|
|
$(OBJ_DIR)/cpuemu2.o: cpuemu.cpp |
197 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_2 $(CXXFLAGS) -c $< -o $@ |
198 |
|
|
$(OBJ_DIR)/cpuemu3.o: cpuemu.cpp |
199 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_3 $(CXXFLAGS) -c $< -o $@ |
200 |
|
|
$(OBJ_DIR)/cpuemu4.o: cpuemu.cpp |
201 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_4 $(CXXFLAGS) -c $< -o $@ |
202 |
|
|
$(OBJ_DIR)/cpuemu5.o: cpuemu.cpp |
203 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_5 $(CXXFLAGS) -c $< -o $@ |
204 |
|
|
$(OBJ_DIR)/cpuemu6.o: cpuemu.cpp |
205 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_6 $(CXXFLAGS) -c $< -o $@ |
206 |
|
|
$(OBJ_DIR)/cpuemu7.o: cpuemu.cpp |
207 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_7 $(CXXFLAGS) -c $< -o $@ |
208 |
|
|
$(OBJ_DIR)/cpuemu8.o: cpuemu.cpp |
209 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_8 $(CXXFLAGS) -c $< -o $@ |
210 |
|
|
|
211 |
gbeauche |
1.25 |
$(OBJ_DIR)/cpuemu1_nf.o: cpuemu.cpp |
212 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_1 -DNOFLAGS $(CXXFLAGS) -c $< -o $@ |
213 |
|
|
$(OBJ_DIR)/cpuemu2_nf.o: cpuemu.cpp |
214 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_2 -DNOFLAGS $(CXXFLAGS) -c $< -o $@ |
215 |
|
|
$(OBJ_DIR)/cpuemu3_nf.o: cpuemu.cpp |
216 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_3 -DNOFLAGS $(CXXFLAGS) -c $< -o $@ |
217 |
|
|
$(OBJ_DIR)/cpuemu4_nf.o: cpuemu.cpp |
218 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_4 -DNOFLAGS $(CXXFLAGS) -c $< -o $@ |
219 |
|
|
$(OBJ_DIR)/cpuemu5_nf.o: cpuemu.cpp |
220 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_5 -DNOFLAGS $(CXXFLAGS) -c $< -o $@ |
221 |
|
|
$(OBJ_DIR)/cpuemu6_nf.o: cpuemu.cpp |
222 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_6 -DNOFLAGS $(CXXFLAGS) -c $< -o $@ |
223 |
|
|
$(OBJ_DIR)/cpuemu7_nf.o: cpuemu.cpp |
224 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_7 -DNOFLAGS $(CXXFLAGS) -c $< -o $@ |
225 |
|
|
$(OBJ_DIR)/cpuemu8_nf.o: cpuemu.cpp |
226 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_8 -DNOFLAGS $(CXXFLAGS) -c $< -o $@ |
227 |
|
|
|
228 |
|
|
$(OBJ_DIR)/compemu1.o: compemu.cpp |
229 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_1 $(CXXFLAGS) -c $< -o $@ |
230 |
|
|
$(OBJ_DIR)/compemu2.o: compemu.cpp |
231 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_2 $(CXXFLAGS) -c $< -o $@ |
232 |
|
|
$(OBJ_DIR)/compemu3.o: compemu.cpp |
233 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_3 $(CXXFLAGS) -c $< -o $@ |
234 |
|
|
$(OBJ_DIR)/compemu4.o: compemu.cpp |
235 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_4 $(CXXFLAGS) -c $< -o $@ |
236 |
|
|
$(OBJ_DIR)/compemu5.o: compemu.cpp |
237 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_5 $(CXXFLAGS) -c $< -o $@ |
238 |
|
|
$(OBJ_DIR)/compemu6.o: compemu.cpp |
239 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_6 $(CXXFLAGS) -c $< -o $@ |
240 |
|
|
$(OBJ_DIR)/compemu7.o: compemu.cpp |
241 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_7 $(CXXFLAGS) -c $< -o $@ |
242 |
|
|
$(OBJ_DIR)/compemu8.o: compemu.cpp |
243 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_8 $(CXXFLAGS) -c $< -o $@ |
244 |
|
|
|
245 |
cebix |
1.1 |
#------------------------------------------------------------------------- |
246 |
|
|
# DO NOT DELETE THIS LINE -- make depend depends on it. |