14 |
|
DEFS = @DEFS@ @DEFINES@ -D_REENTRANT |
15 |
|
LDFLAGS = @LDFLAGS@ |
16 |
|
LIBS = @LIBS@ |
17 |
+ |
BLESS = @BLESS@ |
18 |
+ |
IDE = @IDE@ |
19 |
+ |
PROJECT = @PROJECT@ |
20 |
+ |
IDEARGS = @IDEARGS@ |
21 |
+ |
SLIRP_SRCS = @SLIRP_SRCS@ |
22 |
|
|
23 |
|
## Files |
24 |
|
OBJ_DIR = build |
30 |
|
|
31 |
|
# Symlinks to, or copies of, files in other directories |
32 |
|
GENLINK = README.txt INSTALL.txt install-sh \ |
33 |
< |
Darwin config.guess config.sub \ |
33 |
> |
Darwin config.guess config.sub semaphore.h \ |
34 |
|
sys_unix.cpp timer_unix.cpp user_strings_unix.h |
35 |
|
|
36 |
|
GEN = $(GENEMUS) $(GENSRCS) |
40 |
|
NNThread.h NNThread.m PrefsEditor.h PrefsEditor.mm \ |
41 |
|
ToDo.html Versions.html \ |
42 |
|
audio_macosx.mm extfs_macosx.mm macos_util_macosx.h main_macosx.h \ |
43 |
< |
main_macosx.mm misc_macosx.h misc_macosx.mm prefs_macosx.cpp \ |
44 |
< |
sysdeps.h video_macosx.mm video_macosx.h |
43 |
> |
main_macosx.mm misc_macosx.h misc_macosx.mm nowrite.icns \ |
44 |
> |
prefs_macosx.cpp sysdeps.h video_macosx.mm video_macosx.h |
45 |
> |
|
46 |
> |
SLIRP_OBJ = $(patsubst ../slirp/%.c, build/%.o, $(SLIRP_SRCS)) |
47 |
> |
SLIRP_LIB = libslirp.a |
48 |
> |
|
49 |
|
APP = $(OBJ_DIR)/BasiliskII.app |
50 |
|
|
51 |
+ |
DEPS = $(OBJ_DIR) $(GEN) $(SLIRP_LIB) $(SRCS) |
52 |
+ |
|
53 |
|
## Rules |
54 |
|
|
55 |
|
.PHONY: mostlyclean clean distclean depend dep |
58 |
|
|
59 |
|
all: $(APP) |
60 |
|
|
61 |
< |
ide: $(OBJ_DIR) $(GEN) $(SRCS) |
62 |
< |
open BasiliskII.xcode |
52 |
< |
|
53 |
< |
oldide: $(OBJ_DIR) $(GEN) $(SRCS) |
54 |
< |
open BasiliskII.pbproj |
61 |
> |
ide: $(DEPS) |
62 |
> |
open $(PROJECT) |
63 |
|
|
64 |
|
test: $(APP) |
65 |
|
open $(APP) |
68 |
|
@[ -d $(OBJ_DIR) ] || mkdir $(OBJ_DIR) > /dev/null 2>&1 |
69 |
|
|
70 |
|
|
71 |
< |
$(APP): $(OBJ_DIR) $(GEN) $(SRCS) |
72 |
< |
pbxbuild -buildstyle Deployment || rm -fr $(APP) |
73 |
< |
# pbxbuild || rm -fr $(APP) |
71 |
> |
$(APP): $(DEPS) |
72 |
> |
$(IDE) -buildstyle Deployment $(IDEARGS) \ |
73 |
> |
&& $(BLESS) $(APP)/Contents/MacOS/BasiliskII \ |
74 |
> |
|| rm -fr $(APP) |
75 |
|
|
76 |
|
BasiliskII.icns : |
77 |
|
touch $@ |
78 |
|
|
79 |
+ |
nowrite.icns : |
80 |
+ |
# ln -sf /System/Library/CoreServices/Finder.app/Contents/Resources/nowrite.icns . |
81 |
+ |
touch $@ |
82 |
+ |
|
83 |
|
mostlyclean: |
84 |
|
rm -fr English.lproj/*~* $(OBJ_DIR)/* core* *.core *~ *.bak |
85 |
|
|
86 |
|
clean: mostlyclean |
87 |
+ |
rm -f $(SLIRP_LIB) |
88 |
|
rm -f $(GEN) |
89 |
|
rm -f cpudefs.cpp cputmp*.s cpufast*.s cpustbl.cpp |
90 |
|
|
132 |
|
cpuemu.s: cpuemu.cpp |
133 |
|
$(CXX) $(CPPFLAGS) $(DEFS) -S $(CXXFLAGS) $< -o $@ |
134 |
|
|
135 |
+ |
|
136 |
+ |
$(SLIRP_OBJ) : build/%.o : ../slirp/%.c |
137 |
+ |
$(CC) -I../slirp $(CPPFLAGS) $(DEFS) $(CFLAGS) $(LDFLAGS) -c $< -o $@ |
138 |
+ |
|
139 |
+ |
$(SLIRP_LIB) : $(SLIRP_OBJ) |
140 |
+ |
libtool -static -o libslirp.a build/*.o |
141 |
+ |
|
142 |
|
#------------------------------------------------------------------------- |
143 |
|
# DO NOT DELETE THIS LINE -- make depend depends on it. |