--- BasiliskII/src/MacOSX/Makefile.in 2004/01/29 12:24:43 1.15 +++ BasiliskII/src/MacOSX/Makefile.in 2006/07/28 13:18:12 1.21 @@ -1,4 +1,4 @@ -# $Id: Makefile.in,v 1.15 2004/01/29 12:24:43 nigel Exp $ +# $Id: Makefile.in,v 1.21 2006/07/28 13:18:12 nigel Exp $ # MacOS X makefile for Basilisk II. Slightly based on the Unix one ## System specific configuration @@ -18,6 +18,7 @@ BLESS = @BLESS@ IDE = @IDE@ PROJECT = @PROJECT@ IDEARGS = @IDEARGS@ +SLIRP_SRCS = @SLIRP_SRCS@ ## Files OBJ_DIR = build @@ -27,9 +28,16 @@ GENSRCS = cpudefs.cpp cpuemu.cpp cpustbl GENEMUS = cpuemu1.cpp cpuemu2.cpp cpuemu3.cpp cpuemu4.cpp \ cpuemu5.cpp cpuemu6.cpp cpuemu7.cpp cpuemu8.cpp +# We compile the emulator source outside of Project Builder/XCode +# so that it always picks up appropriate FLAGS from configure. +# This is necessary because that code doesn't use config.h +EMU_OBJ = $(patsubst %.cpp, build/%.o, $(GENEMUS)) +EMU_LIB = libgenemu.a + + # Symlinks to, or copies of, files in other directories GENLINK = README.txt INSTALL.txt install-sh \ - Darwin config.guess config.sub \ + Darwin config.guess config.sub semaphore.h \ sys_unix.cpp timer_unix.cpp user_strings_unix.h GEN = $(GENEMUS) $(GENSRCS) @@ -38,11 +46,17 @@ SRCS = BasiliskII.icns Controller.h Con Emulator.h Emulator.mm EmulatorView.h EmulatorView.mm English.lproj \ NNThread.h NNThread.m PrefsEditor.h PrefsEditor.mm \ ToDo.html Versions.html \ - audio_macosx.mm extfs_macosx.mm macos_util_macosx.h main_macosx.h \ - main_macosx.mm misc_macosx.h misc_macosx.mm nowrite.icns prefs_macosx.cpp \ - sysdeps.h video_macosx.mm video_macosx.h + audio_macosx.cpp extfs_macosx.mm macos_util_macosx.h main_macosx.h \ + main_macosx.mm misc_macosx.h misc_macosx.mm nowrite.icns \ + prefs_macosx.cpp sysdeps.h video_macosx.mm video_macosx.h + +SLIRP_OBJ = $(patsubst ../slirp/%.c, build/%.o, $(SLIRP_SRCS)) +SLIRP_LIB = libslirp.a + APP = $(OBJ_DIR)/BasiliskII.app +DEPS = $(OBJ_DIR) $(GEN) $(EMU_LIB) $(SLIRP_LIB) $(SRCS) + ## Rules .PHONY: mostlyclean clean distclean depend dep @@ -51,7 +65,7 @@ APP = $(OBJ_DIR)/BasiliskII.app all: $(APP) -ide: $(OBJ_DIR) $(GEN) $(SRCS) +ide: $(DEPS) open $(PROJECT) test: $(APP) @@ -61,7 +75,7 @@ $(OBJ_DIR):: @[ -d $(OBJ_DIR) ] || mkdir $(OBJ_DIR) > /dev/null 2>&1 -$(APP): $(OBJ_DIR) $(GEN) $(SRCS) +$(APP): $(DEPS) $(IDE) -buildstyle Deployment $(IDEARGS) \ && $(BLESS) $(APP)/Contents/MacOS/BasiliskII \ || rm -fr $(APP) @@ -70,12 +84,15 @@ BasiliskII.icns : touch $@ nowrite.icns : - ln -sf /System/Library/CoreServices/Finder.app/Contents/Resources/nowrite.icns . +# ln -sf /System/Library/CoreServices/Finder.app/Contents/Resources/nowrite.icns . + touch $@ mostlyclean: rm -fr English.lproj/*~* $(OBJ_DIR)/* core* *.core *~ *.bak + rm -fr autom4te.cache config tests vhook clean: mostlyclean + rm -f $(SLIRP_LIB) $(EMU_LIB) rm -f $(GEN) rm -f cpudefs.cpp cputmp*.s cpufast*.s cpustbl.cpp @@ -93,13 +110,13 @@ distclean: clean $(OBJ_DIR)/build68k: ../uae_cpu/build68k.c - $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(LDFLAGS) $< -o $@ + $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) $< -o $@ $(OBJ_DIR)/cpuopti: ../uae_cpu/cpuopti.c - $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(LDFLAGS) $< -o $@ + $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) $< -o $@ $(OBJ_DIR)/gencpu: cpudefs.cpp ../uae_cpu/gencpu.c ../uae_cpu/readcpu.cpp - $(CXX) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(CXXFLAGS) $(LDFLAGS) $^ -o $@ + $(CXX) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(CXXFLAGS) $^ -o $@ @@ -123,5 +140,20 @@ cpufast.s: cpuemu.s $(OBJ_DIR)/cpuopti cpuemu.s: cpuemu.cpp $(CXX) $(CPPFLAGS) $(DEFS) -S $(CXXFLAGS) $< -o $@ +$(EMU_OBJ) : build/%.o : %.cpp + $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@ + +build/newcpu.o : ../uae_cpu/newcpu.cpp + $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@ + +$(EMU_LIB) : $(EMU_OBJ) build/newcpu.o + libtool -static -o $@ $^ + +$(SLIRP_OBJ) : build/%.o : ../slirp/%.c + $(CC) -I../slirp $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $< -o $@ + +$(SLIRP_LIB) : $(SLIRP_OBJ) + libtool -static -o $@ $^ + #------------------------------------------------------------------------- # DO NOT DELETE THIS LINE -- make depend depends on it.