--- BasiliskII/src/MacOSX/Makefile.in 2002/03/16 11:50:45 1.4 +++ BasiliskII/src/MacOSX/Makefile.in 2007/06/15 09:16:58 1.23 @@ -1,191 +1,199 @@ -# MacOS X makefile for Basilisk II. Slightly based on the Unix one +# Unix makefile for Basilisk II ## System specific configuration -@SET_MAKE@ SHELL = /bin/sh - CC = @CC@ CXX = @CXX@ -CFLAGS = @CFLAGS@ -CXXFLAGS = @CXXFLAGS@ -CPPFLAGS = @CPPFLAGS@ -I../include -I. -I../uae_cpu -DEFS = @DEFS@ @DEFINES@ -D_REENTRANT +CFLAGS = @CFLAGS@ -g +CXXFLAGS = @CXXFLAGS@ -g +CPPFLAGS = @CPPFLAGS@ -I../include -I. @CPUINCLUDES@ -I../slirp +DEFS = @DEFS@ @DEFINES@ -D_REENTRANT -DAQUA LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ +SYSSRCS = @SYSSRCS@ +CPUSRCS = @CPUSRCS@ +BLESS = @BLESS@ +LN_S = ln -s + +SLIRP_CFLAGS = @SLIRP_CFLAGS@ +SLIRP_SRCS = @SLIRP_SRCS@ +SLIRP_OBJS = $(SLIRP_SRCS:../slirp/%.c=obj/%.o) ## Files -OBJ_DIR = build -GENSRCS = cpudefs.cpp cpuemu.cpp cpustbl.cpp cputbl.h +UNIXSRCS = vm_alloc.cpp vm_alloc.h sigsegv.cpp sigsegv.h video_vosf.h video_blit.cpp \ + xpram_unix.cpp user_strings_unix.cpp user_strings_unix.h \ + serial_unix.cpp ether_unix.cpp sys_unix.cpp timer_unix.cpp \ + sshpty.c sshpty.h strlcpy.c strlcpy.h semaphore.h +SRCS = ../main.cpp main_macosx.mm ../prefs.cpp ../prefs_items.cpp prefs_macosx.mm \ + sys_unix.cpp sys_darwin.cpp ../rom_patches.cpp ../slot_rom.cpp ../rsrc_patches.cpp \ + ../emul_op.cpp ../macos_util.cpp ../xpram.cpp xpram_unix.cpp ../timer.cpp \ + timer_unix.cpp ../adb.cpp ../serial.cpp serial_unix.cpp ../ether.cpp ether_unix.cpp \ + ../sony.cpp ../disk.cpp ../cdrom.cpp ../scsi.cpp ../video.cpp video_macosx.mm \ + vm_alloc.cpp sigsegv.cpp ../audio.cpp ../extfs.cpp extfs_macosx.mm \ + ../user_strings.cpp user_strings_unix.cpp clip_macosx.cpp misc_macosx.mm \ + ../dummy/scsi_dummy.cpp \ + audio_macosx.cpp AudioBackEnd.cpp AudioDevice.cpp MacOSX_sound_if.cpp \ + NNThread.m Emulator.mm EmulatorView.mm Controller.mm PrefsEditor.mm \ + sshpty.c strlcpy.c \ + $(CPUSRCS) $(SLIRP_SRCS) +APP = BasiliskII +APP_APP = $(APP).app -# Wrappers which split the very large cpuemu.cpp into smaller compile units -GENEMUS = cpuemu1.cpp cpuemu2.cpp cpuemu3.cpp cpuemu4.cpp \ - cpuemu5.cpp cpuemu6.cpp cpuemu7.cpp cpuemu8.cpp - -# Symlinks to files in other directories -GENLINK = README.txt acconfig.h install-sh \ - config.guess config.sub user_strings_unix.h - -GEN = $(GENEMUS) $(GENSRCS) $(GENLINK) - -SRCS = BasiliskII.icns Controller.h Controller.mm Credits.html \ - Emulator.h Emulator.mm EmulatorView.h EmulatorView.mm English.lproj \ - NNThread.h NNThread.m PrefsEditor.h PrefsEditor.mm \ - ToDo.html Versions.html \ - audio_macosx.cpp extfs_macosx.mm macos_util_macosx.h main_macosx.h \ - main_macosx.mm misc_macosx.h misc_macosx.mm prefs_macosx.cpp \ - sysdeps.h video_macosx.mm video_macosx.h -APP = $(OBJ_DIR)/BasiliskII.app +PROGS = $(APP)_app +DOCS = README.txt Credits.html ToDo.html HowTo.html Versions.html ## Rules - -.PHONY: mostlyclean clean distclean depend dep +.PHONY: modules install installdirs uninstall mostlyclean clean distclean depend dep .SUFFIXES: .SUFFIXES: .c .cpp .s .o .h -all: $(APP) - -ide: $(OBJ_DIR) $(GEN) $(SRCS) - open BasiliskII.pbproj +all: $(PROGS) -test: $(APP) - open $(APP) +README.txt: ../../README + $(LN_S) $< $@ +$(UNIXSRCS): %: ../Unix/% + $(LN_S) $< $@ +OBJ_DIR = obj $(OBJ_DIR):: @[ -d $(OBJ_DIR) ] || mkdir $(OBJ_DIR) > /dev/null 2>&1 - -$(APP): $(OBJ_DIR) $(GENSRCS) $(SRCS) - pbxbuild -buildstyle Deployment -# pbxbuild - -BasiliskII.icns : - touch $@ +define SRCS_LIST_TO_OBJS + $(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(foreach file, $(SRCS), \ + $(basename $(notdir $(file)))))) +endef +OBJS = $(SRCS_LIST_TO_OBJS) + +SRC_PATHS += $(sort $(foreach file, $(SRCS), $(dir $(file)))) +VPATH := +VPATH += $(addprefix :, $(subst ,:, $(filter-out $($(subst, :, ,$(VPATH))), $(SRC_PATHS)))) + +$(APP): $(UNIXSRCS) $(OBJ_DIR) $(OBJS) + $(CXX) -o $@ $(LDFLAGS) $(OBJS) $(LIBS) + $(BLESS) $(APP) + +$(APP)_app: $(APP) $(DOCS) ../MacOSX/Info.plist ../MacOSX/$(APP).icns + mkdir -p $(APP_APP)/Contents + cp -f ../MacOSX/Info.plist $(APP_APP)/Contents/ + echo -n 'APPL????' > $(APP_APP)/Contents/PkgInfo + mkdir -p $(APP_APP)/Contents/MacOS + cp -f $(APP) $(APP_APP)/Contents/MacOS/ + strip $(APP_APP)/Contents/MacOS/$(APP) + mkdir -p $(APP_APP)/Contents/Resources + cp -Rp English.lproj $(APP_APP)/Contents/Resources/ + cp -f ../MacOSX/$(APP).icns $(APP_APP)/Contents/Resources/ + cp -f $(DOCS) $(APP_APP)/Contents/Resources/ + find $(APP_APP) -type d -name CVS | xargs rm -rf mostlyclean: - rm -fr English.lproj/*~* $(OBJ_DIR)/* core* *.core *~ *.bak + rm -rf $(APP_APP) + rm -f $(PROGS) $(OBJ_DIR)/* core* *.core *~ *.bak clean: mostlyclean - rm -f $(GEN) - rm -f cpudefs.cpp cputmp*.s cpufast*.s cpustbl.cpp + rm -f $(UNIXSRCS) + rm -f cpuemu.cpp cpudefs.cpp cputmp*.s cpufast*.s cpustbl.cpp cputbl.h compemu.cpp compstbl.cpp comptbl.h distclean: clean - rm -fr $(OBJ_DIR) - rm -f config.cache config.log config.status config.h - rm -f configure + rm -rf $(OBJ_DIR) + rm -rf autom4te.cache rm -f Makefile + rm -f config.cache config.log config.status config.h + rm -f Darwin/lowmem Darwin/pagezero +depend dep: + makedepend $(CPPFLAGS) -Y. $(SRCS) 2>/dev/null - - -$(OBJ_DIR)/build68k: ../uae_cpu/build68k.c - $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(LDFLAGS) $< -o $@ - -$(OBJ_DIR)/cpuopti: ../uae_cpu/cpuopti.c - $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(LDFLAGS) $< -o $@ - -#$(OBJ_DIR)/gencpu: cpudefs.cpp ../uae_cpu/gencpu.c ../uae_cpu/readcpu.cpp -# $(CXX) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(CXXFLAGS) $(LDFLAGS) $< -o $@ - -$(OBJ_DIR)/gencpu: $(OBJ_DIR)/gencpu.o $(OBJ_DIR)/readcpu.o $(OBJ_DIR)/cpudefs.o - $(CC) $(LDFLAGS) $^ -o $@ - -$(OBJ_DIR)/gencpu.o : ../uae_cpu/gencpu.c +$(OBJ_DIR)/%.o : ../slirp/%.c + $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(SLIRP_CFLAGS) -c $< -o $@ +$(OBJ_DIR)/%.o : %.c $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $< -o $@ - -$(OBJ_DIR)/readcpu.o: ../uae_cpu/readcpu.cpp +$(OBJ_DIR)/%.o : %.cpp $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@ - -$(OBJ_DIR)/cpudefs.o: cpudefs.cpp +$(OBJ_DIR)/%.o : %.m + $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $< -o $@ +$(OBJ_DIR)/%.o : %.mm $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@ +$(OBJ_DIR)/%.o : %.s + $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $< -o $@ +$(OBJ_DIR)/build68k: $(OBJ_DIR)/build68k.o + $(CC) $(LDFLAGS) -o $(OBJ_DIR)/build68k $(OBJ_DIR)/build68k.o +$(OBJ_DIR)/gencpu: $(OBJ_DIR)/gencpu.o $(OBJ_DIR)/readcpu.o $(OBJ_DIR)/cpudefs.o + $(CXX) $(LDFLAGS) -o $(OBJ_DIR)/gencpu $(OBJ_DIR)/gencpu.o $(OBJ_DIR)/readcpu.o $(OBJ_DIR)/cpudefs.o +$(OBJ_DIR)/gencomp: $(OBJ_DIR)/gencomp.o $(OBJ_DIR)/readcpu.o $(OBJ_DIR)/cpudefs.o + $(CXX) $(LDFLAGS) -o $(OBJ_DIR)/gencomp $(OBJ_DIR)/gencomp.o $(OBJ_DIR)/readcpu.o $(OBJ_DIR)/cpudefs.o cpudefs.cpp: $(OBJ_DIR)/build68k ../uae_cpu/table68k - $(OBJ_DIR)/build68k < ../uae_cpu/table68k > $@ + $(OBJ_DIR)/build68k <../uae_cpu/table68k >cpudefs.cpp +cpustbl.cpp: cpuemu.cpp +cpustbl_nf.cpp: cpustbl.cpp +compstbl.cpp: compemu.cpp +cputbl.h: cpuemu.cpp +comptbl.h: compemu.cpp + +cpuemu.cpp: $(OBJ_DIR)/gencpu + $(OBJ_DIR)/gencpu -cpuemu.cpp cpustbl.cpp cputbl.h: $(OBJ_DIR)/gencpu - $< +compemu.cpp: $(OBJ_DIR)/gencomp + $(OBJ_DIR)/gencomp +$(OBJ_DIR)/cpustbl_nf.o: cpustbl.cpp + $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -DNOFLAGS -c $< -o $@ + +$(OBJ_DIR)/compemu_support.o: compemu_support.cpp comptbl.h + $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@ -cpuemu1.cpp: cpuemu.cpp - echo '#define PART_1' > $@ - echo '#include "$<"' >> $@ -cpuemu2.cpp: cpuemu.cpp - echo '#define PART_2' > $@ - echo '#include "$<"' >> $@ -cpuemu3.cpp: cpuemu.cpp - echo '#define PART_3' > $@ - echo '#include "$<"' >> $@ -cpuemu4.cpp: cpuemu.cpp - echo '#define PART_4' > $@ - echo '#include "$<"' >> $@ -cpuemu5.cpp: cpuemu.cpp - echo '#define PART_5' > $@ - echo '#include "$<"' >> $@ -cpuemu6.cpp: cpuemu.cpp - echo '#define PART_6' > $@ - echo '#include "$<"' >> $@ -cpuemu7.cpp: cpuemu.cpp - echo '#define PART_7' > $@ - echo '#include "$<"' >> $@ -cpuemu8.cpp: cpuemu.cpp - echo '#define PART_8' > $@ - echo '#include "$<"' >> $@ - -#cpuemu1.cpp: cpuemu.cpp -# $(CXX) $(CPPFLAGS) $(DEFS) -DPART_1 -E $< > $@ -#cpuemu2.cpp: cpuemu.cpp -# $(CXX) $(CPPFLAGS) $(DEFS) -DPART_2 -E $< > $@ -#cpuemu3.cpp: cpuemu.cpp -# $(CXX) $(CPPFLAGS) $(DEFS) -DPART_3 -E $< > $@ -#cpuemu4.cpp: cpuemu.cpp -# $(CXX) $(CPPFLAGS) $(DEFS) -DPART_4 -E $< > $@ -#cpuemu5.cpp: cpuemu.cpp -# $(CXX) $(CPPFLAGS) $(DEFS) -DPART_5 -E $< > $@ -#cpuemu6.cpp: cpuemu.cpp -# $(CXX) $(CPPFLAGS) $(DEFS) -DPART_6 -E $< > $@ -#cpuemu7.cpp: cpuemu.cpp -# $(CXX) $(CPPFLAGS) $(DEFS) -DPART_7 -E $< > $@ -#cpuemu8.cpp: cpuemu.cpp -# $(CXX) $(CPPFLAGS) $(DEFS) -DPART_8 -E $< > $@ - - -cpufast.s: cpuemu.cpp $(OBJ_DIR)/cpuopti - $(CXX) $(CPPFLAGS) $(DEFS) -S $(CXXFLAGS) $< -o cputmp.s - $(OBJ_DIR)/cpuopti $@ || mv cputmp.s $@ - rm -f cputmp.s -cpufast1.s: cpuemu.cpp $(OBJ_DIR)/cpuopti - $(CXX) $(CPPFLAGS) $(DEFS) -DPART_1 -S $(CXXFLAGS) $< -o cputmp1.s - $(OBJ_DIR)/cpuopti $@ || mv cputmp1.s $@ - rm -f cputmp1.s -cpufast2.s: cpuemu.cpp $(OBJ_DIR)/cpuopti - $(CXX) $(CPPFLAGS) $(DEFS) -DPART_2 -S $(CXXFLAGS) $< -o cputmp2.s - $(OBJ_DIR)/cpuopti $@ || mv cputmp2.s $@ - rm -f cputmp2.s -cpufast3.s: cpuemu.cpp $(OBJ_DIR)/cpuopti - $(CXX) $(CPPFLAGS) $(DEFS) -DPART_3 -S $(CXXFLAGS) $< -o cputmp3.s - $(OBJ_DIR)/cpuopti $@ || mv cputmp3.s $@ - rm -f cputmp3.s -cpufast4.s: cpuemu.cpp $(OBJ_DIR)/cpuopti - $(CXX) $(CPPFLAGS) $(DEFS) -DPART_4 -S $(CXXFLAGS) $< -o cputmp4.s - $(OBJ_DIR)/cpuopti $@ || mv cputmp4.s $@ - rm -f cputmp4.s -cpufast5.s: cpuemu.cpp $(OBJ_DIR)/cpuopti - $(CXX) $(CPPFLAGS) $(DEFS) -DPART_5 -S $(CXXFLAGS) $< -o cputmp5.s - $(OBJ_DIR)/cpuopti $@ || mv cputmp5.s $@ - rm -f cputmp5.s -cpufast6.s: cpuemu.cpp $(OBJ_DIR)/cpuopti - $(CXX) $(CPPFLAGS) $(DEFS) -DPART_6 -S $(CXXFLAGS) $< -o cputmp6.s - $(OBJ_DIR)/cpuopti $@ || mv cputmp6.s $@ - rm -f cputmp6.s -cpufast7.s: cpuemu.cpp $(OBJ_DIR)/cpuopti - $(CXX) $(CPPFLAGS) $(DEFS) -DPART_7 -S $(CXXFLAGS) $< -o cputmp7.s - $(OBJ_DIR)/cpuopti $@ || mv cputmp7.s $@ - rm -f cputmp7.s -cpufast8.s: cpuemu.cpp $(OBJ_DIR)/cpuopti - $(CXX) $(CPPFLAGS) $(DEFS) -DPART_8 -S $(CXXFLAGS) $< -o cputmp8.s - $(OBJ_DIR)/cpuopti $@ || mv cputmp8.s $@ - rm -f cputmp8.s +$(OBJ_DIR)/cpuemu1.o: cpuemu.cpp + $(CXX) $(CPPFLAGS) $(DEFS) -DPART_1 $(CXXFLAGS) -c $< -o $@ +$(OBJ_DIR)/cpuemu2.o: cpuemu.cpp + $(CXX) $(CPPFLAGS) $(DEFS) -DPART_2 $(CXXFLAGS) -c $< -o $@ +$(OBJ_DIR)/cpuemu3.o: cpuemu.cpp + $(CXX) $(CPPFLAGS) $(DEFS) -DPART_3 $(CXXFLAGS) -c $< -o $@ +$(OBJ_DIR)/cpuemu4.o: cpuemu.cpp + $(CXX) $(CPPFLAGS) $(DEFS) -DPART_4 $(CXXFLAGS) -c $< -o $@ +$(OBJ_DIR)/cpuemu5.o: cpuemu.cpp + $(CXX) $(CPPFLAGS) $(DEFS) -DPART_5 $(CXXFLAGS) -c $< -o $@ +$(OBJ_DIR)/cpuemu6.o: cpuemu.cpp + $(CXX) $(CPPFLAGS) $(DEFS) -DPART_6 $(CXXFLAGS) -c $< -o $@ +$(OBJ_DIR)/cpuemu7.o: cpuemu.cpp + $(CXX) $(CPPFLAGS) $(DEFS) -DPART_7 $(CXXFLAGS) -c $< -o $@ +$(OBJ_DIR)/cpuemu8.o: cpuemu.cpp + $(CXX) $(CPPFLAGS) $(DEFS) -DPART_8 $(CXXFLAGS) -c $< -o $@ + +$(OBJ_DIR)/cpuemu1_nf.o: cpuemu.cpp + $(CXX) $(CPPFLAGS) $(DEFS) -DPART_1 -DNOFLAGS $(CXXFLAGS) -c $< -o $@ +$(OBJ_DIR)/cpuemu2_nf.o: cpuemu.cpp + $(CXX) $(CPPFLAGS) $(DEFS) -DPART_2 -DNOFLAGS $(CXXFLAGS) -c $< -o $@ +$(OBJ_DIR)/cpuemu3_nf.o: cpuemu.cpp + $(CXX) $(CPPFLAGS) $(DEFS) -DPART_3 -DNOFLAGS $(CXXFLAGS) -c $< -o $@ +$(OBJ_DIR)/cpuemu4_nf.o: cpuemu.cpp + $(CXX) $(CPPFLAGS) $(DEFS) -DPART_4 -DNOFLAGS $(CXXFLAGS) -c $< -o $@ +$(OBJ_DIR)/cpuemu5_nf.o: cpuemu.cpp + $(CXX) $(CPPFLAGS) $(DEFS) -DPART_5 -DNOFLAGS $(CXXFLAGS) -c $< -o $@ +$(OBJ_DIR)/cpuemu6_nf.o: cpuemu.cpp + $(CXX) $(CPPFLAGS) $(DEFS) -DPART_6 -DNOFLAGS $(CXXFLAGS) -c $< -o $@ +$(OBJ_DIR)/cpuemu7_nf.o: cpuemu.cpp + $(CXX) $(CPPFLAGS) $(DEFS) -DPART_7 -DNOFLAGS $(CXXFLAGS) -c $< -o $@ +$(OBJ_DIR)/cpuemu8_nf.o: cpuemu.cpp + $(CXX) $(CPPFLAGS) $(DEFS) -DPART_8 -DNOFLAGS $(CXXFLAGS) -c $< -o $@ + +$(OBJ_DIR)/compemu1.o: compemu.cpp + $(CXX) $(CPPFLAGS) $(DEFS) -DPART_1 $(CXXFLAGS) -c $< -o $@ +$(OBJ_DIR)/compemu2.o: compemu.cpp + $(CXX) $(CPPFLAGS) $(DEFS) -DPART_2 $(CXXFLAGS) -c $< -o $@ +$(OBJ_DIR)/compemu3.o: compemu.cpp + $(CXX) $(CPPFLAGS) $(DEFS) -DPART_3 $(CXXFLAGS) -c $< -o $@ +$(OBJ_DIR)/compemu4.o: compemu.cpp + $(CXX) $(CPPFLAGS) $(DEFS) -DPART_4 $(CXXFLAGS) -c $< -o $@ +$(OBJ_DIR)/compemu5.o: compemu.cpp + $(CXX) $(CPPFLAGS) $(DEFS) -DPART_5 $(CXXFLAGS) -c $< -o $@ +$(OBJ_DIR)/compemu6.o: compemu.cpp + $(CXX) $(CPPFLAGS) $(DEFS) -DPART_6 $(CXXFLAGS) -c $< -o $@ +$(OBJ_DIR)/compemu7.o: compemu.cpp + $(CXX) $(CPPFLAGS) $(DEFS) -DPART_7 $(CXXFLAGS) -c $< -o $@ +$(OBJ_DIR)/compemu8.o: compemu.cpp + $(CXX) $(CPPFLAGS) $(DEFS) -DPART_8 $(CXXFLAGS) -c $< -o $@ #------------------------------------------------------------------------- # DO NOT DELETE THIS LINE -- make depend depends on it.