ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Windows/Makefile.in
Revision: 1.7
Committed: 2006-04-29T10:57:56Z (18 years, 6 months ago) by gbeauche
Branch: MAIN
CVS Tags: nigel-build-19, HEAD
Changes since 1.6: +15 -3 lines
Log Message:
slirp now works on windows

File Contents

# Content
1 # Windows Makefile for Basilisk II
2
3 ## System specific configuration
4
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 KEYCODES = ../SDL/keycodes
15
16 DESTDIR =
17
18 SDL_CFLAGS = @SDL_CFLAGS@
19 SDL_LIBS = @SDL_LIBS@
20 WANT_GTK = @WANT_GTK@
21 GTK_CFLAGS = @GTK_CFLAGS@
22 GTK_LIBS = @GTK_LIBS@
23
24 SLIRP_CFLAGS = @SLIRP_CFLAGS@
25 SLIRP_SRCS = \
26 ../slirp/bootp.c ../slirp/ip_output.c ../slirp/tcp_input.c \
27 ../slirp/cksum.c ../slirp/mbuf.c ../slirp/tcp_output.c \
28 ../slirp/debug.c ../slirp/misc.c ../slirp/tcp_subr.c \
29 ../slirp/if.c ../slirp/sbuf.c ../slirp/tcp_timer.c \
30 ../slirp/ip_icmp.c ../slirp/slirp.c ../slirp/tftp.c \
31 ../slirp/ip_input.c ../slirp/socket.c ../slirp/udp.c
32 SLIRP_OBJS = $(SLIRP_SRCS:../slirp/%.c=$(OBJ_DIR)/slirp-%.o)
33
34 LN_S = @LN_S@
35 WINDRES = @WINDRES@
36 CC = @CC@
37 CXX = @CXX@
38 CFLAGS = @CFLAGS@ $(SDL_CFLAGS)
39 CXXFLAGS = @CXXFLAGS@ $(SDL_CFLAGS)
40 CPPFLAGS = @CPPFLAGS@ -I../include -I. @CPUINCLUDES@ -I../slirp
41 DEFS = @DEFS@ @DEFINES@
42 LDFLAGS = @LDFLAGS@
43 LIBS = @LIBS@ -lwsock32 -liphlpapi
44 CPUSRCS = @CPUSRCS@
45
46 HOST_CC = gcc
47 HOST_CXX = g++
48 HOST_CFLAGS = -O2
49 HOST_CXXFLAGS = -O2
50 HOST_LDFLAGS =
51
52 ## Files
53 UNIXSRCS = vm_alloc.cpp vm_alloc.h sigsegv.cpp sigsegv.h video_vosf.h video_blit.cpp video_blit.h
54
55 CDENABLESRCS = cdenable/cache.cpp cdenable/eject_nt.cpp cdenable/ntcd.cpp
56
57 ROUTERSRCS = router/arp.cpp router/dump.cpp router/dynsockets.cpp router/ftp.cpp \
58 router/icmp.cpp router/mib/interfaces.cpp router/iphelp.cpp router/ipsocket.cpp \
59 router/mib/mibaccess.cpp router/router.cpp router/tcp.cpp router/udp.cpp b2ether/packet32.cpp
60
61 SRCS = ../main.cpp main_windows.cpp ../prefs.cpp ../prefs_items.cpp prefs_windows.cpp \
62 sys_windows.cpp ../rom_patches.cpp ../slot_rom.cpp ../rsrc_patches.cpp \
63 ../emul_op.cpp ../macos_util.cpp ../xpram.cpp xpram_windows.cpp ../timer.cpp \
64 timer_windows.cpp ../adb.cpp ../serial.cpp serial_windows.cpp \
65 ../ether.cpp ether_windows.cpp ../sony.cpp ../disk.cpp ../cdrom.cpp \
66 ../scsi.cpp ../dummy/scsi_dummy.cpp ../video.cpp ../SDL/video_sdl.cpp \
67 video_blit.cpp ../audio.cpp ../SDL/audio_sdl.cpp clip_windows.cpp \
68 ../extfs.cpp extfs_windows.cpp ../user_strings.cpp user_strings_windows.cpp \
69 vm_alloc.cpp sigsegv.cpp posix_emu.cpp util_windows.cpp kernel_windows.cpp \
70 ../dummy/prefs_editor_dummy.cpp BasiliskII.rc \
71 $(CDENABLESRCS) $(ROUTERSRCS) $(CPUSRCS) $(SLIRP_OBJS)
72
73 UI_SRCS = ../prefs.cpp prefs_windows.cpp prefs_editor_gtk.cpp xpram_windows.cpp \
74 ../prefs_items.cpp ../user_strings.cpp user_strings_windows.cpp util_windows.cpp \
75 b2ether/Packet32.cpp BasiliskIIGUI.rc
76
77 UI_APP = BasiliskIIGUI.exe
78
79 APP = BasiliskII.exe
80
81 PROGS = $(APP)
82
83 ifeq ($(WANT_GTK),yes)
84 PROGS += $(UI_APP)
85 endif
86
87 ## Rules
88 .PHONY: modules install installdirs uninstall mostlyclean clean distclean depend dep
89 .SUFFIXES:
90 .SUFFIXES: .c .cpp .s .o .h
91
92 all: $(PROGS)
93
94 $(UNIXSRCS): %: ../Unix/%
95 $(LN_S) $< $@
96
97 OBJ_DIR = obj
98 $(OBJ_DIR)::
99 @[ -d $(OBJ_DIR) ] || mkdir $(OBJ_DIR) > /dev/null 2>&1
100
101 define SRCS_LIST_TO_OBJS
102 $(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(foreach file, $(SRCS), \
103 $(basename $(notdir $(file))))))
104 endef
105 OBJS = $(SRCS_LIST_TO_OBJS)
106
107 define UI_SRCS_LIST_TO_OBJS
108 $(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(foreach file, $(UI_SRCS), \
109 $(basename $(notdir $(file))))))
110 endef
111 UI_OBJS = $(UI_SRCS_LIST_TO_OBJS)
112
113 SRC_PATHS += $(sort $(foreach file, $(SRCS), $(dir $(file))))
114 VPATH :=
115 VPATH += $(addprefix :, $(subst ,:, $(filter-out $($(subst, :, ,$(VPATH))), $(SRC_PATHS))))
116
117 $(APP): $(UNIXSRCS) $(OBJ_DIR) $(OBJS)
118 $(CXX) -o $@ $(LDFLAGS) $(OBJS) $(LIBS) $(SDL_LIBS)
119
120 $(UI_APP): $(UNIXSRCS) $(OBJ_DIR) $(UI_OBJS)
121 $(CXX) -o $@ $(LDFLAGS) $(UI_OBJS) $(LIBS) $(GTK_LIBS) -mwindows -mno-cygwin
122
123 mostlyclean:
124 rm -f $(APP) $(UI_APP) $(OBJ_DIR)/* core* *.core *~ *.bak
125
126 clean: mostlyclean
127 rm -f $(UNIXSRCS)
128 rm -f cpuemu.cpp cpudefs.cpp cputmp*.s cpufast*.s cpustbl.cpp cputbl.h compemu.cpp compstbl.cpp comptbl.h
129
130 distclean: clean
131 rm -rf $(OBJ_DIR)
132 rm -rf autom4te.cache
133 rm -f Makefile
134 rm -f config.cache config.log config.status config.h
135
136 depend dep:
137 makedepend $(CPPFLAGS) -Y. $(SRCS) 2>/dev/null
138
139 $(OBJ_DIR)/%.ho : %.c
140 $(HOST_CC) $(CPPFLAGS) $(DEFS) $(HOST_CFLAGS) -c $< -o $@
141 $(OBJ_DIR)/%.ho : %.cpp
142 $(HOST_CXX) $(CPPFLAGS) $(DEFS) $(HOST_CXXFLAGS) -c $< -o $@
143 $(OBJ_DIR)/slirp-%.o : ../slirp/%.c
144 $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(SLIRP_CFLAGS) -c $< -o $@
145 $(OBJ_DIR)/%.o : %.c
146 $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $< -o $@
147 $(OBJ_DIR)/%.o : %.cpp
148 $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@
149 $(OBJ_DIR)/%.o : %.s
150 $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $< -o $@
151 $(OBJ_DIR)/prefs_editor_gtk.o: prefs_editor_gtk.cpp
152 $(CXX) -O2 -mno-cygwin -mms-bitfields $(CPPFLAGS) $(DEFS) $(GTK_CFLAGS) -c $< -o $@
153
154 # Windows resources
155 $(OBJ_DIR)/%.o: %.rc
156 $(WINDRES) --include-dir ../Windows -i $< -o $@
157 $(OBJ_DIR)/build68k.exe: $(OBJ_DIR)/build68k.ho
158 $(HOST_CC) $(HOST_LDFLAGS) -o $@ $<
159 $(OBJ_DIR)/gencpu.exe: $(OBJ_DIR)/gencpu.ho $(OBJ_DIR)/readcpu.ho $(OBJ_DIR)/cpudefs.ho
160 $(HOST_CXX) $(HOST_LDFLAGS) -o $@ $(OBJ_DIR)/gencpu.ho $(OBJ_DIR)/readcpu.ho $(OBJ_DIR)/cpudefs.ho
161 $(OBJ_DIR)/gencomp.exe: $(OBJ_DIR)/gencomp.ho $(OBJ_DIR)/readcpu.ho $(OBJ_DIR)/cpudefs.ho
162 $(HOST_CXX) $(HOST_LDFLAGS) -o $@ $(OBJ_DIR)/gencomp.ho $(OBJ_DIR)/readcpu.ho $(OBJ_DIR)/cpudefs.ho
163
164 cpudefs.cpp: $(OBJ_DIR)/build68k.exe ../uae_cpu/table68k
165 $(OBJ_DIR)/build68k.exe ../uae_cpu/table68k >cpudefs.cpp
166 cpustbl.cpp: cpuemu.cpp
167 cpustbl_nf.cpp: cpustbl.cpp
168 compstbl.cpp: compemu.cpp
169 cputbl.h: cpuemu.cpp
170 comptbl.h: compemu.cpp
171
172 cpuemu.cpp: $(OBJ_DIR)/gencpu.exe
173 $(OBJ_DIR)/gencpu.exe
174
175 compemu.cpp: $(OBJ_DIR)/gencomp.exe
176 $(OBJ_DIR)/gencomp.exe
177
178 $(OBJ_DIR)/cpustbl_nf.o: cpustbl.cpp
179 $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -DNOFLAGS -c $< -o $@
180
181 $(OBJ_DIR)/compemu_support.o: compemu_support.cpp comptbl.h
182 $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@
183
184 $(OBJ_DIR)/cpuemu1.o: cpuemu.cpp
185 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_1 $(CXXFLAGS) -c $< -o $@
186 $(OBJ_DIR)/cpuemu2.o: cpuemu.cpp
187 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_2 $(CXXFLAGS) -c $< -o $@
188 $(OBJ_DIR)/cpuemu3.o: cpuemu.cpp
189 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_3 $(CXXFLAGS) -c $< -o $@
190 $(OBJ_DIR)/cpuemu4.o: cpuemu.cpp
191 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_4 $(CXXFLAGS) -c $< -o $@
192 $(OBJ_DIR)/cpuemu5.o: cpuemu.cpp
193 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_5 $(CXXFLAGS) -c $< -o $@
194 $(OBJ_DIR)/cpuemu6.o: cpuemu.cpp
195 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_6 $(CXXFLAGS) -c $< -o $@
196 $(OBJ_DIR)/cpuemu7.o: cpuemu.cpp
197 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_7 $(CXXFLAGS) -c $< -o $@
198 $(OBJ_DIR)/cpuemu8.o: cpuemu.cpp
199 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_8 $(CXXFLAGS) -c $< -o $@
200
201 $(OBJ_DIR)/cpuemu1_nf.o: cpuemu.cpp
202 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_1 -DNOFLAGS $(CXXFLAGS) -c $< -o $@
203 $(OBJ_DIR)/cpuemu2_nf.o: cpuemu.cpp
204 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_2 -DNOFLAGS $(CXXFLAGS) -c $< -o $@
205 $(OBJ_DIR)/cpuemu3_nf.o: cpuemu.cpp
206 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_3 -DNOFLAGS $(CXXFLAGS) -c $< -o $@
207 $(OBJ_DIR)/cpuemu4_nf.o: cpuemu.cpp
208 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_4 -DNOFLAGS $(CXXFLAGS) -c $< -o $@
209 $(OBJ_DIR)/cpuemu5_nf.o: cpuemu.cpp
210 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_5 -DNOFLAGS $(CXXFLAGS) -c $< -o $@
211 $(OBJ_DIR)/cpuemu6_nf.o: cpuemu.cpp
212 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_6 -DNOFLAGS $(CXXFLAGS) -c $< -o $@
213 $(OBJ_DIR)/cpuemu7_nf.o: cpuemu.cpp
214 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_7 -DNOFLAGS $(CXXFLAGS) -c $< -o $@
215 $(OBJ_DIR)/cpuemu8_nf.o: cpuemu.cpp
216 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_8 -DNOFLAGS $(CXXFLAGS) -c $< -o $@
217
218 $(OBJ_DIR)/compemu1.o: compemu.cpp
219 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_1 $(CXXFLAGS) -c $< -o $@
220 $(OBJ_DIR)/compemu2.o: compemu.cpp
221 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_2 $(CXXFLAGS) -c $< -o $@
222 $(OBJ_DIR)/compemu3.o: compemu.cpp
223 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_3 $(CXXFLAGS) -c $< -o $@
224 $(OBJ_DIR)/compemu4.o: compemu.cpp
225 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_4 $(CXXFLAGS) -c $< -o $@
226 $(OBJ_DIR)/compemu5.o: compemu.cpp
227 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_5 $(CXXFLAGS) -c $< -o $@
228 $(OBJ_DIR)/compemu6.o: compemu.cpp
229 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_6 $(CXXFLAGS) -c $< -o $@
230 $(OBJ_DIR)/compemu7.o: compemu.cpp
231 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_7 $(CXXFLAGS) -c $< -o $@
232 $(OBJ_DIR)/compemu8.o: compemu.cpp
233 $(CXX) $(CPPFLAGS) $(DEFS) -DPART_8 $(CXXFLAGS) -c $< -o $@
234
235 #-------------------------------------------------------------------------
236 # DO NOT DELETE THIS LINE -- make depend depends on it.