1 |
nigel |
1.22 |
# $Id: Makefile.in,v 1.21 2006/07/28 13:18:12 nigel Exp $ |
2 |
nigel |
1.1 |
# MacOS X makefile for Basilisk II. Slightly based on the Unix one |
3 |
|
|
|
4 |
|
|
## System specific configuration |
5 |
|
|
@SET_MAKE@ |
6 |
|
|
SHELL = /bin/sh |
7 |
|
|
|
8 |
|
|
|
9 |
|
|
CC = @CC@ |
10 |
|
|
CXX = @CXX@ |
11 |
|
|
CFLAGS = @CFLAGS@ |
12 |
|
|
CXXFLAGS = @CXXFLAGS@ |
13 |
nigel |
1.5 |
CPPFLAGS = @CPPFLAGS@ -I../include -I. @CPUINCLUDES@ |
14 |
nigel |
1.1 |
DEFS = @DEFS@ @DEFINES@ -D_REENTRANT |
15 |
|
|
LDFLAGS = @LDFLAGS@ |
16 |
|
|
LIBS = @LIBS@ |
17 |
nigel |
1.14 |
BLESS = @BLESS@ |
18 |
|
|
IDE = @IDE@ |
19 |
|
|
PROJECT = @PROJECT@ |
20 |
|
|
IDEARGS = @IDEARGS@ |
21 |
nigel |
1.17 |
SLIRP_SRCS = @SLIRP_SRCS@ |
22 |
nigel |
1.1 |
|
23 |
|
|
## Files |
24 |
|
|
OBJ_DIR = build |
25 |
nigel |
1.4 |
GENSRCS = cpudefs.cpp cpuemu.cpp cpustbl.cpp cputbl.h |
26 |
|
|
|
27 |
|
|
# Wrappers which split the very large cpuemu.cpp into smaller compile units |
28 |
|
|
GENEMUS = cpuemu1.cpp cpuemu2.cpp cpuemu3.cpp cpuemu4.cpp \ |
29 |
|
|
cpuemu5.cpp cpuemu6.cpp cpuemu7.cpp cpuemu8.cpp |
30 |
|
|
|
31 |
nigel |
1.19 |
# We compile the emulator source outside of Project Builder/XCode |
32 |
|
|
# so that it always picks up appropriate FLAGS from configure. |
33 |
|
|
# This is necessary because that code doesn't use config.h |
34 |
|
|
EMU_OBJ = $(patsubst %.cpp, build/%.o, $(GENEMUS)) |
35 |
|
|
EMU_LIB = libgenemu.a |
36 |
|
|
|
37 |
|
|
|
38 |
nigel |
1.12 |
# Symlinks to, or copies of, files in other directories |
39 |
nigel |
1.11 |
GENLINK = README.txt INSTALL.txt install-sh \ |
40 |
nigel |
1.22 |
Darwin config.guess config.sub ether_unix.cpp semaphore.h \ |
41 |
nigel |
1.9 |
sys_unix.cpp timer_unix.cpp user_strings_unix.h |
42 |
nigel |
1.4 |
|
43 |
nigel |
1.7 |
GEN = $(GENEMUS) $(GENSRCS) |
44 |
nigel |
1.4 |
|
45 |
nigel |
1.3 |
SRCS = BasiliskII.icns Controller.h Controller.mm Credits.html \ |
46 |
nigel |
1.1 |
Emulator.h Emulator.mm EmulatorView.h EmulatorView.mm English.lproj \ |
47 |
|
|
NNThread.h NNThread.m PrefsEditor.h PrefsEditor.mm \ |
48 |
|
|
ToDo.html Versions.html \ |
49 |
nigel |
1.21 |
audio_macosx.cpp extfs_macosx.mm macos_util_macosx.h main_macosx.h \ |
50 |
nigel |
1.17 |
main_macosx.mm misc_macosx.h misc_macosx.mm nowrite.icns \ |
51 |
|
|
prefs_macosx.cpp sysdeps.h video_macosx.mm video_macosx.h |
52 |
|
|
|
53 |
|
|
SLIRP_OBJ = $(patsubst ../slirp/%.c, build/%.o, $(SLIRP_SRCS)) |
54 |
|
|
SLIRP_LIB = libslirp.a |
55 |
|
|
|
56 |
nigel |
1.1 |
APP = $(OBJ_DIR)/BasiliskII.app |
57 |
|
|
|
58 |
nigel |
1.19 |
DEPS = $(OBJ_DIR) $(GEN) $(EMU_LIB) $(SLIRP_LIB) $(SRCS) |
59 |
nigel |
1.17 |
|
60 |
nigel |
1.1 |
## Rules |
61 |
|
|
|
62 |
|
|
.PHONY: mostlyclean clean distclean depend dep |
63 |
|
|
.SUFFIXES: |
64 |
|
|
.SUFFIXES: .c .cpp .s .o .h |
65 |
|
|
|
66 |
|
|
all: $(APP) |
67 |
|
|
|
68 |
nigel |
1.17 |
ide: $(DEPS) |
69 |
nigel |
1.14 |
open $(PROJECT) |
70 |
nigel |
1.1 |
|
71 |
|
|
test: $(APP) |
72 |
|
|
open $(APP) |
73 |
|
|
|
74 |
|
|
$(OBJ_DIR):: |
75 |
|
|
@[ -d $(OBJ_DIR) ] || mkdir $(OBJ_DIR) > /dev/null 2>&1 |
76 |
|
|
|
77 |
|
|
|
78 |
nigel |
1.17 |
$(APP): $(DEPS) |
79 |
nigel |
1.14 |
$(IDE) -buildstyle Deployment $(IDEARGS) \ |
80 |
|
|
&& $(BLESS) $(APP)/Contents/MacOS/BasiliskII \ |
81 |
|
|
|| rm -fr $(APP) |
82 |
nigel |
1.1 |
|
83 |
nigel |
1.3 |
BasiliskII.icns : |
84 |
|
|
touch $@ |
85 |
nigel |
1.15 |
|
86 |
|
|
nowrite.icns : |
87 |
nigel |
1.16 |
# ln -sf /System/Library/CoreServices/Finder.app/Contents/Resources/nowrite.icns . |
88 |
|
|
touch $@ |
89 |
nigel |
1.1 |
|
90 |
|
|
mostlyclean: |
91 |
|
|
rm -fr English.lproj/*~* $(OBJ_DIR)/* core* *.core *~ *.bak |
92 |
nigel |
1.19 |
rm -fr autom4te.cache config tests vhook |
93 |
nigel |
1.1 |
|
94 |
|
|
clean: mostlyclean |
95 |
nigel |
1.19 |
rm -f $(SLIRP_LIB) $(EMU_LIB) |
96 |
nigel |
1.4 |
rm -f $(GEN) |
97 |
nigel |
1.1 |
rm -f cpudefs.cpp cputmp*.s cpufast*.s cpustbl.cpp |
98 |
|
|
|
99 |
|
|
distclean: clean |
100 |
nigel |
1.12 |
rm -rf $(OBJ_DIR) |
101 |
|
|
rm -rf autom4te.cache |
102 |
|
|
rm -f Makefile |
103 |
nigel |
1.7 |
rm -f config.cache config.log config.status config.h config.h.in |
104 |
nigel |
1.12 |
rm -f Darwin/lowmem Darwin/pagezero |
105 |
|
|
rm -f $(GENLINK) |
106 |
nigel |
1.1 |
rm -f configure |
107 |
nigel |
1.12 |
rm -f .DS_Store |
108 |
nigel |
1.1 |
|
109 |
|
|
|
110 |
|
|
|
111 |
|
|
|
112 |
|
|
$(OBJ_DIR)/build68k: ../uae_cpu/build68k.c |
113 |
nigel |
1.19 |
$(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) $< -o $@ |
114 |
nigel |
1.1 |
|
115 |
|
|
$(OBJ_DIR)/cpuopti: ../uae_cpu/cpuopti.c |
116 |
nigel |
1.19 |
$(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) $< -o $@ |
117 |
nigel |
1.1 |
|
118 |
nigel |
1.5 |
$(OBJ_DIR)/gencpu: cpudefs.cpp ../uae_cpu/gencpu.c ../uae_cpu/readcpu.cpp |
119 |
nigel |
1.19 |
$(CXX) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(CXXFLAGS) $^ -o $@ |
120 |
nigel |
1.1 |
|
121 |
|
|
|
122 |
|
|
|
123 |
|
|
cpudefs.cpp: $(OBJ_DIR)/build68k ../uae_cpu/table68k |
124 |
|
|
$(OBJ_DIR)/build68k < ../uae_cpu/table68k > $@ |
125 |
|
|
|
126 |
|
|
cpuemu.cpp cpustbl.cpp cputbl.h: $(OBJ_DIR)/gencpu |
127 |
|
|
$< |
128 |
|
|
|
129 |
|
|
|
130 |
nigel |
1.7 |
$(GENEMUS) : cpuemu.cpp |
131 |
|
|
for i in 1 2 3 4 5 6 7 8; \ |
132 |
|
|
do \ |
133 |
|
|
printf "#define PART_%d\n#include \"%s\"\n" $$i $< >cpuemu$$i.cpp; \ |
134 |
|
|
done |
135 |
|
|
|
136 |
|
|
|
137 |
|
|
cpufast.s: cpuemu.s $(OBJ_DIR)/cpuopti |
138 |
|
|
$(OBJ_DIR)/cpuopti <cpuemu.s >$@ || mv cputmp.s $@ |
139 |
|
|
|
140 |
|
|
cpuemu.s: cpuemu.cpp |
141 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -S $(CXXFLAGS) $< -o $@ |
142 |
nigel |
1.1 |
|
143 |
nigel |
1.19 |
$(EMU_OBJ) : build/%.o : %.cpp |
144 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@ |
145 |
|
|
|
146 |
nigel |
1.20 |
build/newcpu.o : ../uae_cpu/newcpu.cpp |
147 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@ |
148 |
|
|
|
149 |
|
|
$(EMU_LIB) : $(EMU_OBJ) build/newcpu.o |
150 |
nigel |
1.19 |
libtool -static -o $@ $^ |
151 |
nigel |
1.17 |
|
152 |
|
|
$(SLIRP_OBJ) : build/%.o : ../slirp/%.c |
153 |
nigel |
1.19 |
$(CC) -I../slirp $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $< -o $@ |
154 |
nigel |
1.17 |
|
155 |
|
|
$(SLIRP_LIB) : $(SLIRP_OBJ) |
156 |
nigel |
1.19 |
libtool -static -o $@ $^ |
157 |
nigel |
1.17 |
|
158 |
nigel |
1.1 |
#------------------------------------------------------------------------- |
159 |
|
|
# DO NOT DELETE THIS LINE -- make depend depends on it. |