27 |
|
DYNGEN_CC = @DYNGEN_CC@ |
28 |
|
DYNGEN_OP_FLAGS = @DYNGEN_OP_FLAGS@ |
29 |
|
BLESS = @BLESS@ |
30 |
+ |
EXEEXT = @EXEEXT@ |
31 |
+ |
KEYCODES = @KEYCODES@ |
32 |
|
INSTALL = @INSTALL@ |
33 |
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@ -s |
34 |
|
INSTALL_DATA = @INSTALL_DATA@ |
38 |
|
../rom_patches.cpp ../rsrc_patches.cpp ../emul_op.cpp ../name_registry.cpp \ |
39 |
|
../macos_util.cpp ../timer.cpp timer_unix.cpp ../xpram.cpp xpram_unix.cpp \ |
40 |
|
../adb.cpp ../sony.cpp ../disk.cpp ../cdrom.cpp ../scsi.cpp \ |
41 |
< |
../video.cpp video_blit.cpp ../audio.cpp ../ether.cpp ../thunks.cpp \ |
42 |
< |
../serial.cpp ../extfs.cpp extfs_unix.cpp \ |
41 |
> |
../gfxaccel.cpp ../video.cpp video_blit.cpp ../audio.cpp ../ether.cpp ../thunks.cpp \ |
42 |
> |
../serial.cpp ../extfs.cpp \ |
43 |
|
about_window_unix.cpp ../user_strings.cpp user_strings_unix.cpp \ |
44 |
|
vm_alloc.cpp sigsegv.cpp \ |
45 |
|
sshpty.c strlcpy.c $(SYSSRCS) $(CPUSRCS) |
46 |
|
APP = SheepShaver |
47 |
+ |
APP_EXE = $(APP)$(EXEEXT) |
48 |
+ |
APP_APP = $(APP).app |
49 |
|
|
50 |
|
## Rules |
51 |
|
.PHONY: modules install uninstall clean distclean depend dep |
52 |
|
.SUFFIXES: |
53 |
|
.SUFFIXES: .c .cpp .S .o .h |
54 |
|
|
55 |
< |
all: $(APP) |
55 |
> |
all: $(APP_EXE) |
56 |
|
|
57 |
|
OBJ_DIR = obj |
58 |
|
$(OBJ_DIR):: |
74 |
|
VPATH := |
75 |
|
VPATH += $(addprefix :, $(subst ,:, $(filter-out $($(subst, :, ,$(VPATH))), $(SRC_PATHS)))) |
76 |
|
|
77 |
< |
$(APP): $(OBJ_DIR) $(OBJS) |
78 |
< |
$(CXX) -o $(APP) $(LDFLAGS) $(OBJS) $(LIBS) |
79 |
< |
$(BLESS) $(APP) |
77 |
> |
$(APP_EXE): $(OBJ_DIR) $(OBJS) |
78 |
> |
$(CXX) -o $(APP_EXE) $(LDFLAGS) $(OBJS) $(LIBS) |
79 |
> |
$(BLESS) $(APP_EXE) |
80 |
> |
|
81 |
> |
$(APP)_app: $(APP) ../MacOSX/Info.plist ../MacOSX/SheepShaver.icns |
82 |
> |
mkdir -p $(APP_APP)/Contents |
83 |
> |
cp -f ../MacOSX/Info.plist $(APP_APP)/Contents/ |
84 |
> |
echo -n 'APPL????' > $(APP_APP)/Contents/PkgInfo |
85 |
> |
mkdir -p $(APP_APP)/Contents/MacOS |
86 |
> |
cp -f $(APP) $(APP_APP)/Contents/MacOS/ |
87 |
> |
strip $(APP_APP)/Contents/MacOS/$(APP) |
88 |
> |
mkdir -p $(APP_APP)/Contents/Resources |
89 |
> |
cp -f ../MacOSX/SheepShaver.icns $(APP_APP)/Contents/Resources/ |
90 |
|
|
91 |
|
modules: |
92 |
|
cd NetDriver; make |
93 |
|
|
94 |
< |
install: $(APP) installdirs |
95 |
< |
$(INSTALL_PROGRAM) $(APP) $(DESTDIR)$(bindir)/$(APP) |
94 |
> |
install: $(APP_EXE) installdirs |
95 |
> |
$(INSTALL_PROGRAM) $(APP_EXE) $(DESTDIR)$(bindir)/$(APP_EXE) |
96 |
|
-$(INSTALL_DATA) $(APP).1 $(DESTDIR)$(man1dir)/$(APP).1 |
97 |
< |
$(INSTALL_DATA) keycodes $(DESTDIR)$(datadir)/$(APP)/keycodes |
97 |
> |
$(INSTALL_DATA) $(KEYCODES) $(DESTDIR)$(datadir)/$(APP)/keycodes |
98 |
|
$(INSTALL_DATA) tunconfig $(DESTDIR)$(datadir)/$(APP)/tunconfig |
99 |
|
chmod 755 $(DESTDIR)$(datadir)/$(APP)/tunconfig |
100 |
|
|
102 |
|
$(SHELL) mkinstalldirs $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir) $(DESTDIR)$(datadir)/$(APP) |
103 |
|
|
104 |
|
uninstall: |
105 |
< |
rm -f $(DESTDIR)$(bindir)/$(APP) |
105 |
> |
rm -f $(DESTDIR)$(bindir)/$(APP_EXE) |
106 |
|
rm -f $(DESTDIR)$(man1dir)/$(APP).1 |
107 |
|
rm -f $(DESTDIR)$(datadir)/$(APP)/keycodes |
108 |
|
rm -f $(DESTDIR)$(datadir)/$(APP)/tunconfig |
109 |
|
rmdir $(DESTDIR)$(datadir)/$(APP) |
110 |
|
|
111 |
|
clean: |
112 |
< |
rm -f $(APP) $(OBJ_DIR)/* core* *.core *~ *.bak ppc-execute-impl.cpp |
112 |
> |
rm -f $(APP_EXE) $(OBJ_DIR)/* core* *.core *~ *.bak ppc-execute-impl.cpp |
113 |
|
rm -f dyngen basic-dyngen-ops.hpp ppc-dyngen-ops.hpp |
114 |
+ |
rm -rf $(APP_APP) |
115 |
|
|
116 |
|
distclean: clean |
117 |
|
rm -rf $(OBJ_DIR) |
118 |
|
rm -f Makefile |
119 |
|
rm -f config.cache config.log config.status config.h |
120 |
+ |
rm -f ../MacOSX/Info.plist |
121 |
|
|
122 |
|
depend dep: |
123 |
|
makedepend $(CPPFLAGS) -Y. $(SRCS) 2>/dev/null |
126 |
|
$(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $< -o $@ |
127 |
|
$(OBJ_DIR)/%.o : %.cpp |
128 |
|
$(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@ |
129 |
+ |
$(OBJ_DIR)/%.o : %.mm |
130 |
+ |
$(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@ |
131 |
|
$(OBJ_DIR)/%.o : %.S |
132 |
|
$(CPP) $(CPPFLAGS) -D__ASSEMBLY__ $< -o $*.s |
133 |
|
$(AS) $(ASFLAGS) -o $@ $*.s |
134 |
|
rm $*.s |
135 |
|
|
136 |
|
# Kheperix CPU emulator |
137 |
< |
GENEXEC = ../kpx_cpu/src/cpu/ppc/genexec.pl |
137 |
> |
kpxsrcdir = ../kpx_cpu/src |
138 |
> |
GENEXEC = $(kpxsrcdir)/cpu/ppc/genexec.pl |
139 |
> |
DYNGEN = dyngen$(EXEEXT) |
140 |
|
|
141 |
< |
$(OBJ_DIR)/ppc-execute.o: ppc-execute-impl.cpp |
142 |
< |
ppc-execute-impl.cpp: ../kpx_cpu/src/cpu/ppc/ppc-decode.cpp $(GENEXEC) |
123 |
< |
$(CPP) $(CPPFLAGS) -DGENEXEC $< | $(GENEXEC) > $@ |
141 |
> |
ifneq ($(DYNGENSRCS),) |
142 |
> |
DYNGENDEPS = basic-dyngen-ops.hpp ppc-dyngen-ops.hpp |
143 |
|
|
144 |
< |
dyngen: $(DYNGENOBJS) |
144 |
> |
$(DYNGEN): $(DYNGENOBJS) |
145 |
|
$(CXX) -o $@ $(LDFLAGS) $(DYNGENOBJS) |
146 |
|
|
147 |
|
$(OBJ_DIR)/basic-dyngen.o: basic-dyngen-ops.hpp |
148 |
< |
$(OBJ_DIR)/basic-dyngen-ops.o: ../kpx_cpu/src/cpu/jit/basic-dyngen-ops.cpp |
148 |
> |
$(OBJ_DIR)/basic-dyngen-ops.o: $(kpxsrcdir)/cpu/jit/basic-dyngen-ops.cpp |
149 |
|
$(DYNGEN_CC) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) $(DYNGEN_OP_FLAGS) -c $< -o $@ |
150 |
< |
basic-dyngen-ops.hpp: $(OBJ_DIR)/basic-dyngen-ops.o dyngen |
151 |
< |
./dyngen -o $@ $< |
150 |
> |
basic-dyngen-ops.hpp: $(OBJ_DIR)/basic-dyngen-ops.o $(DYNGEN) |
151 |
> |
./$(DYNGEN) -o $@ $< |
152 |
|
|
153 |
|
$(OBJ_DIR)/ppc-dyngen.o: ppc-dyngen-ops.hpp |
154 |
< |
$(OBJ_DIR)/ppc-dyngen-ops.o: ../kpx_cpu/src/cpu/ppc/ppc-dyngen-ops.cpp |
154 |
> |
$(OBJ_DIR)/ppc-dyngen-ops.o: $(kpxsrcdir)/cpu/ppc/ppc-dyngen-ops.cpp basic-dyngen-ops.hpp |
155 |
|
$(DYNGEN_CC) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) $(DYNGEN_OP_FLAGS) -c $< -o $@ |
156 |
< |
ppc-dyngen-ops.hpp: $(OBJ_DIR)/ppc-dyngen-ops.o dyngen |
157 |
< |
./dyngen -o $@ $< |
156 |
> |
ppc-dyngen-ops.hpp: $(OBJ_DIR)/ppc-dyngen-ops.o $(DYNGEN) |
157 |
> |
./$(DYNGEN) -o $@ $< |
158 |
> |
|
159 |
> |
$(OBJ_DIR)/sheepshaver_glue.o $(OBJ_DIR)/ppc-cpu.o $(OBJ_DIR)/ppc-decode.o $(OBJ_DIR)/ppc-translate.o: basic-dyngen-ops.hpp ppc-dyngen-ops.hpp |
160 |
> |
endif |
161 |
> |
|
162 |
> |
$(OBJ_DIR)/ppc-execute.o: ppc-execute-impl.cpp |
163 |
> |
ppc-execute-impl.cpp: $(kpxsrcdir)/cpu/ppc/ppc-decode.cpp $(GENEXEC) $(DYNGENDEPS) |
164 |
> |
$(CPP) $(CPPFLAGS) -DGENEXEC $< | $(GENEXEC) > $@ |
165 |
|
|
166 |
|
#------------------------------------------------------------------------- |
167 |
|
# DO NOT DELETE THIS LINE -- make depend depends on it. |