ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/MacOSX/Makefile.in
(Generate patch)

Comparing BasiliskII/src/MacOSX/Makefile.in (file contents):
Revision 1.24 by gbeauche, 2007-06-15T10:11:28Z vs.
Revision 1.25 by gbeauche, 2007-06-15T17:11:46Z

# Line 3 | Line 3
3   ## System specific configuration
4   SHELL = /bin/sh
5  
6 < CC = @CC@
7 < CXX = @CXX@
6 > HOST_CC = gcc
7 > HOST_CXX = g++
8 > CC = @CC@ -arch $(ARCH)
9 > CXX = @CXX@ -arch $(ARCH)
10   CFLAGS = @CFLAGS@ -g
11   CXXFLAGS = @CXXFLAGS@ -g
12 < CPPFLAGS = @CPPFLAGS@ -I../include -I. @CPUINCLUDES@
13 < DEFS = @DEFS@ @DEFINES@ -D_REENTRANT -DAQUA
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@
# Line 27 | Line 29 | endif
29   ## CPU emulation code
30   WANT_JIT = @WANT_JIT@
31   WANT_JIT_DEBUG = @WANT_JIT_DEBUG@
32 + USE_JIT = no
33 + CPUSRCS = \
34 +        ../uae_cpu/basilisk_glue.cpp ../uae_cpu/readcpu.cpp \
35 +        ../uae_cpu/memory.cpp ../uae_cpu/newcpu.cpp ../uae_cpu/fpu/fpu_ieee.cpp
36 + GEN_CPUSRCS = \
37 +        cpustbl.cpp cpudefs.cpp \
38 +        cpuemu1.cpp cpuemu2.cpp cpuemu3.cpp cpuemu4.cpp \
39 +        cpuemu5.cpp cpuemu6.cpp cpuemu7.cpp cpuemu8.cpp
40 + ifeq ($(ARCH), i386)
41   USE_JIT = $(WANT_JIT)
42 < CPUSRCS = @CPUSRCS@
42 > DEFS += -DUNALIGNED_PROFITABLE -DREGPARAM="__attribute__((regparm(3)))"
43 > DEFS += -DX86_ASSEMBLY -DOPTIMIZED_FLAGS -DSAHF_SETO_PROFITABLE
44 > endif
45 > ifeq ($(ARCH), x86_64)
46 > USE_JIT = $(WANT_JIT)
47 > DEFS += -DUNALIGNED_PROFITABLE
48 > DEFS += -DX86_64_ASSEMBLY -DOPTIMIZED_FLAGS
49 > endif
50   ifeq ($(USE_JIT), yes)
51   DEFS += -DUSE_JIT -DUSE_JIT_FPU
52   ifeq ($(WANT_JIT_DEBUG), yes)
53   DEFS += -DJIT_DEBUG
54   endif
55   CPUSRCS += \
56 +        ../uae_cpu/compiler/compemu_support.cpp \
57 +        ../uae_cpu/compiler/compemu_fpp.cpp
58 + GEN_CPUSRCS += \
59          cpuemu1_nf.cpp cpuemu2_nf.cpp cpuemu3_nf.cpp cpuemu4_nf.cpp \
60          cpuemu5_nf.cpp cpuemu6_nf.cpp cpuemu7_nf.cpp cpuemu8_nf.cpp \
61          compemu1.cpp compemu2.cpp compemu3.cpp compemu4.cpp \
62          compemu5.cpp compemu6.cpp compemu7.cpp compemu8.cpp \
63 <        ../uae_cpu/compiler/compemu_support.cpp \
43 <        ../uae_cpu/compiler/compemu_fpp.cpp \
44 <        compstbl.o cpustbl_nf.o
63 >        cpustbl_nf.cpp compstbl.cpp
64   endif
65  
66 + GEN_DIR = gen
67 + ifneq ($(ARCH),)
68 + GEN_DIR = gen.$(ARCH)
69 + endif
70 + CPUSRCS += $(foreach file, $(GEN_CPUSRCS), $(GEN_DIR)/$(file))
71 + CPPFLAGS += -I$(GEN_DIR)
72 +
73   ## Files
74   UNIXSRCS = vm_alloc.cpp vm_alloc.h sigsegv.cpp sigsegv.h video_vosf.h video_blit.cpp \
75      xpram_unix.cpp user_strings_unix.cpp user_strings_unix.h \
# Line 61 | Line 87 | SRCS = ../main.cpp main_macosx.mm ../pre
87      NNThread.m Emulator.mm EmulatorView.mm Controller.mm PrefsEditor.mm \
88      sshpty.c strlcpy.c \
89      $(MONSRCS) $(CPUSRCS) $(SLIRP_SRCS)
64 APP = BasiliskII
65 APP_APP = $(APP).app
90  
91 < PROGS = $(APP)_app
91 > ## Documentation files
92   DOCS = README.txt Credits.html ToDo.html HowTo.html Versions.html
93  
94 + ## Binaries to build
95 + APP = BasiliskII
96 + APP_APP = $(APP).app
97 + TARGET_ARCHES = @TARGET_ARCHES@
98 + PROGS = $(foreach arch, $(TARGET_ARCHES), $(APP).$(arch))
99 +
100   ## Rules
101   .PHONY: modules install installdirs uninstall mostlyclean clean distclean depend dep
102   .SUFFIXES:
103   .SUFFIXES: .c .cpp .s .o .h
104  
105 < all: $(PROGS)
105 > all: $(APP)_app
106  
107   README.txt: ../../README
108          $(LN_S) $< $@
# Line 80 | Line 110 | $(UNIXSRCS): %: ../Unix/%
110          $(LN_S) $< $@
111  
112   OBJ_DIR = obj
113 + ifneq ($(ARCH),)
114 + OBJ_DIR = obj.$(ARCH)
115 + endif
116   $(OBJ_DIR)::
117          @[ -d $(OBJ_DIR) ] || mkdir $(OBJ_DIR) > /dev/null 2>&1
118  
# Line 93 | Line 126 | SRC_PATHS += $(sort $(foreach file, $(SR
126   VPATH :=
127   VPATH += $(addprefix :, $(subst  ,:, $(filter-out $($(subst, :, ,$(VPATH))), $(SRC_PATHS))))
128  
129 < $(APP): $(UNIXSRCS) $(OBJ_DIR) $(OBJS)
129 > define PROGS_template
130 > $(APP).$(1): links
131 >        +$(MAKE) $(OBJ_DIR).$(1)/$(APP) ARCH=$(1)
132 >        $(LN_S) -f $(OBJ_DIR).$(1)/$(APP) $(APP).$(1)
133 > endef
134 >
135 > $(APP): $(PROGS)
136 >        lipo $(foreach arch, $(TARGET_ARCHES), -arch $(arch) $(APP).$(arch)) \
137 >                -create -output $@
138 >
139 > $(foreach arch,$(TARGET_ARCHES),$(eval $(call PROGS_template,$(arch))))
140 >
141 > links: $(UNIXSRCS)
142 >
143 > $(OBJ_DIR)/$(APP): $(OBJ_DIR) $(GEN_DIR) $(OBJS)
144          $(CXX) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
145 <        $(BLESS) $(APP)
145 >        $(BLESS) $@
146  
147 < $(APP)_app: $(APP) $(DOCS) ../MacOSX/Info.plist ../MacOSX/$(APP).icns
147 > $(APP)_app: $(APP) $(DOCS) Info.plist $(APP).icns
148          mkdir -p $(APP_APP)/Contents
149          cp -f ../MacOSX/Info.plist $(APP_APP)/Contents/
150          echo -n 'APPL????' > $(APP_APP)/Contents/PkgInfo
# Line 106 | Line 153 | $(APP)_app: $(APP) $(DOCS) ../MacOSX/Inf
153          strip $(APP_APP)/Contents/MacOS/$(APP)
154          mkdir -p $(APP_APP)/Contents/Resources
155          cp -Rp English.lproj $(APP_APP)/Contents/Resources/
156 <        cp -f ../MacOSX/$(APP).icns $(APP_APP)/Contents/Resources/
156 >        cp -f $(APP).icns $(APP_APP)/Contents/Resources/
157          cp -f $(DOCS) $(APP_APP)/Contents/Resources/
158          find $(APP_APP) -type d -name CVS | xargs rm -rf
159  
160   mostlyclean:
161          rm -rf $(APP_APP)
162 <        rm -f $(PROGS) $(OBJ_DIR)/* core* *.core *~ *.bak
162 >        rm -f $(PROGS) $(OBJ_DIR)/* $(OBJ_DIR).*/* core* *.core *~ *.bak
163  
164   clean: mostlyclean
165          rm -f $(UNIXSRCS)
166 <        rm -f cpuemu.cpp cpudefs.cpp cputmp*.s cpufast*.s cpustbl.cpp cputbl.h compemu.cpp compstbl.cpp comptbl.h
166 >        rm -f $(GEN_DIR).*/*
167  
168   distclean: clean
169          rm -rf $(OBJ_DIR)
# Line 140 | Line 187 | $(OBJ_DIR)/%.o : %.mm
187          $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@
188   $(OBJ_DIR)/%.o : %.s
189          $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $< -o $@
190 + $(OBJ_DIR)/%.ho : %.c
191 +        $(HOST_CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $< -o $@
192 + $(OBJ_DIR)/%.ho : %.cpp
193 +        $(HOST_CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@
194 +
195 + $(OBJ_DIR)/build68k: $(OBJ_DIR)/build68k.ho
196 +        $(HOST_CC) $(LDFLAGS) -o $@ $(OBJ_DIR)/build68k.ho
197 + $(OBJ_DIR)/gencpu: $(OBJ_DIR)/gencpu.ho $(OBJ_DIR)/readcpu.ho $(OBJ_DIR)/cpudefs.ho
198 +        $(HOST_CXX) $(LDFLAGS) -o $@ $(OBJ_DIR)/gencpu.ho $(OBJ_DIR)/readcpu.ho $(OBJ_DIR)/cpudefs.ho
199 + $(OBJ_DIR)/gencomp: $(OBJ_DIR)/gencomp.ho $(OBJ_DIR)/readcpu.ho $(OBJ_DIR)/cpudefs.ho
200 +        $(HOST_CXX) $(LDFLAGS) -o $@ $(OBJ_DIR)/gencomp.ho $(OBJ_DIR)/readcpu.ho $(OBJ_DIR)/cpudefs.ho
201 +
202 + $(GEN_DIR)::
203 +        @[ -d $(GEN_DIR) ] || mkdir $(GEN_DIR) > /dev/null 2>&1
204 +
205 + $(GEN_DIR)/cpudefs.cpp: $(OBJ_DIR)/build68k ../uae_cpu/table68k
206 +        $(OBJ_DIR)/build68k <../uae_cpu/table68k > $@
207 + $(GEN_DIR)/cpustbl.cpp: $(GEN_DIR)/cpuemu.cpp
208 + $(GEN_DIR)/cpustbl_nf.cpp: $(GEN_DIR)/cpustbl.cpp
209 + $(GEN_DIR)/compstbl.cpp: $(GEN_DIR)/compemu.cpp
210 + $(GEN_DIR)/cputbl.h: $(GEN_DIR)/cpuemu.cpp
211 + $(GEN_DIR)/comptbl.h: $(GEN_DIR)/compemu.cpp
212  
213 < $(OBJ_DIR)/build68k: $(OBJ_DIR)/build68k.o
214 <        $(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 <
151 < cpudefs.cpp: $(OBJ_DIR)/build68k ../uae_cpu/table68k
152 <        $(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
213 > $(GEN_DIR)/cpuemu.cpp: $(OBJ_DIR)/gencpu
214 >        cd $(GEN_DIR) && ../$(OBJ_DIR)/gencpu
215  
216 < compemu.cpp: $(OBJ_DIR)/gencomp
217 <        $(OBJ_DIR)/gencomp
216 > $(GEN_DIR)/compemu.cpp: $(OBJ_DIR)/gencomp
217 >        cd $(GEN_DIR) && ../$(OBJ_DIR)/gencomp
218  
219 < $(OBJ_DIR)/cpustbl_nf.o: cpustbl.cpp
219 > $(OBJ_DIR)/cpustbl_nf.o: $(GEN_DIR)/cpustbl.cpp
220          $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -DNOFLAGS -c $< -o $@
221  
222 < $(OBJ_DIR)/compemu_support.o: compemu_support.cpp comptbl.h
222 > $(OBJ_DIR)/compemu_support.o: compemu_support.cpp $(GEN_DIR)/comptbl.h
223          $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@
224  
225 < $(OBJ_DIR)/cpuemu1.o: cpuemu.cpp
225 > $(OBJ_DIR)/cpuemu1.o: $(GEN_DIR)/cpuemu.cpp
226          $(CXX) $(CPPFLAGS) $(DEFS) -DPART_1 $(CXXFLAGS) -c $< -o $@
227 < $(OBJ_DIR)/cpuemu2.o: cpuemu.cpp
227 > $(OBJ_DIR)/cpuemu2.o: $(GEN_DIR)/cpuemu.cpp
228          $(CXX) $(CPPFLAGS) $(DEFS) -DPART_2 $(CXXFLAGS) -c $< -o $@
229 < $(OBJ_DIR)/cpuemu3.o: cpuemu.cpp
229 > $(OBJ_DIR)/cpuemu3.o: $(GEN_DIR)/cpuemu.cpp
230          $(CXX) $(CPPFLAGS) $(DEFS) -DPART_3 $(CXXFLAGS) -c $< -o $@
231 < $(OBJ_DIR)/cpuemu4.o: cpuemu.cpp
231 > $(OBJ_DIR)/cpuemu4.o: $(GEN_DIR)/cpuemu.cpp
232          $(CXX) $(CPPFLAGS) $(DEFS) -DPART_4 $(CXXFLAGS) -c $< -o $@
233 < $(OBJ_DIR)/cpuemu5.o: cpuemu.cpp
233 > $(OBJ_DIR)/cpuemu5.o: $(GEN_DIR)/cpuemu.cpp
234          $(CXX) $(CPPFLAGS) $(DEFS) -DPART_5 $(CXXFLAGS) -c $< -o $@
235 < $(OBJ_DIR)/cpuemu6.o: cpuemu.cpp
235 > $(OBJ_DIR)/cpuemu6.o: $(GEN_DIR)/cpuemu.cpp
236          $(CXX) $(CPPFLAGS) $(DEFS) -DPART_6 $(CXXFLAGS) -c $< -o $@
237 < $(OBJ_DIR)/cpuemu7.o: cpuemu.cpp
237 > $(OBJ_DIR)/cpuemu7.o: $(GEN_DIR)/cpuemu.cpp
238          $(CXX) $(CPPFLAGS) $(DEFS) -DPART_7 $(CXXFLAGS) -c $< -o $@
239 < $(OBJ_DIR)/cpuemu8.o: cpuemu.cpp
239 > $(OBJ_DIR)/cpuemu8.o: $(GEN_DIR)/cpuemu.cpp
240          $(CXX) $(CPPFLAGS) $(DEFS) -DPART_8 $(CXXFLAGS) -c $< -o $@
241  
242 < $(OBJ_DIR)/cpuemu1_nf.o: cpuemu.cpp
242 > $(OBJ_DIR)/cpuemu1_nf.o: $(GEN_DIR)/cpuemu.cpp
243          $(CXX) $(CPPFLAGS) $(DEFS) -DPART_1 -DNOFLAGS $(CXXFLAGS) -c $< -o $@
244 < $(OBJ_DIR)/cpuemu2_nf.o: cpuemu.cpp
244 > $(OBJ_DIR)/cpuemu2_nf.o: $(GEN_DIR)/cpuemu.cpp
245          $(CXX) $(CPPFLAGS) $(DEFS) -DPART_2 -DNOFLAGS $(CXXFLAGS) -c $< -o $@
246 < $(OBJ_DIR)/cpuemu3_nf.o: cpuemu.cpp
246 > $(OBJ_DIR)/cpuemu3_nf.o: $(GEN_DIR)/cpuemu.cpp
247          $(CXX) $(CPPFLAGS) $(DEFS) -DPART_3 -DNOFLAGS $(CXXFLAGS) -c $< -o $@
248 < $(OBJ_DIR)/cpuemu4_nf.o: cpuemu.cpp
248 > $(OBJ_DIR)/cpuemu4_nf.o: $(GEN_DIR)/cpuemu.cpp
249          $(CXX) $(CPPFLAGS) $(DEFS) -DPART_4 -DNOFLAGS $(CXXFLAGS) -c $< -o $@
250 < $(OBJ_DIR)/cpuemu5_nf.o: cpuemu.cpp
250 > $(OBJ_DIR)/cpuemu5_nf.o: $(GEN_DIR)/cpuemu.cpp
251          $(CXX) $(CPPFLAGS) $(DEFS) -DPART_5 -DNOFLAGS $(CXXFLAGS) -c $< -o $@
252 < $(OBJ_DIR)/cpuemu6_nf.o: cpuemu.cpp
252 > $(OBJ_DIR)/cpuemu6_nf.o: $(GEN_DIR)/cpuemu.cpp
253          $(CXX) $(CPPFLAGS) $(DEFS) -DPART_6 -DNOFLAGS $(CXXFLAGS) -c $< -o $@
254 < $(OBJ_DIR)/cpuemu7_nf.o: cpuemu.cpp
254 > $(OBJ_DIR)/cpuemu7_nf.o: $(GEN_DIR)/cpuemu.cpp
255          $(CXX) $(CPPFLAGS) $(DEFS) -DPART_7 -DNOFLAGS $(CXXFLAGS) -c $< -o $@
256 < $(OBJ_DIR)/cpuemu8_nf.o: cpuemu.cpp
256 > $(OBJ_DIR)/cpuemu8_nf.o: $(GEN_DIR)/cpuemu.cpp
257          $(CXX) $(CPPFLAGS) $(DEFS) -DPART_8 -DNOFLAGS $(CXXFLAGS) -c $< -o $@
258  
259 < $(OBJ_DIR)/compemu1.o: compemu.cpp
259 > $(OBJ_DIR)/compemu1.o: $(GEN_DIR)/compemu.cpp
260          $(CXX) $(CPPFLAGS) $(DEFS) -DPART_1 $(CXXFLAGS) -c $< -o $@
261 < $(OBJ_DIR)/compemu2.o: compemu.cpp
261 > $(OBJ_DIR)/compemu2.o: $(GEN_DIR)/compemu.cpp
262          $(CXX) $(CPPFLAGS) $(DEFS) -DPART_2 $(CXXFLAGS) -c $< -o $@
263 < $(OBJ_DIR)/compemu3.o: compemu.cpp
263 > $(OBJ_DIR)/compemu3.o: $(GEN_DIR)/compemu.cpp
264          $(CXX) $(CPPFLAGS) $(DEFS) -DPART_3 $(CXXFLAGS) -c $< -o $@
265 < $(OBJ_DIR)/compemu4.o: compemu.cpp
265 > $(OBJ_DIR)/compemu4.o: $(GEN_DIR)/compemu.cpp
266          $(CXX) $(CPPFLAGS) $(DEFS) -DPART_4 $(CXXFLAGS) -c $< -o $@
267 < $(OBJ_DIR)/compemu5.o: compemu.cpp
267 > $(OBJ_DIR)/compemu5.o: $(GEN_DIR)/compemu.cpp
268          $(CXX) $(CPPFLAGS) $(DEFS) -DPART_5 $(CXXFLAGS) -c $< -o $@
269 < $(OBJ_DIR)/compemu6.o: compemu.cpp
269 > $(OBJ_DIR)/compemu6.o: $(GEN_DIR)/compemu.cpp
270          $(CXX) $(CPPFLAGS) $(DEFS) -DPART_6 $(CXXFLAGS) -c $< -o $@
271 < $(OBJ_DIR)/compemu7.o: compemu.cpp
271 > $(OBJ_DIR)/compemu7.o: $(GEN_DIR)/compemu.cpp
272          $(CXX) $(CPPFLAGS) $(DEFS) -DPART_7 $(CXXFLAGS) -c $< -o $@
273 < $(OBJ_DIR)/compemu8.o: compemu.cpp
273 > $(OBJ_DIR)/compemu8.o: $(GEN_DIR)/compemu.cpp
274          $(CXX) $(CPPFLAGS) $(DEFS) -DPART_8 $(CXXFLAGS) -c $< -o $@
275  
276   #-------------------------------------------------------------------------

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines