ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Windows/Makefile.in
Revision: 1.2
Committed: 2005-03-24T23:13:09Z (19 years, 8 months ago) by gbeauche
Branch: MAIN
Changes since 1.1: +2 -1 lines
Log Message:
enable cross-compilation

File Contents

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