ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/SheepShaver/src/Unix/Makefile.in
Revision: 1.22
Committed: 2004-11-24T22:57:10Z (20 years ago) by gbeauche
Branch: MAIN
Changes since 1.21: +4 -4 lines
Log Message:
move ppc-execute-impl.cpp dep down after DYNGENDEPS is defined
(fix parallel build, tested as make -j5)

File Contents

# User Rev Content
1 cebix 1.1 # Linux makefile for SheepShaver
2    
3     ## System specific configuration
4     @SET_MAKE@
5     SHELL = /bin/sh
6    
7     prefix = @prefix@
8     exec_prefix = @exec_prefix@
9     bindir = @bindir@
10     datadir = @datadir@
11     mandir = @mandir@
12     man1dir = $(mandir)/man1
13    
14 gbeauche 1.11 DESTDIR =
15    
16 cebix 1.1 CC = @CC@
17     CXX = @CXX@
18     CFLAGS = @CFLAGS@
19     CXXFLAGS = @CXXFLAGS@
20     CPPFLAGS = @CPPFLAGS@ -I../include -I.
21     DEFS = @DEFS@ -D_REENTRANT -DDATADIR=\"$(datadir)/$(APP)\"
22     LDFLAGS = @LDFLAGS@
23     LIBS = @LIBS@
24     SYSSRCS = @SYSSRCS@
25 gbeauche 1.7 CPUSRCS = @CPUSRCS@
26     DYNGENSRCS = @DYNGENSRCS@
27 gbeauche 1.10 DYNGEN_CC = @DYNGEN_CC@
28 gbeauche 1.7 DYNGEN_OP_FLAGS = @DYNGEN_OP_FLAGS@
29 gbeauche 1.9 BLESS = @BLESS@
30 gbeauche 1.20 EXEEXT = @EXEEXT@
31 gbeauche 1.15 KEYCODES = @KEYCODES@
32 cebix 1.1 INSTALL = @INSTALL@
33     INSTALL_PROGRAM = @INSTALL_PROGRAM@ -s
34     INSTALL_DATA = @INSTALL_DATA@
35    
36     ## Files
37     SRCS = main_unix.cpp ../prefs.cpp ../prefs_items.cpp prefs_unix.cpp sys_unix.cpp \
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 gbeauche 1.13 ../adb.cpp ../sony.cpp ../disk.cpp ../cdrom.cpp ../scsi.cpp \
41 gbeauche 1.16 ../gfxaccel.cpp ../video.cpp video_blit.cpp ../audio.cpp ../ether.cpp ../thunks.cpp \
42 gbeauche 1.18 ../serial.cpp ../extfs.cpp \
43 gbeauche 1.2 about_window_unix.cpp ../user_strings.cpp user_strings_unix.cpp \
44 gbeauche 1.3 vm_alloc.cpp sigsegv.cpp \
45 gbeauche 1.7 sshpty.c strlcpy.c $(SYSSRCS) $(CPUSRCS)
46 cebix 1.1 APP = SheepShaver
47 gbeauche 1.20 APP_EXE = $(APP)$(EXEEXT)
48 gbeauche 1.17 APP_APP = $(APP).app
49 cebix 1.1
50     ## Rules
51     .PHONY: modules install uninstall clean distclean depend dep
52     .SUFFIXES:
53     .SUFFIXES: .c .cpp .S .o .h
54    
55 gbeauche 1.20 all: $(APP_EXE)
56 cebix 1.1
57     OBJ_DIR = obj
58     $(OBJ_DIR)::
59     @[ -d $(OBJ_DIR) ] || mkdir $(OBJ_DIR) > /dev/null 2>&1
60    
61     define SRCS_LIST_TO_OBJS
62     $(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(foreach file, $(SRCS), \
63     $(basename $(notdir $(file))))))
64     endef
65     OBJS = $(SRCS_LIST_TO_OBJS)
66    
67 gbeauche 1.7 define DYNGENSRCS_LIST_TO_OBJS
68     $(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(foreach file, $(DYNGENSRCS), \
69     $(basename $(notdir $(file))))))
70     endef
71     DYNGENOBJS = $(DYNGENSRCS_LIST_TO_OBJS)
72    
73 cebix 1.1 SRC_PATHS += $(sort $(foreach file, $(SRCS), $(dir $(file))))
74     VPATH :=
75     VPATH += $(addprefix :, $(subst ,:, $(filter-out $($(subst, :, ,$(VPATH))), $(SRC_PATHS))))
76    
77 gbeauche 1.20 $(APP_EXE): $(OBJ_DIR) $(OBJS)
78     $(CXX) -o $(APP_EXE) $(LDFLAGS) $(OBJS) $(LIBS)
79     $(BLESS) $(APP_EXE)
80 cebix 1.1
81 gbeauche 1.17 $(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 cebix 1.1 modules:
92     cd NetDriver; make
93    
94 gbeauche 1.20 install: $(APP_EXE) installdirs
95     $(INSTALL_PROGRAM) $(APP_EXE) $(DESTDIR)$(bindir)/$(APP_EXE)
96 gbeauche 1.11 -$(INSTALL_DATA) $(APP).1 $(DESTDIR)$(man1dir)/$(APP).1
97 gbeauche 1.14 $(INSTALL_DATA) $(KEYCODES) $(DESTDIR)$(datadir)/$(APP)/keycodes
98 gbeauche 1.11 $(INSTALL_DATA) tunconfig $(DESTDIR)$(datadir)/$(APP)/tunconfig
99 gbeauche 1.12 chmod 755 $(DESTDIR)$(datadir)/$(APP)/tunconfig
100 cebix 1.1
101     installdirs:
102 gbeauche 1.11 $(SHELL) mkinstalldirs $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir) $(DESTDIR)$(datadir)/$(APP)
103 cebix 1.1
104     uninstall:
105 gbeauche 1.20 rm -f $(DESTDIR)$(bindir)/$(APP_EXE)
106 gbeauche 1.11 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 cebix 1.1
111     clean:
112 gbeauche 1.20 rm -f $(APP_EXE) $(OBJ_DIR)/* core* *.core *~ *.bak ppc-execute-impl.cpp
113 gbeauche 1.7 rm -f dyngen basic-dyngen-ops.hpp ppc-dyngen-ops.hpp
114 gbeauche 1.17 rm -rf $(APP_APP)
115 cebix 1.1
116     distclean: clean
117     rm -rf $(OBJ_DIR)
118     rm -f Makefile
119     rm -f config.cache config.log config.status config.h
120 gbeauche 1.17 rm -f ../MacOSX/Info.plist
121 cebix 1.1
122     depend dep:
123     makedepend $(CPPFLAGS) -Y. $(SRCS) 2>/dev/null
124    
125     $(OBJ_DIR)/%.o : %.c
126     $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $< -o $@
127     $(OBJ_DIR)/%.o : %.cpp
128     $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@
129 gbeauche 1.18 $(OBJ_DIR)/%.o : %.mm
130     $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@
131 cebix 1.1 $(OBJ_DIR)/%.o : %.S
132     $(CPP) $(CPPFLAGS) -D__ASSEMBLY__ $< -o $*.s
133     $(AS) $(ASFLAGS) -o $@ $*.s
134     rm $*.s
135 gbeauche 1.5
136     # Kheperix CPU emulator
137 gbeauche 1.19 kpxsrcdir = ../kpx_cpu/src
138     GENEXEC = $(kpxsrcdir)/cpu/ppc/genexec.pl
139 gbeauche 1.20 DYNGEN = dyngen$(EXEEXT)
140 gbeauche 1.5
141 gbeauche 1.20 ifneq ($(DYNGENSRCS),)
142     DYNGENDEPS = basic-dyngen-ops.hpp ppc-dyngen-ops.hpp
143    
144     $(DYNGEN): $(DYNGENOBJS)
145 gbeauche 1.7 $(CXX) -o $@ $(LDFLAGS) $(DYNGENOBJS)
146    
147     $(OBJ_DIR)/basic-dyngen.o: basic-dyngen-ops.hpp
148 gbeauche 1.19 $(OBJ_DIR)/basic-dyngen-ops.o: $(kpxsrcdir)/cpu/jit/basic-dyngen-ops.cpp
149 gbeauche 1.10 $(DYNGEN_CC) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) $(DYNGEN_OP_FLAGS) -c $< -o $@
150 gbeauche 1.20 basic-dyngen-ops.hpp: $(OBJ_DIR)/basic-dyngen-ops.o $(DYNGEN)
151     ./$(DYNGEN) -o $@ $<
152 gbeauche 1.7
153     $(OBJ_DIR)/ppc-dyngen.o: ppc-dyngen-ops.hpp
154 gbeauche 1.19 $(OBJ_DIR)/ppc-dyngen-ops.o: $(kpxsrcdir)/cpu/ppc/ppc-dyngen-ops.cpp basic-dyngen-ops.hpp
155 gbeauche 1.10 $(DYNGEN_CC) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) $(DYNGEN_OP_FLAGS) -c $< -o $@
156 gbeauche 1.20 ppc-dyngen-ops.hpp: $(OBJ_DIR)/ppc-dyngen-ops.o $(DYNGEN)
157     ./$(DYNGEN) -o $@ $<
158 cebix 1.1
159 gbeauche 1.19 $(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 gbeauche 1.20 endif
161 gbeauche 1.19
162 gbeauche 1.22 $(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 cebix 1.1 #-------------------------------------------------------------------------
167     # DO NOT DELETE THIS LINE -- make depend depends on it.