ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/MacOSX/Makefile.in
Revision: 1.28
Committed: 2007-11-01T15:33:22Z (16 years, 7 months ago) by gbeauche
Branch: MAIN
Changes since 1.27: +1 -1 lines
Log Message:
Rewrite ExtFS support for MacOS X. This implementation uses xattrs (metadata)
on Tiger+ to store FInfo and FXInfo. Otherwise, plain old .finfo/ helpers are
used. "Safe" flags and fields are always synchronized to/from MacOS X.

BTW, CFString leak was fixed at the same time.

File Contents

# Content
1 # Unix makefile for Basilisk II
2
3 ## System specific configuration
4 SHELL = /bin/sh
5
6 HOST_CC = @CC@
7 HOST_CXX = @CXX@
8 CC_PROG = @CC@
9 CXX_PROG = @CXX@
10 CFLAGS = @CFLAGS@ -g
11 CXXFLAGS = @CXXFLAGS@ -g
12 CPPFLAGS = @CPPFLAGS@ -I../include -I. -I../uae_cpu
13 DEFS = @DEFS@ @DEFINES@ -D_REENTRANT -DAQUA -DFPU_IEEE
14 LDFLAGS = @LDFLAGS@
15 LIBS = @LIBS@
16 MONSRCS = @MONSRCS@
17 LN_S = ln -s
18
19 ## Compilers selection (XXX hackery for 10.2 cross-compilation...)
20 SDK_VERSION.ppc = @PPC_SDK_VERSION@
21 SDK_VERSION = $(SDK_VERSION.$(ARCH))
22 ifeq ($(SDK_VERSION), 10.2.8)
23 CC_PROG = gcc-3.3
24 CXX_PROG = g++-3.3
25 SDK_ROOT = /Developer/SDKs/MacOSX10.2.8.sdk
26 CC_ROOT = -F$(SDK_ROOT)/System/Library/Frameworks
27 LDFLAGS += -Wl,-syslibroot,$(SDK_ROOT)
28 endif
29 ifeq ($(SDK_VERSION), 10.3.9)
30 CC_ROOT = -isysroot /Developer/SDKs/MacOSX10.3.9.sdk -mmacosx-version-min=10.3
31 endif
32 ifeq ($(SDK_VERSION), 10.4)
33 CC_ROOT = -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4
34 endif
35 CC = $(CC_PROG) $(CC_ROOT) -arch $(ARCH)
36 CXX = $(CXX_PROG) $(CC_ROOT) -arch $(ARCH)
37
38 ## slirp network emulation code
39 WANT_SLIRP = @WANT_SLIRP@
40 ifeq ($(WANT_SLIRP), yes)
41 CPPFLAGS += -I../slirp
42 SLIRP_CFLAGS = @SLIRP_CFLAGS@
43 SLIRP_SRCS = @SLIRP_SRCS@
44 SLIRP_OBJS = $(SLIRP_SRCS:../slirp/%.c=obj/%.o)
45 endif
46
47 ## CPU emulation code
48 WANT_JIT = @WANT_JIT@
49 WANT_JIT_DEBUG = @WANT_JIT_DEBUG@
50 USE_JIT = no
51 CPUSRCS = \
52 ../uae_cpu/basilisk_glue.cpp ../uae_cpu/readcpu.cpp \
53 ../uae_cpu/memory.cpp ../uae_cpu/newcpu.cpp ../uae_cpu/fpu/fpu_ieee.cpp
54 GEN_CPUSRCS = \
55 cpustbl.cpp cpudefs.cpp \
56 cpuemu1.cpp cpuemu2.cpp cpuemu3.cpp cpuemu4.cpp \
57 cpuemu5.cpp cpuemu6.cpp cpuemu7.cpp cpuemu8.cpp
58 ifeq ($(ARCH), i386)
59 USE_JIT = $(WANT_JIT)
60 DEFS += -DUNALIGNED_PROFITABLE -DREGPARAM="__attribute__((regparm(3)))"
61 DEFS += -DX86_ASSEMBLY -DOPTIMIZED_FLAGS -DSAHF_SETO_PROFITABLE
62 endif
63 ifeq ($(ARCH), x86_64)
64 USE_JIT = $(WANT_JIT)
65 DEFS += -DUNALIGNED_PROFITABLE
66 DEFS += -DX86_64_ASSEMBLY -DOPTIMIZED_FLAGS
67 endif
68 ifeq ($(USE_JIT), yes)
69 DEFS += -DUSE_JIT -DUSE_JIT_FPU
70 ifeq ($(WANT_JIT_DEBUG), yes)
71 DEFS += -DJIT_DEBUG
72 endif
73 CPUSRCS += \
74 ../uae_cpu/compiler/compemu_support.cpp \
75 ../uae_cpu/compiler/compemu_fpp.cpp
76 GEN_CPUSRCS += \
77 cpuemu1_nf.cpp cpuemu2_nf.cpp cpuemu3_nf.cpp cpuemu4_nf.cpp \
78 cpuemu5_nf.cpp cpuemu6_nf.cpp cpuemu7_nf.cpp cpuemu8_nf.cpp \
79 compemu1.cpp compemu2.cpp compemu3.cpp compemu4.cpp \
80 compemu5.cpp compemu6.cpp compemu7.cpp compemu8.cpp \
81 cpustbl_nf.cpp compstbl.cpp
82 endif
83
84 GEN_DIR = gen
85 ifneq ($(ARCH),)
86 GEN_DIR = gen.$(ARCH)
87 endif
88 CPUSRCS += $(foreach file, $(GEN_CPUSRCS), $(GEN_DIR)/$(file))
89 CPPFLAGS += -I$(GEN_DIR)
90
91 ## Files
92 UNIXSRCS = vm_alloc.cpp vm_alloc.h sigsegv.cpp sigsegv.h video_vosf.h video_blit.cpp \
93 xpram_unix.cpp user_strings_unix.cpp user_strings_unix.h \
94 serial_unix.cpp ether_unix.cpp sys_unix.cpp timer_unix.cpp \
95 sshpty.c sshpty.h strlcpy.c strlcpy.h semaphore.h
96 SRCS = ../main.cpp main_macosx.mm ../prefs.cpp ../prefs_items.cpp prefs_macosx.mm \
97 sys_unix.cpp sys_darwin.cpp ../rom_patches.cpp ../slot_rom.cpp ../rsrc_patches.cpp \
98 ../emul_op.cpp ../macos_util.cpp ../xpram.cpp xpram_unix.cpp ../timer.cpp \
99 timer_unix.cpp ../adb.cpp ../serial.cpp serial_unix.cpp ../ether.cpp ether_unix.cpp \
100 ../sony.cpp ../disk.cpp ../cdrom.cpp ../scsi.cpp ../video.cpp video_macosx.mm \
101 vm_alloc.cpp sigsegv.cpp ../audio.cpp ../extfs.cpp extfs_macosx.cpp \
102 ../user_strings.cpp user_strings_unix.cpp clip_macosx.cpp misc_macosx.mm \
103 ../dummy/scsi_dummy.cpp \
104 audio_macosx.cpp AudioBackEnd.cpp AudioDevice.cpp MacOSX_sound_if.cpp \
105 NNThread.m Emulator.mm EmulatorView.mm Controller.mm PrefsEditor.mm \
106 sshpty.c strlcpy.c \
107 $(MONSRCS) $(CPUSRCS) $(SLIRP_SRCS)
108
109 ## Documentation files
110 DOCS = README.txt Credits.html ToDo.html HowTo.html Versions.html
111
112 ## Binaries to build
113 APP = BasiliskII
114 APP_APP = $(APP).app
115 TARGET_ARCHES = @TARGET_ARCHES@
116 PROGS = $(foreach arch, $(TARGET_ARCHES), $(APP).$(arch))
117
118 BLESS = $(OBJ_DIR)/lowmem
119
120 ## Rules
121 .PHONY: modules install installdirs uninstall mostlyclean clean distclean depend dep
122 .SUFFIXES:
123 .SUFFIXES: .c .cpp .s .o .h
124
125 all: $(APP)_app
126
127 README.txt: ../../README
128 $(LN_S) $< $@
129 $(UNIXSRCS): %: ../Unix/%
130 $(LN_S) $< $@
131
132 OBJ_DIR = obj
133 ifneq ($(ARCH),)
134 OBJ_DIR = obj.$(ARCH)
135 endif
136 $(OBJ_DIR)::
137 @[ -d $(OBJ_DIR) ] || mkdir $(OBJ_DIR) > /dev/null 2>&1
138
139 define SRCS_LIST_TO_OBJS
140 $(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(foreach file, $(SRCS), \
141 $(basename $(notdir $(file))))))
142 endef
143 OBJS = $(SRCS_LIST_TO_OBJS)
144
145 SRC_PATHS += $(sort $(foreach file, $(SRCS), $(dir $(file))))
146 VPATH :=
147 VPATH += $(addprefix :, $(subst ,:, $(filter-out $($(subst, :, ,$(VPATH))), $(SRC_PATHS))))
148
149 define PROGS_template
150 $(APP).$(1): links
151 +$(MAKE) $(OBJ_DIR).$(1)/$(APP) ARCH=$(1)
152 $(LN_S) -f $(OBJ_DIR).$(1)/$(APP) $(APP).$(1)
153 endef
154
155 $(APP): $(PROGS)
156 lipo $(foreach arch, $(TARGET_ARCHES), -arch $(arch) $(APP).$(arch)) \
157 -create -output $@
158
159 $(foreach arch,$(TARGET_ARCHES),$(eval $(call PROGS_template,$(arch))))
160
161 links: $(UNIXSRCS)
162
163 $(BLESS): $(OBJ_DIR) $(OBJ_DIR)/lowmem.o
164 $(HOST_CC) -o $@ $(OBJ_DIR)/lowmem.o
165 $(OBJ_DIR)/lowmem.o: ../Unix/Darwin/lowmem.c
166 $(HOST_CC) -o $@ -c $<
167
168 $(OBJ_DIR)/$(APP): $(OBJ_DIR) $(GEN_DIR) $(OBJS) $(BLESS)
169 $(CXX) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
170 $(BLESS) $@
171
172 $(APP)_app: $(APP) $(DOCS) Info.plist $(APP).icns
173 mkdir -p $(APP_APP)/Contents
174 cp -f ../MacOSX/Info.plist $(APP_APP)/Contents/
175 echo -n 'APPL????' > $(APP_APP)/Contents/PkgInfo
176 mkdir -p $(APP_APP)/Contents/MacOS
177 cp -f $(APP) $(APP_APP)/Contents/MacOS/
178 strip $(APP_APP)/Contents/MacOS/$(APP)
179 mkdir -p $(APP_APP)/Contents/Resources
180 cp -Rp English.lproj $(APP_APP)/Contents/Resources/
181 cp -f $(APP).icns $(APP_APP)/Contents/Resources/
182 cp -f $(DOCS) $(APP_APP)/Contents/Resources/
183 find $(APP_APP) -type d -name CVS | xargs rm -rf
184
185 mostlyclean:
186 rm -rf $(APP_APP)
187 rm -f $(PROGS) $(OBJ_DIR)/* $(OBJ_DIR).*/* core* *.core *~ *.bak
188
189 clean: mostlyclean
190 rm -f $(UNIXSRCS)
191 rm -f $(GEN_DIR).*/*
192
193 distclean: clean
194 rm -rf $(OBJ_DIR)
195 rm -rf autom4te.cache
196 rm -f Makefile
197 rm -f config.cache config.log config.status config.h
198 rm -f Darwin/lowmem Darwin/pagezero
199
200 depend dep:
201 makedepend $(CPPFLAGS) -Y. $(SRCS) 2>/dev/null
202
203 $(OBJ_DIR)/%.o : ../slirp/%.c
204 $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(SLIRP_CFLAGS) -c $< -o $@
205 $(OBJ_DIR)/%.o : %.c
206 $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $< -o $@
207 $(OBJ_DIR)/%.o : %.cpp
208 $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@
209 $(OBJ_DIR)/%.o : %.m
210 $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $< -o $@
211 $(OBJ_DIR)/%.o : %.mm
212 $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@
213 $(OBJ_DIR)/%.o : %.s
214 $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $< -o $@
215 $(OBJ_DIR)/%.ho : %.c
216 $(HOST_CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $< -o $@
217 $(OBJ_DIR)/%.ho : %.cpp
218 $(HOST_CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@
219
220 $(OBJ_DIR)/build68k: $(OBJ_DIR)/build68k.ho
221 $(HOST_CC) -o $@ $(OBJ_DIR)/build68k.ho
222 $(OBJ_DIR)/gencpu: $(OBJ_DIR)/gencpu.ho $(OBJ_DIR)/readcpu.ho $(OBJ_DIR)/cpudefs.ho
223 $(HOST_CXX) -o $@ $(OBJ_DIR)/gencpu.ho $(OBJ_DIR)/readcpu.ho $(OBJ_DIR)/cpudefs.ho
224 $(OBJ_DIR)/gencomp: $(OBJ_DIR)/gencomp.ho $(OBJ_DIR)/readcpu.ho $(OBJ_DIR)/cpudefs.ho
225 $(HOST_CXX) -o $@ $(OBJ_DIR)/gencomp.ho $(OBJ_DIR)/readcpu.ho $(OBJ_DIR)/cpudefs.ho
226
227 $(GEN_DIR)::
228 @[ -d $(GEN_DIR) ] || mkdir $(GEN_DIR) > /dev/null 2>&1
229
230 $(GEN_DIR)/cpudefs.cpp: $(OBJ_DIR)/build68k ../uae_cpu/table68k
231 $(OBJ_DIR)/build68k <../uae_cpu/table68k > $@
232 $(GEN_DIR)/cpustbl.cpp: $(GEN_DIR)/cpuemu.cpp
233 $(GEN_DIR)/cpustbl_nf.cpp: $(GEN_DIR)/cpustbl.cpp
234 $(GEN_DIR)/compstbl.cpp: $(GEN_DIR)/compemu.cpp
235 $(GEN_DIR)/cputbl.h: $(GEN_DIR)/cpuemu.cpp
236 $(GEN_DIR)/comptbl.h: $(GEN_DIR)/compemu.cpp
237
238 $(GEN_DIR)/cpuemu.cpp: $(OBJ_DIR)/gencpu
239 cd $(GEN_DIR) && ../$(OBJ_DIR)/gencpu
240
241 $(GEN_DIR)/compemu.cpp: $(OBJ_DIR)/gencomp
242 cd $(GEN_DIR) && ../$(OBJ_DIR)/gencomp
243
244 $(OBJ_DIR)/cpustbl_nf.o: $(GEN_DIR)/cpustbl.cpp
245 $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -DNOFLAGS -c $< -o $@
246
247 $(OBJ_DIR)/compemu_support.o: compemu_support.cpp $(GEN_DIR)/comptbl.h
248 $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@
249
250 $(OBJ_DIR)/cpuemu1.o: $(GEN_DIR)/cpuemu.cpp
251 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_1 $(CXXFLAGS) -c $< -o $@
252 $(OBJ_DIR)/cpuemu2.o: $(GEN_DIR)/cpuemu.cpp
253 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_2 $(CXXFLAGS) -c $< -o $@
254 $(OBJ_DIR)/cpuemu3.o: $(GEN_DIR)/cpuemu.cpp
255 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_3 $(CXXFLAGS) -c $< -o $@
256 $(OBJ_DIR)/cpuemu4.o: $(GEN_DIR)/cpuemu.cpp
257 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_4 $(CXXFLAGS) -c $< -o $@
258 $(OBJ_DIR)/cpuemu5.o: $(GEN_DIR)/cpuemu.cpp
259 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_5 $(CXXFLAGS) -c $< -o $@
260 $(OBJ_DIR)/cpuemu6.o: $(GEN_DIR)/cpuemu.cpp
261 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_6 $(CXXFLAGS) -c $< -o $@
262 $(OBJ_DIR)/cpuemu7.o: $(GEN_DIR)/cpuemu.cpp
263 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_7 $(CXXFLAGS) -c $< -o $@
264 $(OBJ_DIR)/cpuemu8.o: $(GEN_DIR)/cpuemu.cpp
265 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_8 $(CXXFLAGS) -c $< -o $@
266
267 $(OBJ_DIR)/cpuemu1_nf.o: $(GEN_DIR)/cpuemu.cpp
268 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_1 -DNOFLAGS $(CXXFLAGS) -c $< -o $@
269 $(OBJ_DIR)/cpuemu2_nf.o: $(GEN_DIR)/cpuemu.cpp
270 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_2 -DNOFLAGS $(CXXFLAGS) -c $< -o $@
271 $(OBJ_DIR)/cpuemu3_nf.o: $(GEN_DIR)/cpuemu.cpp
272 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_3 -DNOFLAGS $(CXXFLAGS) -c $< -o $@
273 $(OBJ_DIR)/cpuemu4_nf.o: $(GEN_DIR)/cpuemu.cpp
274 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_4 -DNOFLAGS $(CXXFLAGS) -c $< -o $@
275 $(OBJ_DIR)/cpuemu5_nf.o: $(GEN_DIR)/cpuemu.cpp
276 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_5 -DNOFLAGS $(CXXFLAGS) -c $< -o $@
277 $(OBJ_DIR)/cpuemu6_nf.o: $(GEN_DIR)/cpuemu.cpp
278 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_6 -DNOFLAGS $(CXXFLAGS) -c $< -o $@
279 $(OBJ_DIR)/cpuemu7_nf.o: $(GEN_DIR)/cpuemu.cpp
280 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_7 -DNOFLAGS $(CXXFLAGS) -c $< -o $@
281 $(OBJ_DIR)/cpuemu8_nf.o: $(GEN_DIR)/cpuemu.cpp
282 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_8 -DNOFLAGS $(CXXFLAGS) -c $< -o $@
283
284 $(OBJ_DIR)/compemu1.o: $(GEN_DIR)/compemu.cpp
285 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_1 $(CXXFLAGS) -c $< -o $@
286 $(OBJ_DIR)/compemu2.o: $(GEN_DIR)/compemu.cpp
287 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_2 $(CXXFLAGS) -c $< -o $@
288 $(OBJ_DIR)/compemu3.o: $(GEN_DIR)/compemu.cpp
289 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_3 $(CXXFLAGS) -c $< -o $@
290 $(OBJ_DIR)/compemu4.o: $(GEN_DIR)/compemu.cpp
291 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_4 $(CXXFLAGS) -c $< -o $@
292 $(OBJ_DIR)/compemu5.o: $(GEN_DIR)/compemu.cpp
293 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_5 $(CXXFLAGS) -c $< -o $@
294 $(OBJ_DIR)/compemu6.o: $(GEN_DIR)/compemu.cpp
295 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_6 $(CXXFLAGS) -c $< -o $@
296 $(OBJ_DIR)/compemu7.o: $(GEN_DIR)/compemu.cpp
297 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_7 $(CXXFLAGS) -c $< -o $@
298 $(OBJ_DIR)/compemu8.o: $(GEN_DIR)/compemu.cpp
299 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_8 $(CXXFLAGS) -c $< -o $@
300
301 #-------------------------------------------------------------------------
302 # DO NOT DELETE THIS LINE -- make depend depends on it.