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 |
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 |
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 |
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 |
98 |
|
$(INSTALL_DATA) tunconfig $(DESTDIR)$(datadir)/$(APP)/tunconfig |
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 |
|
|
136 |
|
# Kheperix CPU emulator |
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: $(kpxsrcdir)/cpu/ppc/ppc-decode.cpp $(GENEXEC) basic-dyngen-ops.hpp ppc-dyngen-ops.hpp |
140 |
< |
$(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: $(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: $(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. |