ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/SheepShaver/src/Windows/Makefile.in
Revision: 1.8
Committed: 2009-04-14T00:36:13Z (15 years, 7 months ago) by asvitkine
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +3 -3 lines
Log Message:
sync Makefile.in with Unix version

File Contents

# Content
1 # Windows 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 DESTDIR =
15
16 SDL_CFLAGS = @SDL_CFLAGS@
17 SDL_LIBS = @SDL_LIBS@
18 WANT_GTK = @WANT_GTK@
19 GTK_CFLAGS = @GTK_CFLAGS@
20 GTK_LIBS = @GTK_LIBS@
21
22 SLIRP_CFLAGS = @SLIRP_CFLAGS@
23 SLIRP_SRCS = \
24 ../slirp/bootp.c ../slirp/ip_output.c ../slirp/tcp_input.c \
25 ../slirp/cksum.c ../slirp/mbuf.c ../slirp/tcp_output.c \
26 ../slirp/debug.c ../slirp/misc.c ../slirp/tcp_subr.c \
27 ../slirp/if.c ../slirp/sbuf.c ../slirp/tcp_timer.c \
28 ../slirp/ip_icmp.c ../slirp/slirp.c ../slirp/tftp.c \
29 ../slirp/ip_input.c ../slirp/socket.c ../slirp/udp.c
30 SLIRP_OBJS = $(SLIRP_SRCS:../slirp/%.c=$(OBJ_DIR)/slirp-%.o)
31
32 LN_S = @LN_S@
33 WINDRES = @WINDRES@
34 CC = @CC@
35 CXX = @CXX@
36 CFLAGS = @CFLAGS@ $(SDL_CFLAGS)
37 CXXFLAGS = @CXXFLAGS@ $(SDL_CFLAGS)
38 CPPFLAGS = @CPPFLAGS@ -I../include -I. -I../slirp
39 DEFS = @DEFS@
40 LDFLAGS = @LDFLAGS@
41 LIBS = @LIBS@ -lwsock32 -liphlpapi
42 CPUSRCS = @CPUSRCS@
43 PERL = @PERL@
44
45 USE_DYNGEN = @USE_DYNGEN@
46 DYNGENSRCS = @DYNGENSRCS@
47 DYNGEN_CC = $(CXX)
48 DYNGEN_OP_FLAGS = @DYNGEN_OP_FLAGS@
49
50 HOST_CC = gcc
51 HOST_CXX = g++
52 HOST_CFLAGS = -O2
53 HOST_CXXFLAGS = -O2
54 HOST_LDFLAGS =
55
56 ## Files
57 UNIXSRCS = vm_alloc.cpp vm_alloc.h sigsegv.cpp sigsegv.h video_vosf.h video_blit.cpp video_blit.h
58
59 ROUTERSRCS = router/arp.cpp router/dump.cpp router/dynsockets.cpp router/ftp.cpp \
60 router/icmp.cpp router/mib/interfaces.cpp router/iphelp.cpp router/ipsocket.cpp \
61 router/mib/mibaccess.cpp router/router.cpp router/tcp.cpp router/udp.cpp b2ether/packet32.cpp
62
63 SRCS = ../main.cpp main_windows.cpp ../prefs.cpp ../prefs_items.cpp prefs_windows.cpp \
64 sys_windows.cpp cdenable/cache.cpp cdenable/eject_nt.cpp cdenable/ntcd.cpp \
65 ../rom_patches.cpp ../rsrc_patches.cpp ../emul_op.cpp ../name_registry.cpp \
66 ../macos_util.cpp ../timer.cpp timer_windows.cpp ../xpram.cpp xpram_windows.cpp \
67 ../adb.cpp ../sony.cpp ../disk.cpp ../cdrom.cpp ../scsi.cpp ../dummy/scsi_dummy.cpp \
68 ../gfxaccel.cpp ../video.cpp ../SDL/video_sdl.cpp video_blit.cpp \
69 ../audio.cpp ../SDL/audio_sdl.cpp ../ether.cpp ether_windows.cpp \
70 ../thunks.cpp ../serial.cpp serial_windows.cpp ../extfs.cpp extfs_windows.cpp \
71 about_window_windows.cpp ../user_strings.cpp user_strings_windows.cpp \
72 ../dummy/prefs_editor_dummy.cpp clip_windows.cpp util_windows.cpp kernel_windows.cpp \
73 vm_alloc.cpp sigsegv.cpp posix_emu.cpp SheepShaver.rc \
74 $(CPUSRCS) $(ROUTERSRCS) $(SLIRP_OBJS)
75
76 UI_SRCS = ../prefs.cpp prefs_windows.cpp prefs_editor_gtk.cpp xpram_windows.cpp \
77 ../prefs_items.cpp ../user_strings.cpp user_strings_windows.cpp util_windows.cpp \
78 b2ether/packet32.cpp SheepShaverGUI.rc
79
80 UI_APP = SheepShaverGUI.exe
81
82 APP = SheepShaver.exe
83
84 PROGS = $(APP)
85
86 ifeq ($(WANT_GTK),yes)
87 PROGS += $(UI_APP)
88 endif
89
90 ## Rules
91 .PHONY: clean distclean
92 .SUFFIXES:
93 .SUFFIXES: .c .cpp .S .o .h
94
95 all: $(PROGS)
96
97 $(UNIXSRCS): %: ../Unix/%
98 $(LN_S) $< $@
99
100 OBJ_DIR = obj
101 $(OBJ_DIR)::
102 @[ -d $(OBJ_DIR) ] || mkdir $(OBJ_DIR) > /dev/null 2>&1
103
104 define SRCS_LIST_TO_OBJS
105 $(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(foreach file, $(SRCS), \
106 $(basename $(notdir $(file))))))
107 endef
108 OBJS = $(SRCS_LIST_TO_OBJS)
109
110 define UI_SRCS_LIST_TO_OBJS
111 $(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(foreach file, $(UI_SRCS), \
112 $(basename $(notdir $(file))))))
113 endef
114 UI_OBJS = $(UI_SRCS_LIST_TO_OBJS)
115
116 define DYNGENSRCS_LIST_TO_OBJS
117 $(addprefix $(OBJ_DIR)/, $(addsuffix .ho, $(foreach file, $(DYNGENSRCS), \
118 $(basename $(notdir $(file))))))
119 endef
120 DYNGENOBJS = $(DYNGENSRCS_LIST_TO_OBJS)
121
122 SRC_PATHS += $(sort $(foreach file, $(SRCS), $(dir $(file))))
123 VPATH :=
124 VPATH += $(addprefix :, $(subst ,:, $(filter-out $($(subst, :, ,$(VPATH))), $(SRC_PATHS))))
125
126 $(APP): $(UNIXSRCS) $(OBJ_DIR) $(OBJS)
127 $(CXX) -o $(APP) $(LDFLAGS) $(OBJS) $(LIBS) $(SDL_LIBS)
128
129 $(UI_APP): $(UNIXSRCS) $(OBJ_DIR) $(UI_OBJS)
130 $(CXX) -o $@ $(LDFLAGS) $(UI_OBJS) $(LIBS) $(GTK_LIBS) -mwindows -mno-cygwin
131
132 mostlyclean:
133 rm -f $(APP) $(UI_APP) $(OBJ_DIR)/* core* *.core *~ *.bak
134
135 clean: mostlyclean
136 rm -f $(UNIXSRCS)
137 rm -f dyngen basic-dyngen-ops.hpp ppc-dyngen-ops.hpp ppc-execute-impl.cpp
138
139 distclean: clean
140 rm -rf $(OBJ_DIR)
141 rm -rf autom4te.cache
142 rm -f Makefile
143 rm -f config.cache config.log config.status config.h
144
145 depend dep:
146 makedepend $(CPPFLAGS) -Y. $(SRCS) 2>/dev/null
147
148 $(OBJ_DIR)/%.ho : %.c
149 $(HOST_CC) $(CPPFLAGS) $(DEFS) $(HOST_CFLAGS) -c $< -o $@
150 $(OBJ_DIR)/%.ho : %.cpp
151 $(HOST_CXX) $(CPPFLAGS) $(DEFS) $(HOST_CXXFLAGS) -c $< -o $@
152 $(OBJ_DIR)/slirp-%.o : ../slirp/%.c
153 $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(SLIRP_CFLAGS) -c $< -o $@
154 $(OBJ_DIR)/%.o : %.c
155 $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $< -o $@
156 $(OBJ_DIR)/%.o : %.cpp
157 $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@
158 $(OBJ_DIR)/%.o : %.mm
159 $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@
160 $(OBJ_DIR)/%.o : %.S
161 $(CPP) $(CPPFLAGS) -D__ASSEMBLY__ $< -o $*.out.s
162 $(AS) $(ASFLAGS) -o $@ $*.out.s
163 rm $*.out.s
164 $(OBJ_DIR)/prefs_editor_gtk.o: prefs_editor_gtk.cpp
165 $(CXX) -O2 -mno-cygwin -mms-bitfields $(CPPFLAGS) $(DEFS) $(GTK_CFLAGS) -c $< -o $@
166
167 # Windows resources
168 $(OBJ_DIR)/%.o: %.rc
169 $(WINDRES) --include-dir ../Windows -i $< -o $@
170
171 # Kheperix CPU emulator
172 kpxsrcdir = ../kpx_cpu/src
173 GENEXECPL = $(kpxsrcdir)/cpu/ppc/genexec.pl
174 DYNGEN = dyngen.exe
175
176 ifeq ($(USE_DYNGEN),yes)
177 DYNGENDEPS = basic-dyngen-ops.hpp ppc-dyngen-ops.hpp
178
179 $(DYNGEN): $(DYNGENOBJS)
180 $(HOST_CXX) -o $@ $(LDFLAGS) $(DYNGENOBJS)
181
182 $(OBJ_DIR)/basic-dyngen.o: basic-dyngen-ops.hpp
183 $(OBJ_DIR)/basic-dyngen-ops.o: $(kpxsrcdir)/cpu/jit/basic-dyngen-ops.cpp
184 $(DYNGEN_CC) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) $(DYNGEN_OP_FLAGS) -c $< -o $@
185 basic-dyngen-ops.hpp: $(OBJ_DIR)/basic-dyngen-ops.o $(DYNGEN)
186 ./$(DYNGEN) -o $@ $<
187
188 $(OBJ_DIR)/ppc-dyngen.o: ppc-dyngen-ops.hpp
189 $(OBJ_DIR)/ppc-dyngen-ops.o: $(kpxsrcdir)/cpu/ppc/ppc-dyngen-ops.cpp basic-dyngen-ops.hpp
190 $(DYNGEN_CC) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) $(DYNGEN_OP_FLAGS) -c $< -o $@
191 ppc-dyngen-ops.hpp: $(OBJ_DIR)/ppc-dyngen-ops.o $(DYNGEN)
192 ./$(DYNGEN) -o $@ $<
193
194 $(OBJ_DIR)/sheepshaver_glue.o $(OBJ_DIR)/ppc-cpu.o $(OBJ_DIR)/ppc-decode.o $(OBJ_DIR)/ppc-translate.o $(OBJ_DIR)/ppc-jit.o: basic-dyngen-ops.hpp ppc-dyngen-ops.hpp
195 endif
196
197 $(OBJ_DIR)/ppc-execute.o: ppc-execute-impl.cpp
198 ppc-execute-impl.cpp: $(kpxsrcdir)/cpu/ppc/ppc-decode.cpp $(GENEXECPL) $(DYNGENDEPS)
199 $(CPP) $(CPPFLAGS) -DGENEXEC $< | $(PERL) $(GENEXECPL) > $@
200
201 # PowerPC CPU tester
202 TESTSRCS_ = mathlib/ieeefp.cpp mathlib/mathlib.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 utils/utils-cpuinfo.cpp
203 ifeq ($(USE_DYNGEN),yes)
204 TESTSRCS_ += cpu/jit/jit-cache.cpp cpu/jit/basic-dyngen.cpp cpu/ppc/ppc-dyngen.cpp cpu/ppc/ppc-jit.cpp
205 endif
206 TESTSRCS = $(TESTSRCS_:%.cpp=$(kpxsrcdir)/%.cpp)
207
208 define TESTSRCS_LIST_TO_OBJS
209 $(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(foreach file, $(TESTSRCS), \
210 $(basename $(notdir $(file))))))
211 endef
212 TESTOBJS = $(TESTSRCS_LIST_TO_OBJS)
213
214 $(OBJ_DIR)/test-powerpc.o: $(kpxsrcdir)/test/test-powerpc.cpp
215 $(HOST_CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -DEMU_KHEPERIX -c $< -o $@
216
217 test-powerpc.exe: $(TESTOBJS)
218 $(HOST_CXX) -o $@ $(LDFLAGS) $(TESTOBJS) -mconsole
219
220 #-------------------------------------------------------------------------
221 # DO NOT DELETE THIS LINE -- make depend depends on it.