1 |
gbeauche |
1.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 |
|
|
LN_S = @LN_S@ |
19 |
|
|
CC = @CC@ |
20 |
|
|
CXX = @CXX@ |
21 |
|
|
CFLAGS = @CFLAGS@ |
22 |
|
|
CXXFLAGS = @CXXFLAGS@ |
23 |
|
|
CPPFLAGS = @CPPFLAGS@ -I../include -I. @CPUINCLUDES@ |
24 |
|
|
DEFS = @DEFS@ @DEFINES@ |
25 |
|
|
LDFLAGS = @LDFLAGS@ |
26 |
|
|
LIBS = @LIBS@ |
27 |
|
|
CPUSRCS = @CPUSRCS@ |
28 |
|
|
|
29 |
|
|
HOST_CC = gcc |
30 |
|
|
HOST_CXX = g++ |
31 |
|
|
HOST_CFLAGS = -O2 |
32 |
|
|
HOST_CXXFLAGS = -O2 |
33 |
|
|
HOST_LDFLAGS = |
34 |
|
|
|
35 |
|
|
## Files |
36 |
|
|
UNIXSRCS = vm_alloc.cpp vm_alloc.h sigsegv.cpp sigsegv.h video_vosf.h video_blit.cpp video_blit.h |
37 |
|
|
|
38 |
|
|
CDENABLESRCS = cdenable/cache.cpp cdenable/eject_nt.cpp cdenable/ntcd.cpp |
39 |
|
|
|
40 |
|
|
ROUTERSRCS = router/arp.cpp router/dump.cpp router/dynsockets.cpp router/ftp.cpp \ |
41 |
|
|
router/icmp.cpp router/mib/interfaces.cpp router/iphelp.cpp router/ipsocket.cpp \ |
42 |
|
|
router/mib/mibaccess.cpp router/router.cpp router/tcp.cpp router/udp.cpp b2ether/packet32.cpp |
43 |
|
|
|
44 |
|
|
SRCS = ../main.cpp main_windows.cpp ../prefs.cpp ../prefs_items.cpp prefs_windows.cpp \ |
45 |
|
|
sys_windows.cpp ../rom_patches.cpp ../slot_rom.cpp ../rsrc_patches.cpp \ |
46 |
|
|
../emul_op.cpp ../macos_util.cpp ../xpram.cpp xpram_windows.cpp ../timer.cpp \ |
47 |
|
|
timer_windows.cpp ../adb.cpp ../serial.cpp ../dummy/serial_dummy.cpp \ |
48 |
|
|
../ether.cpp ether_windows.cpp ../sony.cpp ../disk.cpp ../cdrom.cpp \ |
49 |
|
|
../scsi.cpp ../dummy/scsi_dummy.cpp ../video.cpp ../SDL/video_sdl.cpp \ |
50 |
|
|
video_blit.cpp ../audio.cpp ../SDL/audio_sdl.cpp clip_windows.cpp \ |
51 |
|
|
../extfs.cpp extfs_windows.cpp ../user_strings.cpp user_strings_windows.cpp \ |
52 |
|
|
vm_alloc.cpp sigsegv.cpp posix_emu.cpp util_windows.cpp kernel_windows.cpp \ |
53 |
|
|
../dummy/prefs_editor_dummy.cpp BasiliskII.rc \ |
54 |
|
|
$(CDENABLESRCS) $(ROUTERSRCS) $(CPUSRCS) |
55 |
|
|
|
56 |
|
|
APP = BasiliskII.exe |
57 |
|
|
|
58 |
|
|
## Rules |
59 |
|
|
.PHONY: modules install installdirs uninstall mostlyclean clean distclean depend dep |
60 |
|
|
.SUFFIXES: |
61 |
|
|
.SUFFIXES: .c .cpp .s .o .h |
62 |
|
|
|
63 |
|
|
all: $(APP) |
64 |
|
|
|
65 |
|
|
$(UNIXSRCS): %: ../Unix/% |
66 |
|
|
$(LN_S) $< $@ |
67 |
|
|
|
68 |
|
|
OBJ_DIR = obj |
69 |
|
|
$(OBJ_DIR):: |
70 |
|
|
@[ -d $(OBJ_DIR) ] || mkdir $(OBJ_DIR) > /dev/null 2>&1 |
71 |
|
|
|
72 |
|
|
define SRCS_LIST_TO_OBJS |
73 |
|
|
$(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(foreach file, $(SRCS), \ |
74 |
|
|
$(basename $(notdir $(file)))))) |
75 |
|
|
endef |
76 |
|
|
OBJS = $(SRCS_LIST_TO_OBJS) |
77 |
|
|
|
78 |
|
|
SRC_PATHS += $(sort $(foreach file, $(SRCS), $(dir $(file)))) |
79 |
|
|
VPATH := |
80 |
|
|
VPATH += $(addprefix :, $(subst ,:, $(filter-out $($(subst, :, ,$(VPATH))), $(SRC_PATHS)))) |
81 |
|
|
|
82 |
|
|
$(APP): $(UNIXSRCS) $(OBJ_DIR) $(OBJS) |
83 |
|
|
$(CXX) -o $(APP) $(LDFLAGS) $(OBJS) $(LIBS) |
84 |
|
|
|
85 |
|
|
mostlyclean: |
86 |
|
|
rm -f $(APP)$(EXEEXT) $(OBJ_DIR)/* core* *.core *~ *.bak |
87 |
|
|
|
88 |
|
|
clean: mostlyclean |
89 |
|
|
rm -f $(UNIXSRCS) |
90 |
|
|
rm -f cpuemu.cpp cpudefs.cpp cputmp*.s cpufast*.s cpustbl.cpp cputbl.h compemu.cpp compstbl.cpp comptbl.h |
91 |
|
|
|
92 |
|
|
distclean: clean |
93 |
|
|
rm -rf $(OBJ_DIR) |
94 |
|
|
rm -rf autom4te.cache |
95 |
|
|
rm -f Makefile |
96 |
|
|
rm -f config.cache config.log config.status config.h config.h.in |
97 |
|
|
|
98 |
|
|
depend dep: |
99 |
|
|
makedepend $(CPPFLAGS) -Y. $(SRCS) 2>/dev/null |
100 |
|
|
|
101 |
|
|
$(OBJ_DIR)/%.ho : %.c |
102 |
|
|
$(HOST_CC) $(CPPFLAGS) $(DEFS) $(HOST_CFLAGS) -c $< -o $@ |
103 |
|
|
$(OBJ_DIR)/%.ho : %.cpp |
104 |
|
|
$(HOST_CXX) $(CPPFLAGS) $(DEFS) $(HOST_CXXFLAGS) -c $< -o $@ |
105 |
|
|
$(OBJ_DIR)/%.o : %.c |
106 |
|
|
$(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $< -o $@ |
107 |
|
|
$(OBJ_DIR)/%.o : %.cpp |
108 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@ |
109 |
|
|
$(OBJ_DIR)/%.o : %.s |
110 |
|
|
$(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $< -o $@ |
111 |
|
|
|
112 |
|
|
# Windows resources |
113 |
|
|
$(OBJ_DIR)/%.o: %.rc |
114 |
|
|
windres --include-dir ../Windows -i $< -o $@ |
115 |
|
|
$(OBJ_DIR)/build68k.exe: $(OBJ_DIR)/build68k.ho |
116 |
|
|
$(HOST_CC) $(HOST_LDFLAGS) -o $@ $< |
117 |
|
|
$(OBJ_DIR)/gencpu.exe: $(OBJ_DIR)/gencpu.ho $(OBJ_DIR)/readcpu.ho $(OBJ_DIR)/cpudefs.ho |
118 |
|
|
$(HOST_CXX) $(HOST_LDFLAGS) -o $@ $(OBJ_DIR)/gencpu.ho $(OBJ_DIR)/readcpu.ho $(OBJ_DIR)/cpudefs.ho |
119 |
|
|
$(OBJ_DIR)/gencomp.exe: $(OBJ_DIR)/gencomp.ho $(OBJ_DIR)/readcpu.ho $(OBJ_DIR)/cpudefs.ho |
120 |
|
|
$(HOST_CXX) $(HOST_LDFLAGS) -o $@ $(OBJ_DIR)/gencomp.ho $(OBJ_DIR)/readcpu.ho $(OBJ_DIR)/cpudefs.ho |
121 |
|
|
|
122 |
|
|
cpudefs.cpp: $(OBJ_DIR)/build68k.exe ../uae_cpu/table68k |
123 |
|
|
$(OBJ_DIR)/build68k.exe ../uae_cpu/table68k >cpudefs.cpp |
124 |
|
|
cpustbl.cpp: cpuemu.cpp |
125 |
|
|
cpustbl_nf.cpp: cpustbl.cpp |
126 |
|
|
compstbl.cpp: compemu.cpp |
127 |
|
|
cputbl.h: cpuemu.cpp |
128 |
|
|
comptbl.h: compemu.cpp |
129 |
|
|
|
130 |
|
|
cpuemu.cpp: $(OBJ_DIR)/gencpu.exe |
131 |
|
|
$(OBJ_DIR)/gencpu.exe |
132 |
|
|
|
133 |
|
|
compemu.cpp: $(OBJ_DIR)/gencomp.exe |
134 |
|
|
$(OBJ_DIR)/gencomp.exe |
135 |
|
|
|
136 |
|
|
$(OBJ_DIR)/cpustbl_nf.o: cpustbl.cpp |
137 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -DNOFLAGS -c $< -o $@ |
138 |
|
|
|
139 |
|
|
$(OBJ_DIR)/compemu_support.o: compemu_support.cpp comptbl.h |
140 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@ |
141 |
|
|
|
142 |
|
|
$(OBJ_DIR)/cpuemu1.o: cpuemu.cpp |
143 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_1 $(CXXFLAGS) -c $< -o $@ |
144 |
|
|
$(OBJ_DIR)/cpuemu2.o: cpuemu.cpp |
145 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_2 $(CXXFLAGS) -c $< -o $@ |
146 |
|
|
$(OBJ_DIR)/cpuemu3.o: cpuemu.cpp |
147 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_3 $(CXXFLAGS) -c $< -o $@ |
148 |
|
|
$(OBJ_DIR)/cpuemu4.o: cpuemu.cpp |
149 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_4 $(CXXFLAGS) -c $< -o $@ |
150 |
|
|
$(OBJ_DIR)/cpuemu5.o: cpuemu.cpp |
151 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_5 $(CXXFLAGS) -c $< -o $@ |
152 |
|
|
$(OBJ_DIR)/cpuemu6.o: cpuemu.cpp |
153 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_6 $(CXXFLAGS) -c $< -o $@ |
154 |
|
|
$(OBJ_DIR)/cpuemu7.o: cpuemu.cpp |
155 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_7 $(CXXFLAGS) -c $< -o $@ |
156 |
|
|
$(OBJ_DIR)/cpuemu8.o: cpuemu.cpp |
157 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_8 $(CXXFLAGS) -c $< -o $@ |
158 |
|
|
|
159 |
|
|
$(OBJ_DIR)/cpuemu1_nf.o: cpuemu.cpp |
160 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_1 -DNOFLAGS $(CXXFLAGS) -c $< -o $@ |
161 |
|
|
$(OBJ_DIR)/cpuemu2_nf.o: cpuemu.cpp |
162 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_2 -DNOFLAGS $(CXXFLAGS) -c $< -o $@ |
163 |
|
|
$(OBJ_DIR)/cpuemu3_nf.o: cpuemu.cpp |
164 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_3 -DNOFLAGS $(CXXFLAGS) -c $< -o $@ |
165 |
|
|
$(OBJ_DIR)/cpuemu4_nf.o: cpuemu.cpp |
166 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_4 -DNOFLAGS $(CXXFLAGS) -c $< -o $@ |
167 |
|
|
$(OBJ_DIR)/cpuemu5_nf.o: cpuemu.cpp |
168 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_5 -DNOFLAGS $(CXXFLAGS) -c $< -o $@ |
169 |
|
|
$(OBJ_DIR)/cpuemu6_nf.o: cpuemu.cpp |
170 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_6 -DNOFLAGS $(CXXFLAGS) -c $< -o $@ |
171 |
|
|
$(OBJ_DIR)/cpuemu7_nf.o: cpuemu.cpp |
172 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_7 -DNOFLAGS $(CXXFLAGS) -c $< -o $@ |
173 |
|
|
$(OBJ_DIR)/cpuemu8_nf.o: cpuemu.cpp |
174 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_8 -DNOFLAGS $(CXXFLAGS) -c $< -o $@ |
175 |
|
|
|
176 |
|
|
$(OBJ_DIR)/compemu1.o: compemu.cpp |
177 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_1 $(CXXFLAGS) -c $< -o $@ |
178 |
|
|
$(OBJ_DIR)/compemu2.o: compemu.cpp |
179 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_2 $(CXXFLAGS) -c $< -o $@ |
180 |
|
|
$(OBJ_DIR)/compemu3.o: compemu.cpp |
181 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_3 $(CXXFLAGS) -c $< -o $@ |
182 |
|
|
$(OBJ_DIR)/compemu4.o: compemu.cpp |
183 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_4 $(CXXFLAGS) -c $< -o $@ |
184 |
|
|
$(OBJ_DIR)/compemu5.o: compemu.cpp |
185 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_5 $(CXXFLAGS) -c $< -o $@ |
186 |
|
|
$(OBJ_DIR)/compemu6.o: compemu.cpp |
187 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_6 $(CXXFLAGS) -c $< -o $@ |
188 |
|
|
$(OBJ_DIR)/compemu7.o: compemu.cpp |
189 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_7 $(CXXFLAGS) -c $< -o $@ |
190 |
|
|
$(OBJ_DIR)/compemu8.o: compemu.cpp |
191 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_8 $(CXXFLAGS) -c $< -o $@ |
192 |
|
|
|
193 |
|
|
#------------------------------------------------------------------------- |
194 |
|
|
# DO NOT DELETE THIS LINE -- make depend depends on it. |