20 |
|
LDFLAGS = @LDFLAGS@ |
21 |
|
LIBS = @LIBS@ |
22 |
|
SYSSRCS = @SYSSRCS@ |
23 |
+ |
CPUSRCS = @CPUSRCS@ |
24 |
+ |
DYNGENSRCS = @DYNGENSRCS@ |
25 |
+ |
DYNGEN_OP_FLAGS = @DYNGEN_OP_FLAGS@ |
26 |
|
INSTALL = @INSTALL@ |
27 |
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@ -s |
28 |
|
INSTALL_DATA = @INSTALL_DATA@ |
37 |
|
Linux/ether_linux.cpp ../serial.cpp serial_unix.cpp ../extfs.cpp extfs_unix.cpp \ |
38 |
|
about_window_unix.cpp ../user_strings.cpp user_strings_unix.cpp \ |
39 |
|
vm_alloc.cpp sigsegv.cpp \ |
40 |
< |
sshpty.c strlcpy.c $(SYSSRCS) |
40 |
> |
sshpty.c strlcpy.c $(SYSSRCS) $(CPUSRCS) |
41 |
|
APP = SheepShaver |
42 |
|
|
43 |
|
## Rules |
57 |
|
endef |
58 |
|
OBJS = $(SRCS_LIST_TO_OBJS) |
59 |
|
|
60 |
+ |
define DYNGENSRCS_LIST_TO_OBJS |
61 |
+ |
$(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(foreach file, $(DYNGENSRCS), \ |
62 |
+ |
$(basename $(notdir $(file)))))) |
63 |
+ |
endef |
64 |
+ |
DYNGENOBJS = $(DYNGENSRCS_LIST_TO_OBJS) |
65 |
+ |
|
66 |
|
SRC_PATHS += $(sort $(foreach file, $(SRCS), $(dir $(file)))) |
67 |
|
VPATH := |
68 |
|
VPATH += $(addprefix :, $(subst ,:, $(filter-out $($(subst, :, ,$(VPATH))), $(SRC_PATHS)))) |
86 |
|
|
87 |
|
clean: |
88 |
|
rm -f $(APP) $(OBJ_DIR)/* core* *.core *~ *.bak ppc-execute-impl.cpp |
89 |
+ |
rm -f dyngen basic-dyngen-ops.hpp ppc-dyngen-ops.hpp |
90 |
|
|
91 |
|
distclean: clean |
92 |
|
rm -rf $(OBJ_DIR) |
108 |
|
# Kheperix CPU emulator |
109 |
|
GENEXEC = ../kpx_cpu/src/cpu/ppc/genexec.pl |
110 |
|
|
111 |
< |
../kpx_cpu/src/cpu/ppc/ppc-execute.cpp: ppc-execute-impl.cpp |
111 |
> |
$(OBJ_DIR)/ppc-execute.o: ppc-execute-impl.cpp |
112 |
|
ppc-execute-impl.cpp: ../kpx_cpu/src/cpu/ppc/ppc-decode.cpp $(GENEXEC) |
113 |
< |
$(CPP) $(CPPFLAGS) $< | $(GENEXEC) > $@ |
113 |
> |
$(CPP) $(CPPFLAGS) -DGENEXEC $< | $(GENEXEC) > $@ |
114 |
> |
|
115 |
> |
dyngen: $(DYNGENOBJS) |
116 |
> |
$(CXX) -o $@ $(LDFLAGS) $(DYNGENOBJS) |
117 |
> |
|
118 |
> |
$(OBJ_DIR)/basic-dyngen.o: basic-dyngen-ops.hpp |
119 |
> |
$(OBJ_DIR)/basic-dyngen-ops.o: ../kpx_cpu/src/cpu/jit/basic-dyngen-ops.cpp |
120 |
> |
$(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) $(DYNGEN_OP_FLAGS) -c $< -o $@ |
121 |
> |
basic-dyngen-ops.hpp: $(OBJ_DIR)/basic-dyngen-ops.o dyngen |
122 |
> |
./dyngen -o $@ $< |
123 |
> |
|
124 |
> |
$(OBJ_DIR)/ppc-dyngen.o: ppc-dyngen-ops.hpp |
125 |
> |
$(OBJ_DIR)/ppc-dyngen-ops.o: ../kpx_cpu/src/cpu/ppc/ppc-dyngen-ops.cpp |
126 |
> |
$(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) $(DYNGEN_OP_FLAGS) -c $< -o $@ |
127 |
> |
ppc-dyngen-ops.hpp: $(OBJ_DIR)/ppc-dyngen-ops.o dyngen |
128 |
> |
./dyngen -o $@ $< |
129 |
|
|
130 |
|
#------------------------------------------------------------------------- |
131 |
|
# DO NOT DELETE THIS LINE -- make depend depends on it. |