macemu/BasiliskII/src/MacOSX/Makefile.in
nigel ecf2403c46 ether_unix.cpp somehow pulls something in that needs mem_banks.
If it isn't compiled in this directory, the wrong config.h is used.
2006-07-31 08:47:52 +00:00

160 lines
4.0 KiB
Makefile

# $Id$
# MacOS X makefile for Basilisk II. Slightly based on the Unix one
## System specific configuration
@SET_MAKE@
SHELL = /bin/sh
CC = @CC@
CXX = @CXX@
CFLAGS = @CFLAGS@
CXXFLAGS = @CXXFLAGS@
CPPFLAGS = @CPPFLAGS@ -I../include -I. @CPUINCLUDES@
DEFS = @DEFS@ @DEFINES@ -D_REENTRANT
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
BLESS = @BLESS@
IDE = @IDE@
PROJECT = @PROJECT@
IDEARGS = @IDEARGS@
SLIRP_SRCS = @SLIRP_SRCS@
## Files
OBJ_DIR = build
GENSRCS = cpudefs.cpp cpuemu.cpp cpustbl.cpp cputbl.h
# 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
# 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 ether_unix.cpp semaphore.h \
sys_unix.cpp timer_unix.cpp user_strings_unix.h
GEN = $(GENEMUS) $(GENSRCS)
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 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
.SUFFIXES:
.SUFFIXES: .c .cpp .s .o .h
all: $(APP)
ide: $(DEPS)
open $(PROJECT)
test: $(APP)
open $(APP)
$(OBJ_DIR)::
@[ -d $(OBJ_DIR) ] || mkdir $(OBJ_DIR) > /dev/null 2>&1
$(APP): $(DEPS)
$(IDE) -buildstyle Deployment $(IDEARGS) \
&& $(BLESS) $(APP)/Contents/MacOS/BasiliskII \
|| rm -fr $(APP)
BasiliskII.icns :
touch $@
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
distclean: clean
rm -rf $(OBJ_DIR)
rm -rf autom4te.cache
rm -f Makefile
rm -f config.cache config.log config.status config.h config.h.in
rm -f Darwin/lowmem Darwin/pagezero
rm -f $(GENLINK)
rm -f configure
rm -f .DS_Store
$(OBJ_DIR)/build68k: ../uae_cpu/build68k.c
$(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) $< -o $@
$(OBJ_DIR)/cpuopti: ../uae_cpu/cpuopti.c
$(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) $< -o $@
$(OBJ_DIR)/gencpu: cpudefs.cpp ../uae_cpu/gencpu.c ../uae_cpu/readcpu.cpp
$(CXX) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(CXXFLAGS) $^ -o $@
cpudefs.cpp: $(OBJ_DIR)/build68k ../uae_cpu/table68k
$(OBJ_DIR)/build68k < ../uae_cpu/table68k > $@
cpuemu.cpp cpustbl.cpp cputbl.h: $(OBJ_DIR)/gencpu
$<
$(GENEMUS) : cpuemu.cpp
for i in 1 2 3 4 5 6 7 8; \
do \
printf "#define PART_%d\n#include \"%s\"\n" $$i $< >cpuemu$$i.cpp; \
done
cpufast.s: cpuemu.s $(OBJ_DIR)/cpuopti
$(OBJ_DIR)/cpuopti <cpuemu.s >$@ || mv cputmp.s $@
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.