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@ |
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 acconfig.h install-sh \ |
28 |
< |
config.guess config.sub user_strings_unix.h |
26 |
> |
# Symlinks to, or copies of, files in other directories |
27 |
> |
GENLINK = README.txt INSTALL.txt install-sh \ |
28 |
> |
Darwin config.guess config.sub \ |
29 |
> |
sys_unix.cpp timer_unix.cpp user_strings_unix.h |
30 |
|
|
31 |
< |
GEN = $(GENEMUS) $(GENSRCS) $(GENLINK) |
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 |
48 |
|
all: $(APP) |
49 |
|
|
50 |
|
ide: $(OBJ_DIR) $(GEN) $(SRCS) |
51 |
+ |
open BasiliskII.xcode |
52 |
+ |
|
53 |
+ |
oldide: $(OBJ_DIR) $(GEN) $(SRCS) |
54 |
|
open BasiliskII.pbproj |
55 |
|
|
56 |
|
test: $(APP) |
60 |
|
@[ -d $(OBJ_DIR) ] || mkdir $(OBJ_DIR) > /dev/null 2>&1 |
61 |
|
|
62 |
|
|
63 |
< |
$(APP): $(OBJ_DIR) $(GENSRCS) $(SRCS) |
64 |
< |
pbxbuild -buildstyle Deployment |
65 |
< |
# pbxbuild |
63 |
> |
$(APP): $(OBJ_DIR) $(GEN) $(SRCS) |
64 |
> |
pbxbuild -buildstyle Deployment || rm -fr $(APP) |
65 |
> |
# pbxbuild || rm -fr $(APP) |
66 |
|
|
67 |
|
BasiliskII.icns : |
68 |
|
touch $@ |
75 |
|
rm -f cpudefs.cpp cputmp*.s cpufast*.s cpustbl.cpp |
76 |
|
|
77 |
|
distclean: clean |
78 |
< |
rm -fr $(OBJ_DIR) |
79 |
< |
rm -f config.cache config.log config.status config.h |
75 |
< |
rm -f configure |
78 |
> |
rm -rf $(OBJ_DIR) |
79 |
> |
rm -rf autom4te.cache |
80 |
|
rm -f Makefile |
81 |
+ |
rm -f config.cache config.log config.status config.h config.h.in |
82 |
+ |
rm -f Darwin/lowmem Darwin/pagezero |
83 |
+ |
rm -f $(GENLINK) |
84 |
+ |
rm -f configure |
85 |
+ |
rm -f .DS_Store |
86 |
|
|
87 |
|
|
88 |
|
|
93 |
|
$(OBJ_DIR)/cpuopti: ../uae_cpu/cpuopti.c |
94 |
|
$(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(LDFLAGS) $< -o $@ |
95 |
|
|
96 |
< |
#$(OBJ_DIR)/gencpu: cpudefs.cpp ../uae_cpu/gencpu.c ../uae_cpu/readcpu.cpp |
97 |
< |
# $(CXX) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(CXXFLAGS) $(LDFLAGS) $< -o $@ |
89 |
< |
|
90 |
< |
$(OBJ_DIR)/gencpu: $(OBJ_DIR)/gencpu.o $(OBJ_DIR)/readcpu.o $(OBJ_DIR)/cpudefs.o |
91 |
< |
$(CC) $(LDFLAGS) $^ -o $@ |
92 |
< |
|
93 |
< |
$(OBJ_DIR)/gencpu.o : ../uae_cpu/gencpu.c |
94 |
< |
$(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $< -o $@ |
96 |
> |
$(OBJ_DIR)/gencpu: cpudefs.cpp ../uae_cpu/gencpu.c ../uae_cpu/readcpu.cpp |
97 |
> |
$(CXX) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(CXXFLAGS) $(LDFLAGS) $^ -o $@ |
98 |
|
|
96 |
– |
$(OBJ_DIR)/readcpu.o: ../uae_cpu/readcpu.cpp |
97 |
– |
$(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@ |
98 |
– |
|
99 |
– |
$(OBJ_DIR)/cpudefs.o: cpudefs.cpp |
100 |
– |
$(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@ |
99 |
|
|
100 |
|
|
101 |
|
cpudefs.cpp: $(OBJ_DIR)/build68k ../uae_cpu/table68k |
105 |
|
$< |
106 |
|
|
107 |
|
|
108 |
< |
cpuemu1.cpp: cpuemu.cpp |
109 |
< |
echo '#define PART_1' > $@ |
110 |
< |
echo '#include "$<"' >> $@ |
111 |
< |
cpuemu2.cpp: cpuemu.cpp |
112 |
< |
echo '#define PART_2' > $@ |
113 |
< |
echo '#include "$<"' >> $@ |
114 |
< |
cpuemu3.cpp: cpuemu.cpp |
115 |
< |
echo '#define PART_3' > $@ |
116 |
< |
echo '#include "$<"' >> $@ |
117 |
< |
cpuemu4.cpp: cpuemu.cpp |
118 |
< |
echo '#define PART_4' > $@ |
119 |
< |
echo '#include "$<"' >> $@ |
122 |
< |
cpuemu5.cpp: cpuemu.cpp |
123 |
< |
echo '#define PART_5' > $@ |
124 |
< |
echo '#include "$<"' >> $@ |
125 |
< |
cpuemu6.cpp: cpuemu.cpp |
126 |
< |
echo '#define PART_6' > $@ |
127 |
< |
echo '#include "$<"' >> $@ |
128 |
< |
cpuemu7.cpp: cpuemu.cpp |
129 |
< |
echo '#define PART_7' > $@ |
130 |
< |
echo '#include "$<"' >> $@ |
131 |
< |
cpuemu8.cpp: cpuemu.cpp |
132 |
< |
echo '#define PART_8' > $@ |
133 |
< |
echo '#include "$<"' >> $@ |
134 |
< |
|
135 |
< |
#cpuemu1.cpp: cpuemu.cpp |
136 |
< |
# $(CXX) $(CPPFLAGS) $(DEFS) -DPART_1 -E $< > $@ |
137 |
< |
#cpuemu2.cpp: cpuemu.cpp |
138 |
< |
# $(CXX) $(CPPFLAGS) $(DEFS) -DPART_2 -E $< > $@ |
139 |
< |
#cpuemu3.cpp: cpuemu.cpp |
140 |
< |
# $(CXX) $(CPPFLAGS) $(DEFS) -DPART_3 -E $< > $@ |
141 |
< |
#cpuemu4.cpp: cpuemu.cpp |
142 |
< |
# $(CXX) $(CPPFLAGS) $(DEFS) -DPART_4 -E $< > $@ |
143 |
< |
#cpuemu5.cpp: cpuemu.cpp |
144 |
< |
# $(CXX) $(CPPFLAGS) $(DEFS) -DPART_5 -E $< > $@ |
145 |
< |
#cpuemu6.cpp: cpuemu.cpp |
146 |
< |
# $(CXX) $(CPPFLAGS) $(DEFS) -DPART_6 -E $< > $@ |
147 |
< |
#cpuemu7.cpp: cpuemu.cpp |
148 |
< |
# $(CXX) $(CPPFLAGS) $(DEFS) -DPART_7 -E $< > $@ |
149 |
< |
#cpuemu8.cpp: cpuemu.cpp |
150 |
< |
# $(CXX) $(CPPFLAGS) $(DEFS) -DPART_8 -E $< > $@ |
151 |
< |
|
152 |
< |
|
153 |
< |
cpufast.s: cpuemu.cpp $(OBJ_DIR)/cpuopti |
154 |
< |
$(CXX) $(CPPFLAGS) $(DEFS) -S $(CXXFLAGS) $< -o cputmp.s |
155 |
< |
$(OBJ_DIR)/cpuopti <cputmp.s >$@ || mv cputmp.s $@ |
156 |
< |
rm -f cputmp.s |
157 |
< |
cpufast1.s: cpuemu.cpp $(OBJ_DIR)/cpuopti |
158 |
< |
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_1 -S $(CXXFLAGS) $< -o cputmp1.s |
159 |
< |
$(OBJ_DIR)/cpuopti <cputmp1.s >$@ || mv cputmp1.s $@ |
160 |
< |
rm -f cputmp1.s |
161 |
< |
cpufast2.s: cpuemu.cpp $(OBJ_DIR)/cpuopti |
162 |
< |
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_2 -S $(CXXFLAGS) $< -o cputmp2.s |
163 |
< |
$(OBJ_DIR)/cpuopti <cputmp2.s >$@ || mv cputmp2.s $@ |
164 |
< |
rm -f cputmp2.s |
165 |
< |
cpufast3.s: cpuemu.cpp $(OBJ_DIR)/cpuopti |
166 |
< |
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_3 -S $(CXXFLAGS) $< -o cputmp3.s |
167 |
< |
$(OBJ_DIR)/cpuopti <cputmp3.s >$@ || mv cputmp3.s $@ |
168 |
< |
rm -f cputmp3.s |
169 |
< |
cpufast4.s: cpuemu.cpp $(OBJ_DIR)/cpuopti |
170 |
< |
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_4 -S $(CXXFLAGS) $< -o cputmp4.s |
171 |
< |
$(OBJ_DIR)/cpuopti <cputmp4.s >$@ || mv cputmp4.s $@ |
172 |
< |
rm -f cputmp4.s |
173 |
< |
cpufast5.s: cpuemu.cpp $(OBJ_DIR)/cpuopti |
174 |
< |
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_5 -S $(CXXFLAGS) $< -o cputmp5.s |
175 |
< |
$(OBJ_DIR)/cpuopti <cputmp5.s >$@ || mv cputmp5.s $@ |
176 |
< |
rm -f cputmp5.s |
177 |
< |
cpufast6.s: cpuemu.cpp $(OBJ_DIR)/cpuopti |
178 |
< |
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_6 -S $(CXXFLAGS) $< -o cputmp6.s |
179 |
< |
$(OBJ_DIR)/cpuopti <cputmp6.s >$@ || mv cputmp6.s $@ |
180 |
< |
rm -f cputmp6.s |
181 |
< |
cpufast7.s: cpuemu.cpp $(OBJ_DIR)/cpuopti |
182 |
< |
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_7 -S $(CXXFLAGS) $< -o cputmp7.s |
183 |
< |
$(OBJ_DIR)/cpuopti <cputmp7.s >$@ || mv cputmp7.s $@ |
184 |
< |
rm -f cputmp7.s |
185 |
< |
cpufast8.s: cpuemu.cpp $(OBJ_DIR)/cpuopti |
186 |
< |
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_8 -S $(CXXFLAGS) $< -o cputmp8.s |
187 |
< |
$(OBJ_DIR)/cpuopti <cputmp8.s >$@ || mv cputmp8.s $@ |
188 |
< |
rm -f cputmp8.s |
108 |
> |
$(GENEMUS) : cpuemu.cpp |
109 |
> |
for i in 1 2 3 4 5 6 7 8; \ |
110 |
> |
do \ |
111 |
> |
printf "#define PART_%d\n#include \"%s\"\n" $$i $< >cpuemu$$i.cpp; \ |
112 |
> |
done |
113 |
> |
|
114 |
> |
|
115 |
> |
cpufast.s: cpuemu.s $(OBJ_DIR)/cpuopti |
116 |
> |
$(OBJ_DIR)/cpuopti <cpuemu.s >$@ || mv cputmp.s $@ |
117 |
> |
|
118 |
> |
cpuemu.s: cpuemu.cpp |
119 |
> |
$(CXX) $(CPPFLAGS) $(DEFS) -S $(CXXFLAGS) $< -o $@ |
120 |
|
|
121 |
|
#------------------------------------------------------------------------- |
122 |
|
# DO NOT DELETE THIS LINE -- make depend depends on it. |