1 |
+ |
# $Id$ |
2 |
|
# MacOS X makefile for Basilisk II. Slightly based on the Unix one |
3 |
|
|
4 |
|
## System specific configuration |
10 |
|
CXX = @CXX@ |
11 |
|
CFLAGS = @CFLAGS@ |
12 |
|
CXXFLAGS = @CXXFLAGS@ |
13 |
< |
CPPFLAGS = @CPPFLAGS@ -I../include -I. -I../uae_cpu |
13 |
> |
CPPFLAGS = @CPPFLAGS@ -I../include -I. @CPUINCLUDES@ |
14 |
|
DEFS = @DEFS@ @DEFINES@ -D_REENTRANT |
15 |
|
LDFLAGS = @LDFLAGS@ |
16 |
|
LIBS = @LIBS@ |
17 |
|
|
18 |
|
## Files |
19 |
|
OBJ_DIR = build |
20 |
< |
GENSRCS = user_strings_unix.h cpudefs.cpp cpuemu.cpp cpustbl.cpp cputbl.h \ |
21 |
< |
README.txt |
20 |
> |
GENSRCS = cpudefs.cpp cpuemu.cpp cpustbl.cpp cputbl.h |
21 |
> |
|
22 |
> |
# Wrappers which split the very large cpuemu.cpp into smaller compile units |
23 |
> |
GENEMUS = cpuemu1.cpp cpuemu2.cpp cpuemu3.cpp cpuemu4.cpp \ |
24 |
> |
cpuemu5.cpp cpuemu6.cpp cpuemu7.cpp cpuemu8.cpp |
25 |
> |
|
26 |
> |
# Symlinks to files in other directories |
27 |
> |
GENLINK = README.txt INSTALL.txt install-sh \ |
28 |
> |
config.guess config.sub \ |
29 |
> |
sys_unix.cpp timer_unix.cpp user_strings_unix.h |
30 |
> |
|
31 |
> |
GEN = $(GENEMUS) $(GENSRCS) |
32 |
> |
|
33 |
|
SRCS = BasiliskII.icns Controller.h Controller.mm Credits.html \ |
34 |
|
Emulator.h Emulator.mm EmulatorView.h EmulatorView.mm English.lproj \ |
35 |
|
NNThread.h NNThread.m PrefsEditor.h PrefsEditor.mm \ |
36 |
|
ToDo.html Versions.html \ |
37 |
< |
audio_macosx.cpp extfs_macosx.mm macos_util_macosx.h main_macosx.h \ |
37 |
> |
audio_macosx.mm extfs_macosx.mm macos_util_macosx.h main_macosx.h \ |
38 |
|
main_macosx.mm misc_macosx.h misc_macosx.mm prefs_macosx.cpp \ |
39 |
|
sysdeps.h video_macosx.mm video_macosx.h |
40 |
|
APP = $(OBJ_DIR)/BasiliskII.app |
47 |
|
|
48 |
|
all: $(APP) |
49 |
|
|
50 |
< |
ide: $(OBJ_DIR) $(GENSRCS) $(SRCS) |
50 |
> |
ide: $(OBJ_DIR) $(GEN) $(SRCS) |
51 |
|
open BasiliskII.pbproj |
52 |
|
|
53 |
|
test: $(APP) |
57 |
|
@[ -d $(OBJ_DIR) ] || mkdir $(OBJ_DIR) > /dev/null 2>&1 |
58 |
|
|
59 |
|
|
60 |
< |
$(APP): $(OBJ_DIR) $(GENSRCS) $(SRCS) |
61 |
< |
pbxbuild -buildstyle Deployment |
62 |
< |
# pbxbuild |
60 |
> |
$(APP): $(OBJ_DIR) $(GEN) $(SRCS) |
61 |
> |
pbxbuild -buildstyle Deployment || rm -fr $(APP) |
62 |
> |
# pbxbuild || rm -fr $(APP) |
63 |
|
|
64 |
< |
README.txt : ../../README |
65 |
< |
ln -s $< $@ |
54 |
< |
|
55 |
< |
user_strings_unix.h : ../Unix/user_strings_unix.h |
56 |
< |
ln -s $< $@ |
64 |
> |
BasiliskII.icns : |
65 |
> |
touch $@ |
66 |
|
|
67 |
|
mostlyclean: |
68 |
|
rm -fr English.lproj/*~* $(OBJ_DIR)/* core* *.core *~ *.bak |
69 |
|
|
70 |
|
clean: mostlyclean |
71 |
< |
rm -f $(GENSRCS) |
71 |
> |
rm -f $(GEN) |
72 |
|
rm -f cpudefs.cpp cputmp*.s cpufast*.s cpustbl.cpp |
73 |
|
|
74 |
|
distclean: clean |
75 |
|
rm -fr $(OBJ_DIR) |
76 |
< |
rm -f config.cache config.log config.status config.h |
76 |
> |
rm -fr $(GENLINK) |
77 |
> |
rm -f config.cache config.log config.status config.h config.h.in |
78 |
|
rm -f configure |
79 |
|
rm -f Makefile |
80 |
|
|
87 |
|
$(OBJ_DIR)/cpuopti: ../uae_cpu/cpuopti.c |
88 |
|
$(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(LDFLAGS) $< -o $@ |
89 |
|
|
90 |
< |
#$(OBJ_DIR)/gencpu: cpudefs.cpp ../uae_cpu/gencpu.c ../uae_cpu/readcpu.cpp |
91 |
< |
# $(CXX) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(CXXFLAGS) $(LDFLAGS) $< -o $@ |
82 |
< |
|
83 |
< |
$(OBJ_DIR)/gencpu: $(OBJ_DIR)/gencpu.o $(OBJ_DIR)/readcpu.o $(OBJ_DIR)/cpudefs.o |
84 |
< |
$(CC) $(LDFLAGS) $^ -o $@ |
90 |
> |
$(OBJ_DIR)/gencpu: cpudefs.cpp ../uae_cpu/gencpu.c ../uae_cpu/readcpu.cpp |
91 |
> |
$(CXX) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(CXXFLAGS) $(LDFLAGS) $^ -o $@ |
92 |
|
|
86 |
– |
$(OBJ_DIR)/gencpu.o : ../uae_cpu/gencpu.c |
87 |
– |
$(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $< -o $@ |
88 |
– |
|
89 |
– |
$(OBJ_DIR)/readcpu.o: ../uae_cpu/readcpu.cpp |
90 |
– |
$(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@ |
91 |
– |
|
92 |
– |
$(OBJ_DIR)/cpudefs.o: cpudefs.cpp |
93 |
– |
$(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@ |
93 |
|
|
94 |
|
|
95 |
|
cpudefs.cpp: $(OBJ_DIR)/build68k ../uae_cpu/table68k |
99 |
|
$< |
100 |
|
|
101 |
|
|
102 |
< |
$(OBJ_DIR)/cpuemu1.o: cpuemu.cpp |
103 |
< |
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_1 $(CXXFLAGS) -c $< -o $@ |
104 |
< |
$(OBJ_DIR)/cpuemu2.o: cpuemu.cpp |
105 |
< |
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_2 $(CXXFLAGS) -c $< -o $@ |
106 |
< |
$(OBJ_DIR)/cpuemu3.o: cpuemu.cpp |
107 |
< |
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_3 $(CXXFLAGS) -c $< -o $@ |
108 |
< |
$(OBJ_DIR)/cpuemu4.o: cpuemu.cpp |
109 |
< |
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_4 $(CXXFLAGS) -c $< -o $@ |
110 |
< |
$(OBJ_DIR)/cpuemu5.o: cpuemu.cpp |
111 |
< |
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_5 $(CXXFLAGS) -c $< -o $@ |
112 |
< |
$(OBJ_DIR)/cpuemu6.o: cpuemu.cpp |
113 |
< |
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_6 $(CXXFLAGS) -c $< -o $@ |
115 |
< |
$(OBJ_DIR)/cpuemu7.o: cpuemu.cpp |
116 |
< |
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_7 $(CXXFLAGS) -c $< -o $@ |
117 |
< |
$(OBJ_DIR)/cpuemu8.o: cpuemu.cpp |
118 |
< |
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_8 $(CXXFLAGS) -c $< -o $@ |
119 |
< |
|
120 |
< |
cpuemu1.cpp: cpuemu.cpp |
121 |
< |
$(CXX) -E -DPART_1 $< >$@ |
122 |
< |
cpuemu2.cpp: cpuemu.cpp |
123 |
< |
$(CXX) -E -DPART_2 $< >$@ |
124 |
< |
cpuemu3.cpp: cpuemu.cpp |
125 |
< |
$(CXX) -E -DPART_3 $< >$@ |
126 |
< |
cpuemu4.cpp: cpuemu.cpp |
127 |
< |
$(CXX) -E -DPART_4 $< >$@ |
128 |
< |
cpuemu5.cpp: cpuemu.cpp |
129 |
< |
$(CXX) -E -DPART_5 $< >$@ |
130 |
< |
cpuemu6.cpp: cpuemu.cpp |
131 |
< |
$(CXX) -E -DPART_6 $< >$@ |
132 |
< |
cpuemu7.cpp: cpuemu.cpp |
133 |
< |
$(CXX) -E -DPART_7 $< >$@ |
134 |
< |
cpuemu8.cpp: cpuemu.cpp |
135 |
< |
$(CXX) -E -DPART_8 $< >$@ |
136 |
< |
|
137 |
< |
|
138 |
< |
cpufast.s: cpuemu.cpp $(OBJ_DIR)/cpuopti |
139 |
< |
$(CXX) $(CPPFLAGS) $(DEFS) -S $(CXXFLAGS) $< -o cputmp.s |
140 |
< |
$(OBJ_DIR)/cpuopti <cputmp.s >$@ || mv cputmp.s $@ |
141 |
< |
rm -f cputmp.s |
142 |
< |
cpufast1.s: cpuemu.cpp $(OBJ_DIR)/cpuopti |
143 |
< |
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_1 -S $(CXXFLAGS) $< -o cputmp1.s |
144 |
< |
$(OBJ_DIR)/cpuopti <cputmp1.s >$@ || mv cputmp1.s $@ |
145 |
< |
rm -f cputmp1.s |
146 |
< |
cpufast2.s: cpuemu.cpp $(OBJ_DIR)/cpuopti |
147 |
< |
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_2 -S $(CXXFLAGS) $< -o cputmp2.s |
148 |
< |
$(OBJ_DIR)/cpuopti <cputmp2.s >$@ || mv cputmp2.s $@ |
149 |
< |
rm -f cputmp2.s |
150 |
< |
cpufast3.s: cpuemu.cpp $(OBJ_DIR)/cpuopti |
151 |
< |
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_3 -S $(CXXFLAGS) $< -o cputmp3.s |
152 |
< |
$(OBJ_DIR)/cpuopti <cputmp3.s >$@ || mv cputmp3.s $@ |
153 |
< |
rm -f cputmp3.s |
154 |
< |
cpufast4.s: cpuemu.cpp $(OBJ_DIR)/cpuopti |
155 |
< |
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_4 -S $(CXXFLAGS) $< -o cputmp4.s |
156 |
< |
$(OBJ_DIR)/cpuopti <cputmp4.s >$@ || mv cputmp4.s $@ |
157 |
< |
rm -f cputmp4.s |
158 |
< |
cpufast5.s: cpuemu.cpp $(OBJ_DIR)/cpuopti |
159 |
< |
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_5 -S $(CXXFLAGS) $< -o cputmp5.s |
160 |
< |
$(OBJ_DIR)/cpuopti <cputmp5.s >$@ || mv cputmp5.s $@ |
161 |
< |
rm -f cputmp5.s |
162 |
< |
cpufast6.s: cpuemu.cpp $(OBJ_DIR)/cpuopti |
163 |
< |
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_6 -S $(CXXFLAGS) $< -o cputmp6.s |
164 |
< |
$(OBJ_DIR)/cpuopti <cputmp6.s >$@ || mv cputmp6.s $@ |
165 |
< |
rm -f cputmp6.s |
166 |
< |
cpufast7.s: cpuemu.cpp $(OBJ_DIR)/cpuopti |
167 |
< |
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_7 -S $(CXXFLAGS) $< -o cputmp7.s |
168 |
< |
$(OBJ_DIR)/cpuopti <cputmp7.s >$@ || mv cputmp7.s $@ |
169 |
< |
rm -f cputmp7.s |
170 |
< |
cpufast8.s: cpuemu.cpp $(OBJ_DIR)/cpuopti |
171 |
< |
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_8 -S $(CXXFLAGS) $< -o cputmp8.s |
172 |
< |
$(OBJ_DIR)/cpuopti <cputmp8.s >$@ || mv cputmp8.s $@ |
173 |
< |
rm -f cputmp8.s |
102 |
> |
$(GENEMUS) : cpuemu.cpp |
103 |
> |
for i in 1 2 3 4 5 6 7 8; \ |
104 |
> |
do \ |
105 |
> |
printf "#define PART_%d\n#include \"%s\"\n" $$i $< >cpuemu$$i.cpp; \ |
106 |
> |
done |
107 |
> |
|
108 |
> |
|
109 |
> |
cpufast.s: cpuemu.s $(OBJ_DIR)/cpuopti |
110 |
> |
$(OBJ_DIR)/cpuopti <cpuemu.s >$@ || mv cputmp.s $@ |
111 |
> |
|
112 |
> |
cpuemu.s: cpuemu.cpp |
113 |
> |
$(CXX) $(CPPFLAGS) $(DEFS) -S $(CXXFLAGS) $< -o $@ |
114 |
|
|
115 |
|
#------------------------------------------------------------------------- |
116 |
|
# DO NOT DELETE THIS LINE -- make depend depends on it. |