--- SheepShaver/src/Unix/Makefile.in 2004/11/22 22:23:55 1.20 +++ SheepShaver/src/Unix/Makefile.in 2004/12/21 23:27:11 1.26 @@ -23,6 +23,7 @@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ SYSSRCS = @SYSSRCS@ CPUSRCS = @CPUSRCS@ +MONSRCS = @MONSRCS@ DYNGENSRCS = @DYNGENSRCS@ DYNGEN_CC = @DYNGEN_CC@ DYNGEN_OP_FLAGS = @DYNGEN_OP_FLAGS@ @@ -33,6 +34,11 @@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ -s INSTALL_DATA = @INSTALL_DATA@ +# Append disassembler to dyngen, if available +ifneq (:,$(MONSRCS):$(DYNGENSRCS)) +DYNGENSRCS += $(filter %i386-dis.c,$(MONSRCS)) +endif + ## Files SRCS = main_unix.cpp ../prefs.cpp ../prefs_items.cpp prefs_unix.cpp sys_unix.cpp \ ../rom_patches.cpp ../rsrc_patches.cpp ../emul_op.cpp ../name_registry.cpp \ @@ -42,7 +48,7 @@ SRCS = main_unix.cpp ../prefs.cpp ../pre ../serial.cpp ../extfs.cpp \ about_window_unix.cpp ../user_strings.cpp user_strings_unix.cpp \ vm_alloc.cpp sigsegv.cpp \ - sshpty.c strlcpy.c $(SYSSRCS) $(CPUSRCS) + sshpty.c strlcpy.c $(SYSSRCS) $(CPUSRCS) $(MONSRCS) APP = SheepShaver APP_EXE = $(APP)$(EXEEXT) APP_APP = $(APP).app @@ -138,14 +144,9 @@ kpxsrcdir = ../kpx_cpu/src GENEXEC = $(kpxsrcdir)/cpu/ppc/genexec.pl DYNGEN = dyngen$(EXEEXT) -$(OBJ_DIR)/ppc-execute.o: ppc-execute-impl.cpp -ppc-execute-impl.cpp: $(kpxsrcdir)/cpu/ppc/ppc-decode.cpp $(GENEXEC) $(DYNGENDEPS) - $(CPP) $(CPPFLAGS) -DGENEXEC $< | $(GENEXEC) > $@ - ifneq ($(DYNGENSRCS),) DYNGENDEPS = basic-dyngen-ops.hpp ppc-dyngen-ops.hpp -basic-dyngen-ops.hpp ppc-dyngen-ops.hpp $(DYNGEN): $(DYNGENOBJS) $(CXX) -o $@ $(LDFLAGS) $(DYNGENOBJS) @@ -164,5 +165,28 @@ ppc-dyngen-ops.hpp: $(OBJ_DIR)/ppc-dynge $(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 endif +$(OBJ_DIR)/ppc-execute.o: ppc-execute-impl.cpp +ppc-execute-impl.cpp: $(kpxsrcdir)/cpu/ppc/ppc-decode.cpp $(GENEXEC) $(DYNGENDEPS) + $(CPP) $(CPPFLAGS) -DGENEXEC $< | $(GENEXEC) > $@ + +# PowerPC CPU tester +TESTSRCS_ = mathlib/ieeefp.cpp cpu/ppc/ppc-cpu.cpp cpu/ppc/ppc-decode.cpp cpu/ppc/ppc-execute.cpp cpu/ppc/ppc-translate.cpp test/test-powerpc.cpp $(MONSRCS) vm_alloc.cpp +ifneq ($(DYNGENSRCS),) +TESTSRCS_ += cpu/jit/jit-cache.cpp cpu/jit/basic-dyngen.cpp cpu/ppc/ppc-dyngen.cpp +endif +TESTSRCS = $(TESTSRCS_:%.cpp=$(kpxsrcdir)/%.cpp) + +define TESTSRCS_LIST_TO_OBJS + $(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(foreach file, $(TESTSRCS), \ + $(basename $(notdir $(file)))))) +endef +TESTOBJS = $(TESTSRCS_LIST_TO_OBJS) + +$(OBJ_DIR)/test-powerpc.o: $(kpxsrcdir)/test/test-powerpc.cpp + $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -DEMU_KHEPERIX -c $< -o $@ + +test-powerpc$(EXEEXT): $(TESTOBJS) + $(CXX) -o $@ $(LDFLAGS) $(TESTOBJS) $(LIBS) + #------------------------------------------------------------------------- # DO NOT DELETE THIS LINE -- make depend depends on it.