ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/MacOSX/Makefile.in
Revision: 1.24
Committed: 2007-06-15T10:11:28Z (17 years, 5 months ago) by gbeauche
Branch: MAIN
Changes since 1.23: +28 -4 lines
Log Message:
Fix cxmon files inclusion. Drop support for non ppc & x86 MacOS X arches.
Make JIT files & defs selection at build-time, not configure-time (FATs).

NOTE: be careful, larger changes are yet to come.

File Contents

# User Rev Content
1 gbeauche 1.23 # Unix makefile for Basilisk II
2 nigel 1.1
3     ## System specific configuration
4     SHELL = /bin/sh
5    
6     CC = @CC@
7     CXX = @CXX@
8 gbeauche 1.23 CFLAGS = @CFLAGS@ -g
9     CXXFLAGS = @CXXFLAGS@ -g
10 gbeauche 1.24 CPPFLAGS = @CPPFLAGS@ -I../include -I. @CPUINCLUDES@
11 gbeauche 1.23 DEFS = @DEFS@ @DEFINES@ -D_REENTRANT -DAQUA
12 nigel 1.1 LDFLAGS = @LDFLAGS@
13     LIBS = @LIBS@
14 gbeauche 1.24 MONSRCS = @MONSRCS@
15 nigel 1.14 BLESS = @BLESS@
16 gbeauche 1.23 LN_S = ln -s
17    
18 gbeauche 1.24 ## slirp network emulation code
19     WANT_SLIRP = @WANT_SLIRP@
20     ifeq ($(WANT_SLIRP), yes)
21     CPPFLAGS += -I../slirp
22 gbeauche 1.23 SLIRP_CFLAGS = @SLIRP_CFLAGS@
23 nigel 1.17 SLIRP_SRCS = @SLIRP_SRCS@
24 gbeauche 1.23 SLIRP_OBJS = $(SLIRP_SRCS:../slirp/%.c=obj/%.o)
25 gbeauche 1.24 endif
26    
27     ## CPU emulation code
28     WANT_JIT = @WANT_JIT@
29     WANT_JIT_DEBUG = @WANT_JIT_DEBUG@
30     USE_JIT = $(WANT_JIT)
31     CPUSRCS = @CPUSRCS@
32     ifeq ($(USE_JIT), yes)
33     DEFS += -DUSE_JIT -DUSE_JIT_FPU
34     ifeq ($(WANT_JIT_DEBUG), yes)
35     DEFS += -DJIT_DEBUG
36     endif
37     CPUSRCS += \
38     cpuemu1_nf.cpp cpuemu2_nf.cpp cpuemu3_nf.cpp cpuemu4_nf.cpp \
39     cpuemu5_nf.cpp cpuemu6_nf.cpp cpuemu7_nf.cpp cpuemu8_nf.cpp \
40     compemu1.cpp compemu2.cpp compemu3.cpp compemu4.cpp \
41     compemu5.cpp compemu6.cpp compemu7.cpp compemu8.cpp \
42     ../uae_cpu/compiler/compemu_support.cpp \
43     ../uae_cpu/compiler/compemu_fpp.cpp \
44     compstbl.o cpustbl_nf.o
45     endif
46 nigel 1.1
47     ## Files
48 gbeauche 1.23 UNIXSRCS = vm_alloc.cpp vm_alloc.h sigsegv.cpp sigsegv.h video_vosf.h video_blit.cpp \
49     xpram_unix.cpp user_strings_unix.cpp user_strings_unix.h \
50     serial_unix.cpp ether_unix.cpp sys_unix.cpp timer_unix.cpp \
51     sshpty.c sshpty.h strlcpy.c strlcpy.h semaphore.h
52     SRCS = ../main.cpp main_macosx.mm ../prefs.cpp ../prefs_items.cpp prefs_macosx.mm \
53     sys_unix.cpp sys_darwin.cpp ../rom_patches.cpp ../slot_rom.cpp ../rsrc_patches.cpp \
54     ../emul_op.cpp ../macos_util.cpp ../xpram.cpp xpram_unix.cpp ../timer.cpp \
55     timer_unix.cpp ../adb.cpp ../serial.cpp serial_unix.cpp ../ether.cpp ether_unix.cpp \
56     ../sony.cpp ../disk.cpp ../cdrom.cpp ../scsi.cpp ../video.cpp video_macosx.mm \
57     vm_alloc.cpp sigsegv.cpp ../audio.cpp ../extfs.cpp extfs_macosx.mm \
58     ../user_strings.cpp user_strings_unix.cpp clip_macosx.cpp misc_macosx.mm \
59     ../dummy/scsi_dummy.cpp \
60     audio_macosx.cpp AudioBackEnd.cpp AudioDevice.cpp MacOSX_sound_if.cpp \
61     NNThread.m Emulator.mm EmulatorView.mm Controller.mm PrefsEditor.mm \
62     sshpty.c strlcpy.c \
63 gbeauche 1.24 $(MONSRCS) $(CPUSRCS) $(SLIRP_SRCS)
64 gbeauche 1.23 APP = BasiliskII
65     APP_APP = $(APP).app
66 nigel 1.4
67 gbeauche 1.23 PROGS = $(APP)_app
68     DOCS = README.txt Credits.html ToDo.html HowTo.html Versions.html
69 nigel 1.17
70 nigel 1.1 ## Rules
71 gbeauche 1.23 .PHONY: modules install installdirs uninstall mostlyclean clean distclean depend dep
72 nigel 1.1 .SUFFIXES:
73     .SUFFIXES: .c .cpp .s .o .h
74    
75 gbeauche 1.23 all: $(PROGS)
76 nigel 1.1
77 gbeauche 1.23 README.txt: ../../README
78     $(LN_S) $< $@
79     $(UNIXSRCS): %: ../Unix/%
80     $(LN_S) $< $@
81 nigel 1.1
82 gbeauche 1.23 OBJ_DIR = obj
83 nigel 1.1 $(OBJ_DIR)::
84     @[ -d $(OBJ_DIR) ] || mkdir $(OBJ_DIR) > /dev/null 2>&1
85    
86 gbeauche 1.23 define SRCS_LIST_TO_OBJS
87     $(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(foreach file, $(SRCS), \
88     $(basename $(notdir $(file))))))
89     endef
90     OBJS = $(SRCS_LIST_TO_OBJS)
91    
92     SRC_PATHS += $(sort $(foreach file, $(SRCS), $(dir $(file))))
93     VPATH :=
94     VPATH += $(addprefix :, $(subst ,:, $(filter-out $($(subst, :, ,$(VPATH))), $(SRC_PATHS))))
95    
96     $(APP): $(UNIXSRCS) $(OBJ_DIR) $(OBJS)
97     $(CXX) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
98     $(BLESS) $(APP)
99    
100     $(APP)_app: $(APP) $(DOCS) ../MacOSX/Info.plist ../MacOSX/$(APP).icns
101     mkdir -p $(APP_APP)/Contents
102     cp -f ../MacOSX/Info.plist $(APP_APP)/Contents/
103     echo -n 'APPL????' > $(APP_APP)/Contents/PkgInfo
104     mkdir -p $(APP_APP)/Contents/MacOS
105     cp -f $(APP) $(APP_APP)/Contents/MacOS/
106     strip $(APP_APP)/Contents/MacOS/$(APP)
107     mkdir -p $(APP_APP)/Contents/Resources
108     cp -Rp English.lproj $(APP_APP)/Contents/Resources/
109     cp -f ../MacOSX/$(APP).icns $(APP_APP)/Contents/Resources/
110     cp -f $(DOCS) $(APP_APP)/Contents/Resources/
111     find $(APP_APP) -type d -name CVS | xargs rm -rf
112 nigel 1.1
113     mostlyclean:
114 gbeauche 1.23 rm -rf $(APP_APP)
115     rm -f $(PROGS) $(OBJ_DIR)/* core* *.core *~ *.bak
116 nigel 1.1
117     clean: mostlyclean
118 gbeauche 1.23 rm -f $(UNIXSRCS)
119     rm -f cpuemu.cpp cpudefs.cpp cputmp*.s cpufast*.s cpustbl.cpp cputbl.h compemu.cpp compstbl.cpp comptbl.h
120 nigel 1.1
121     distclean: clean
122 nigel 1.12 rm -rf $(OBJ_DIR)
123     rm -rf autom4te.cache
124     rm -f Makefile
125 gbeauche 1.23 rm -f config.cache config.log config.status config.h
126 nigel 1.12 rm -f Darwin/lowmem Darwin/pagezero
127 nigel 1.1
128 gbeauche 1.23 depend dep:
129     makedepend $(CPPFLAGS) -Y. $(SRCS) 2>/dev/null
130 nigel 1.1
131 gbeauche 1.23 $(OBJ_DIR)/%.o : ../slirp/%.c
132     $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(SLIRP_CFLAGS) -c $< -o $@
133     $(OBJ_DIR)/%.o : %.c
134     $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $< -o $@
135     $(OBJ_DIR)/%.o : %.cpp
136     $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@
137     $(OBJ_DIR)/%.o : %.m
138     $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $< -o $@
139     $(OBJ_DIR)/%.o : %.mm
140     $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@
141     $(OBJ_DIR)/%.o : %.s
142     $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $< -o $@
143 nigel 1.1
144 gbeauche 1.23 $(OBJ_DIR)/build68k: $(OBJ_DIR)/build68k.o
145     $(CC) $(LDFLAGS) -o $(OBJ_DIR)/build68k $(OBJ_DIR)/build68k.o
146     $(OBJ_DIR)/gencpu: $(OBJ_DIR)/gencpu.o $(OBJ_DIR)/readcpu.o $(OBJ_DIR)/cpudefs.o
147     $(CXX) $(LDFLAGS) -o $(OBJ_DIR)/gencpu $(OBJ_DIR)/gencpu.o $(OBJ_DIR)/readcpu.o $(OBJ_DIR)/cpudefs.o
148     $(OBJ_DIR)/gencomp: $(OBJ_DIR)/gencomp.o $(OBJ_DIR)/readcpu.o $(OBJ_DIR)/cpudefs.o
149     $(CXX) $(LDFLAGS) -o $(OBJ_DIR)/gencomp $(OBJ_DIR)/gencomp.o $(OBJ_DIR)/readcpu.o $(OBJ_DIR)/cpudefs.o
150 nigel 1.1
151     cpudefs.cpp: $(OBJ_DIR)/build68k ../uae_cpu/table68k
152 gbeauche 1.23 $(OBJ_DIR)/build68k <../uae_cpu/table68k >cpudefs.cpp
153     cpustbl.cpp: cpuemu.cpp
154     cpustbl_nf.cpp: cpustbl.cpp
155     compstbl.cpp: compemu.cpp
156     cputbl.h: cpuemu.cpp
157     comptbl.h: compemu.cpp
158    
159     cpuemu.cpp: $(OBJ_DIR)/gencpu
160     $(OBJ_DIR)/gencpu
161 nigel 1.1
162 gbeauche 1.23 compemu.cpp: $(OBJ_DIR)/gencomp
163     $(OBJ_DIR)/gencomp
164 nigel 1.1
165 gbeauche 1.23 $(OBJ_DIR)/cpustbl_nf.o: cpustbl.cpp
166     $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -DNOFLAGS -c $< -o $@
167 nigel 1.7
168 gbeauche 1.23 $(OBJ_DIR)/compemu_support.o: compemu_support.cpp comptbl.h
169 nigel 1.19 $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@
170    
171 gbeauche 1.23 $(OBJ_DIR)/cpuemu1.o: cpuemu.cpp
172     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_1 $(CXXFLAGS) -c $< -o $@
173     $(OBJ_DIR)/cpuemu2.o: cpuemu.cpp
174     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_2 $(CXXFLAGS) -c $< -o $@
175     $(OBJ_DIR)/cpuemu3.o: cpuemu.cpp
176     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_3 $(CXXFLAGS) -c $< -o $@
177     $(OBJ_DIR)/cpuemu4.o: cpuemu.cpp
178     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_4 $(CXXFLAGS) -c $< -o $@
179     $(OBJ_DIR)/cpuemu5.o: cpuemu.cpp
180     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_5 $(CXXFLAGS) -c $< -o $@
181     $(OBJ_DIR)/cpuemu6.o: cpuemu.cpp
182     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_6 $(CXXFLAGS) -c $< -o $@
183     $(OBJ_DIR)/cpuemu7.o: cpuemu.cpp
184     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_7 $(CXXFLAGS) -c $< -o $@
185     $(OBJ_DIR)/cpuemu8.o: cpuemu.cpp
186     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_8 $(CXXFLAGS) -c $< -o $@
187    
188     $(OBJ_DIR)/cpuemu1_nf.o: cpuemu.cpp
189     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_1 -DNOFLAGS $(CXXFLAGS) -c $< -o $@
190     $(OBJ_DIR)/cpuemu2_nf.o: cpuemu.cpp
191     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_2 -DNOFLAGS $(CXXFLAGS) -c $< -o $@
192     $(OBJ_DIR)/cpuemu3_nf.o: cpuemu.cpp
193     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_3 -DNOFLAGS $(CXXFLAGS) -c $< -o $@
194     $(OBJ_DIR)/cpuemu4_nf.o: cpuemu.cpp
195     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_4 -DNOFLAGS $(CXXFLAGS) -c $< -o $@
196     $(OBJ_DIR)/cpuemu5_nf.o: cpuemu.cpp
197     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_5 -DNOFLAGS $(CXXFLAGS) -c $< -o $@
198     $(OBJ_DIR)/cpuemu6_nf.o: cpuemu.cpp
199     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_6 -DNOFLAGS $(CXXFLAGS) -c $< -o $@
200     $(OBJ_DIR)/cpuemu7_nf.o: cpuemu.cpp
201     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_7 -DNOFLAGS $(CXXFLAGS) -c $< -o $@
202     $(OBJ_DIR)/cpuemu8_nf.o: cpuemu.cpp
203     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_8 -DNOFLAGS $(CXXFLAGS) -c $< -o $@
204    
205     $(OBJ_DIR)/compemu1.o: compemu.cpp
206     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_1 $(CXXFLAGS) -c $< -o $@
207     $(OBJ_DIR)/compemu2.o: compemu.cpp
208     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_2 $(CXXFLAGS) -c $< -o $@
209     $(OBJ_DIR)/compemu3.o: compemu.cpp
210     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_3 $(CXXFLAGS) -c $< -o $@
211     $(OBJ_DIR)/compemu4.o: compemu.cpp
212     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_4 $(CXXFLAGS) -c $< -o $@
213     $(OBJ_DIR)/compemu5.o: compemu.cpp
214     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_5 $(CXXFLAGS) -c $< -o $@
215     $(OBJ_DIR)/compemu6.o: compemu.cpp
216     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_6 $(CXXFLAGS) -c $< -o $@
217     $(OBJ_DIR)/compemu7.o: compemu.cpp
218     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_7 $(CXXFLAGS) -c $< -o $@
219     $(OBJ_DIR)/compemu8.o: compemu.cpp
220     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_8 $(CXXFLAGS) -c $< -o $@
221 nigel 1.17
222 nigel 1.1 #-------------------------------------------------------------------------
223     # DO NOT DELETE THIS LINE -- make depend depends on it.