1 |
# $Id: Makefile.in,v 1.11 2003/08/02 08:19:48 nigel Exp $ |
2 |
# 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 |
CPPFLAGS = @CPPFLAGS@ -I../include -I. @CPUINCLUDES@ |
14 |
DEFS = @DEFS@ @DEFINES@ -D_REENTRANT |
15 |
LDFLAGS = @LDFLAGS@ |
16 |
LIBS = @LIBS@ |
17 |
|
18 |
## Files |
19 |
OBJ_DIR = build |
20 |
GENSRCS = cpudefs.cpp cpuemu.cpp cpustbl.cpp cputbl.h |
21 |
|
22 |
# Wrappers which split the very large cpuemu.cpp into smaller compile units |
23 |
GENEMUS = cpuemu1.cpp cpuemu2.cpp cpuemu3.cpp cpuemu4.cpp \ |
24 |
cpuemu5.cpp cpuemu6.cpp cpuemu7.cpp cpuemu8.cpp |
25 |
|
26 |
# Symlinks to, or copies of, files in other directories |
27 |
GENLINK = README.txt INSTALL.txt install-sh \ |
28 |
Darwin config.guess config.sub \ |
29 |
sys_unix.cpp timer_unix.cpp user_strings_unix.h |
30 |
|
31 |
GEN = $(GENEMUS) $(GENSRCS) |
32 |
|
33 |
SRCS = BasiliskII.icns Controller.h Controller.mm Credits.html \ |
34 |
Emulator.h Emulator.mm EmulatorView.h EmulatorView.mm English.lproj \ |
35 |
NNThread.h NNThread.m PrefsEditor.h PrefsEditor.mm \ |
36 |
ToDo.html Versions.html \ |
37 |
audio_macosx.mm extfs_macosx.mm macos_util_macosx.h main_macosx.h \ |
38 |
main_macosx.mm misc_macosx.h misc_macosx.mm prefs_macosx.cpp \ |
39 |
sysdeps.h video_macosx.mm video_macosx.h |
40 |
APP = $(OBJ_DIR)/BasiliskII.app |
41 |
|
42 |
## Rules |
43 |
|
44 |
.PHONY: mostlyclean clean distclean depend dep |
45 |
.SUFFIXES: |
46 |
.SUFFIXES: .c .cpp .s .o .h |
47 |
|
48 |
all: $(APP) |
49 |
|
50 |
ide: $(OBJ_DIR) $(GEN) $(SRCS) |
51 |
open BasiliskII.xcode |
52 |
|
53 |
oldide: $(OBJ_DIR) $(GEN) $(SRCS) |
54 |
open BasiliskII.pbproj |
55 |
|
56 |
test: $(APP) |
57 |
open $(APP) |
58 |
|
59 |
$(OBJ_DIR):: |
60 |
@[ -d $(OBJ_DIR) ] || mkdir $(OBJ_DIR) > /dev/null 2>&1 |
61 |
|
62 |
|
63 |
$(APP): $(OBJ_DIR) $(GEN) $(SRCS) |
64 |
pbxbuild -buildstyle Deployment || rm -fr $(APP) |
65 |
# pbxbuild || rm -fr $(APP) |
66 |
|
67 |
BasiliskII.icns : |
68 |
touch $@ |
69 |
|
70 |
mostlyclean: |
71 |
rm -fr English.lproj/*~* $(OBJ_DIR)/* core* *.core *~ *.bak |
72 |
|
73 |
clean: mostlyclean |
74 |
rm -f $(GEN) |
75 |
rm -f cpudefs.cpp cputmp*.s cpufast*.s cpustbl.cpp |
76 |
|
77 |
distclean: clean |
78 |
rm -rf $(OBJ_DIR) |
79 |
rm -rf autom4te.cache |
80 |
rm -f Makefile |
81 |
rm -f config.cache config.log config.status config.h config.h.in |
82 |
rm -f Darwin/lowmem Darwin/pagezero |
83 |
rm -f $(GENLINK) |
84 |
rm -f configure |
85 |
rm -f .DS_Store |
86 |
|
87 |
|
88 |
|
89 |
|
90 |
$(OBJ_DIR)/build68k: ../uae_cpu/build68k.c |
91 |
$(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(LDFLAGS) $< -o $@ |
92 |
|
93 |
$(OBJ_DIR)/cpuopti: ../uae_cpu/cpuopti.c |
94 |
$(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(LDFLAGS) $< -o $@ |
95 |
|
96 |
$(OBJ_DIR)/gencpu: cpudefs.cpp ../uae_cpu/gencpu.c ../uae_cpu/readcpu.cpp |
97 |
$(CXX) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(CXXFLAGS) $(LDFLAGS) $^ -o $@ |
98 |
|
99 |
|
100 |
|
101 |
cpudefs.cpp: $(OBJ_DIR)/build68k ../uae_cpu/table68k |
102 |
$(OBJ_DIR)/build68k < ../uae_cpu/table68k > $@ |
103 |
|
104 |
cpuemu.cpp cpustbl.cpp cputbl.h: $(OBJ_DIR)/gencpu |
105 |
$< |
106 |
|
107 |
|
108 |
$(GENEMUS) : cpuemu.cpp |
109 |
for i in 1 2 3 4 5 6 7 8; \ |
110 |
do \ |
111 |
printf "#define PART_%d\n#include \"%s\"\n" $$i $< >cpuemu$$i.cpp; \ |
112 |
done |
113 |
|
114 |
|
115 |
cpufast.s: cpuemu.s $(OBJ_DIR)/cpuopti |
116 |
$(OBJ_DIR)/cpuopti <cpuemu.s >$@ || mv cputmp.s $@ |
117 |
|
118 |
cpuemu.s: cpuemu.cpp |
119 |
$(CXX) $(CPPFLAGS) $(DEFS) -S $(CXXFLAGS) $< -o $@ |
120 |
|
121 |
#------------------------------------------------------------------------- |
122 |
# DO NOT DELETE THIS LINE -- make depend depends on it. |