ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/SheepShaver/src/Windows/Makefile.in
Revision: 1.4
Committed: 2005-11-27T23:54:26Z (18 years, 11 months ago) by gbeauche
Branch: MAIN
Changes since 1.3: +37 -7 lines
Log Message:
Build Windows GUI with GTK

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