ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/Makefile.in
Revision: 1.29
Committed: 2004-06-23T14:30:48Z (20 years, 5 months ago) by gbeauche
Branch: MAIN
Changes since 1.28: +1 -1 lines
Log Message:
Initial SDL/video support. Fix VOSF code could lead to a crash on run-time
resolution/depth switching. Rearrange blitter lookup code, aka make it cleaner.

File Contents

# User Rev Content
1 cebix 1.1 # Unix makefile for Basilisk II
2    
3     ## System specific configuration
4     @SET_MAKE@
5 cebix 1.9 SHELL = /bin/sh
6 cebix 1.3
7 cebix 1.6 prefix = @prefix@
8     exec_prefix = @exec_prefix@
9     bindir = @bindir@
10     datadir = @datadir@
11     mandir = @mandir@
12     man1dir = $(mandir)/man1
13 cebix 1.3
14 cebix 1.18 DESTDIR =
15    
16 cebix 1.1 CC = @CC@
17     CXX = @CXX@
18     CFLAGS = @CFLAGS@
19     CXXFLAGS = @CXXFLAGS@
20     CPPFLAGS = @CPPFLAGS@ -I../include -I. @CPUINCLUDES@
21 cebix 1.6 DEFS = @DEFS@ @DEFINES@ -D_REENTRANT -DDATADIR=\"$(datadir)/$(APP)\"
22 cebix 1.1 LDFLAGS = @LDFLAGS@
23     LIBS = @LIBS@
24     SYSSRCS = @SYSSRCS@
25     CPUSRCS = @CPUSRCS@
26 gbeauche 1.26 BLESS = @BLESS@
27 cebix 1.3 INSTALL = @INSTALL@
28     INSTALL_PROGRAM = @INSTALL_PROGRAM@ -s
29     INSTALL_DATA = @INSTALL_DATA@
30 cebix 1.1
31     ## Files
32 cebix 1.17 SRCS = ../main.cpp main_unix.cpp ../prefs.cpp ../prefs_items.cpp prefs_unix.cpp \
33     sys_unix.cpp ../rom_patches.cpp ../slot_rom.cpp ../rsrc_patches.cpp \
34     ../emul_op.cpp ../macos_util.cpp ../xpram.cpp xpram_unix.cpp ../timer.cpp \
35     timer_unix.cpp clip_unix.cpp ../adb.cpp ../serial.cpp ../ether.cpp \
36 gbeauche 1.20 ../sony.cpp ../disk.cpp ../cdrom.cpp ../scsi.cpp ../video.cpp video_blit.cpp \
37 gbeauche 1.29 vm_alloc.cpp sigsegv.cpp ../audio.cpp ../extfs.cpp extfs_unix.cpp \
38 cebix 1.24 ../user_strings.cpp user_strings_unix.cpp sshpty.c strlcpy.c \
39 cebix 1.1 $(SYSSRCS) $(CPUSRCS)
40     APP = BasiliskII
41    
42     ## Rules
43 cebix 1.18 .PHONY: modules install installdirs uninstall mostlyclean clean distclean depend dep
44 cebix 1.9 .SUFFIXES:
45     .SUFFIXES: .c .cpp .s .o .h
46 cebix 1.2
47 cebix 1.9 all: $(APP)
48 cebix 1.1
49     OBJ_DIR = obj
50     $(OBJ_DIR)::
51     @[ -d $(OBJ_DIR) ] || mkdir $(OBJ_DIR) > /dev/null 2>&1
52    
53     define SRCS_LIST_TO_OBJS
54     $(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(foreach file, $(SRCS), \
55     $(basename $(notdir $(file))))))
56     endef
57     OBJS = $(SRCS_LIST_TO_OBJS)
58    
59     SRC_PATHS += $(sort $(foreach file, $(SRCS), $(dir $(file))))
60     VPATH :=
61     VPATH += $(addprefix :, $(subst ,:, $(filter-out $($(subst, :, ,$(VPATH))), $(SRC_PATHS))))
62    
63     $(APP): $(OBJ_DIR) $(OBJS)
64     $(CXX) -o $(APP) $(LDFLAGS) $(OBJS) $(LIBS)
65 gbeauche 1.26 $(BLESS) $(APP)
66 cebix 1.1
67     modules:
68 cebix 1.2 cd Linux/NetDriver; make
69 cebix 1.1
70 cebix 1.14 install: $(APP) installdirs
71 cebix 1.18 $(INSTALL_PROGRAM) $(APP) $(DESTDIR)$(bindir)/$(APP)
72     -$(INSTALL_DATA) $(APP).1 $(DESTDIR)$(man1dir)/$(APP).1
73     $(INSTALL_DATA) keycodes $(DESTDIR)$(datadir)/$(APP)/keycodes
74     $(INSTALL_DATA) fbdevices $(DESTDIR)$(datadir)/$(APP)/fbdevices
75 gbeauche 1.28 $(INSTALL_DATA) tunconfig $(DESTDIR)$(datadir)/$(APP)/tunconfig
76 cebix 1.14
77     installdirs:
78 cebix 1.19 $(SHELL) mkinstalldirs $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir) $(DESTDIR)$(datadir)/$(APP)
79 cebix 1.5
80     uninstall:
81 cebix 1.18 rm -f $(DESTDIR)$(bindir)/$(APP)
82     rm -f $(DESTDIR)$(man1dir)/$(APP).1
83     rm -f $(DESTDIR)$(datadir)/$(APP)/keycodes
84     rm -f $(DESTDIR)$(datadir)/$(APP)/fbdevices
85 gbeauche 1.28 rm -f $(DESTDIR)$(datadir)/$(APP)/tunconfig
86 cebix 1.18 rmdir $(DESTDIR)$(datadir)/$(APP)
87 cebix 1.9
88     mostlyclean:
89     rm -f $(APP) $(OBJ_DIR)/* core* *.core *~ *.bak
90    
91     clean: mostlyclean
92 gbeauche 1.25 rm -f cpuemu.cpp cpudefs.cpp cputmp*.s cpufast*.s cpustbl.cpp cputbl.h compemu.cpp compstbl.cpp comptbl.h
93 cebix 1.1
94     distclean: clean
95 cebix 1.9 rm -rf $(OBJ_DIR)
96 nigel 1.27 rm -rf autom4te.cache
97 cebix 1.9 rm -f Makefile
98 nigel 1.27 rm -f config.cache config.log config.status config.h config.h.in
99     rm -f Darwin/lowmem Darwin/pagezero
100 cebix 1.1
101     depend dep:
102 cebix 1.8 makedepend $(CPPFLAGS) -Y. $(SRCS) 2>/dev/null
103 cebix 1.1
104     $(OBJ_DIR)/%.o : %.c
105     $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $< -o $@
106     $(OBJ_DIR)/%.o : %.cpp
107     $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@
108     $(OBJ_DIR)/%.o : %.s
109     $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $< -o $@
110    
111     $(OBJ_DIR)/cpuopti: $(OBJ_DIR)/cpuopti.o
112     $(CC) $(LDFLAGS) -o $(OBJ_DIR)/cpuopti $(OBJ_DIR)/cpuopti.o
113     $(OBJ_DIR)/build68k: $(OBJ_DIR)/build68k.o
114     $(CC) $(LDFLAGS) -o $(OBJ_DIR)/build68k $(OBJ_DIR)/build68k.o
115     $(OBJ_DIR)/gencpu: $(OBJ_DIR)/gencpu.o $(OBJ_DIR)/readcpu.o $(OBJ_DIR)/cpudefs.o
116 gbeauche 1.23 $(CXX) $(LDFLAGS) -o $(OBJ_DIR)/gencpu $(OBJ_DIR)/gencpu.o $(OBJ_DIR)/readcpu.o $(OBJ_DIR)/cpudefs.o
117 gbeauche 1.25 $(OBJ_DIR)/gencomp: $(OBJ_DIR)/gencomp.o $(OBJ_DIR)/readcpu.o $(OBJ_DIR)/cpudefs.o
118     $(CXX) $(LDFLAGS) -o $(OBJ_DIR)/gencomp $(OBJ_DIR)/gencomp.o $(OBJ_DIR)/readcpu.o $(OBJ_DIR)/cpudefs.o
119    
120 cebix 1.1 cpudefs.cpp: $(OBJ_DIR)/build68k ../uae_cpu/table68k
121     $(OBJ_DIR)/build68k <../uae_cpu/table68k >cpudefs.cpp
122 cebix 1.11 cpustbl.cpp: cpuemu.cpp
123 gbeauche 1.25 cpustbl_nf.cpp: cpustbl.cpp
124     compstbl.cpp: compemu.cpp
125 cebix 1.11 cputbl.h: cpuemu.cpp
126 gbeauche 1.25 comptbl.h: compemu.cpp
127 cebix 1.11
128 cebix 1.1 cpuemu.cpp: $(OBJ_DIR)/gencpu
129     $(OBJ_DIR)/gencpu
130 cebix 1.11
131 gbeauche 1.25 compemu.cpp: $(OBJ_DIR)/gencomp
132     $(OBJ_DIR)/gencomp
133    
134     $(OBJ_DIR)/cpustbl_nf.o: cpustbl.cpp
135     $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -DNOFLAGS -c $< -o $@
136    
137     $(OBJ_DIR)/compemu_support.o: compemu_support.cpp comptbl.h
138     $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@
139    
140 cebix 1.11 $(OBJ_DIR)/cpuemu1.o: cpuemu.cpp
141     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_1 $(CXXFLAGS) -c $< -o $@
142     $(OBJ_DIR)/cpuemu2.o: cpuemu.cpp
143     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_2 $(CXXFLAGS) -c $< -o $@
144     $(OBJ_DIR)/cpuemu3.o: cpuemu.cpp
145     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_3 $(CXXFLAGS) -c $< -o $@
146     $(OBJ_DIR)/cpuemu4.o: cpuemu.cpp
147     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_4 $(CXXFLAGS) -c $< -o $@
148     $(OBJ_DIR)/cpuemu5.o: cpuemu.cpp
149     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_5 $(CXXFLAGS) -c $< -o $@
150     $(OBJ_DIR)/cpuemu6.o: cpuemu.cpp
151     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_6 $(CXXFLAGS) -c $< -o $@
152     $(OBJ_DIR)/cpuemu7.o: cpuemu.cpp
153     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_7 $(CXXFLAGS) -c $< -o $@
154     $(OBJ_DIR)/cpuemu8.o: cpuemu.cpp
155     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_8 $(CXXFLAGS) -c $< -o $@
156    
157 gbeauche 1.25 $(OBJ_DIR)/cpuemu1_nf.o: cpuemu.cpp
158     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_1 -DNOFLAGS $(CXXFLAGS) -c $< -o $@
159     $(OBJ_DIR)/cpuemu2_nf.o: cpuemu.cpp
160     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_2 -DNOFLAGS $(CXXFLAGS) -c $< -o $@
161     $(OBJ_DIR)/cpuemu3_nf.o: cpuemu.cpp
162     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_3 -DNOFLAGS $(CXXFLAGS) -c $< -o $@
163     $(OBJ_DIR)/cpuemu4_nf.o: cpuemu.cpp
164     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_4 -DNOFLAGS $(CXXFLAGS) -c $< -o $@
165     $(OBJ_DIR)/cpuemu5_nf.o: cpuemu.cpp
166     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_5 -DNOFLAGS $(CXXFLAGS) -c $< -o $@
167     $(OBJ_DIR)/cpuemu6_nf.o: cpuemu.cpp
168     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_6 -DNOFLAGS $(CXXFLAGS) -c $< -o $@
169     $(OBJ_DIR)/cpuemu7_nf.o: cpuemu.cpp
170     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_7 -DNOFLAGS $(CXXFLAGS) -c $< -o $@
171     $(OBJ_DIR)/cpuemu8_nf.o: cpuemu.cpp
172     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_8 -DNOFLAGS $(CXXFLAGS) -c $< -o $@
173    
174     $(OBJ_DIR)/compemu1.o: compemu.cpp
175     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_1 $(CXXFLAGS) -c $< -o $@
176     $(OBJ_DIR)/compemu2.o: compemu.cpp
177     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_2 $(CXXFLAGS) -c $< -o $@
178     $(OBJ_DIR)/compemu3.o: compemu.cpp
179     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_3 $(CXXFLAGS) -c $< -o $@
180     $(OBJ_DIR)/compemu4.o: compemu.cpp
181     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_4 $(CXXFLAGS) -c $< -o $@
182     $(OBJ_DIR)/compemu5.o: compemu.cpp
183     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_5 $(CXXFLAGS) -c $< -o $@
184     $(OBJ_DIR)/compemu6.o: compemu.cpp
185     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_6 $(CXXFLAGS) -c $< -o $@
186     $(OBJ_DIR)/compemu7.o: compemu.cpp
187     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_7 $(CXXFLAGS) -c $< -o $@
188     $(OBJ_DIR)/compemu8.o: compemu.cpp
189     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_8 $(CXXFLAGS) -c $< -o $@
190    
191 cebix 1.1 cpufast.s: cpuemu.cpp $(OBJ_DIR)/cpuopti
192     $(CXX) $(CPPFLAGS) $(DEFS) -S $(CXXFLAGS) $< -o cputmp.s
193     $(OBJ_DIR)/cpuopti <cputmp.s >$@ || mv cputmp.s $@
194     rm -f cputmp.s
195 cebix 1.11 cpufast1.s: cpuemu.cpp $(OBJ_DIR)/cpuopti
196     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_1 -S $(CXXFLAGS) $< -o cputmp1.s
197     $(OBJ_DIR)/cpuopti <cputmp1.s >$@ || mv cputmp1.s $@
198     rm -f cputmp1.s
199     cpufast2.s: cpuemu.cpp $(OBJ_DIR)/cpuopti
200     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_2 -S $(CXXFLAGS) $< -o cputmp2.s
201     $(OBJ_DIR)/cpuopti <cputmp2.s >$@ || mv cputmp2.s $@
202     rm -f cputmp2.s
203     cpufast3.s: cpuemu.cpp $(OBJ_DIR)/cpuopti
204     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_3 -S $(CXXFLAGS) $< -o cputmp3.s
205     $(OBJ_DIR)/cpuopti <cputmp3.s >$@ || mv cputmp3.s $@
206     rm -f cputmp3.s
207     cpufast4.s: cpuemu.cpp $(OBJ_DIR)/cpuopti
208     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_4 -S $(CXXFLAGS) $< -o cputmp4.s
209     $(OBJ_DIR)/cpuopti <cputmp4.s >$@ || mv cputmp4.s $@
210     rm -f cputmp4.s
211     cpufast5.s: cpuemu.cpp $(OBJ_DIR)/cpuopti
212     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_5 -S $(CXXFLAGS) $< -o cputmp5.s
213     $(OBJ_DIR)/cpuopti <cputmp5.s >$@ || mv cputmp5.s $@
214     rm -f cputmp5.s
215     cpufast6.s: cpuemu.cpp $(OBJ_DIR)/cpuopti
216     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_6 -S $(CXXFLAGS) $< -o cputmp6.s
217     $(OBJ_DIR)/cpuopti <cputmp6.s >$@ || mv cputmp6.s $@
218     rm -f cputmp6.s
219     cpufast7.s: cpuemu.cpp $(OBJ_DIR)/cpuopti
220     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_7 -S $(CXXFLAGS) $< -o cputmp7.s
221     $(OBJ_DIR)/cpuopti <cputmp7.s >$@ || mv cputmp7.s $@
222     rm -f cputmp7.s
223     cpufast8.s: cpuemu.cpp $(OBJ_DIR)/cpuopti
224     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_8 -S $(CXXFLAGS) $< -o cputmp8.s
225     $(OBJ_DIR)/cpuopti <cputmp8.s >$@ || mv cputmp8.s $@
226     rm -f cputmp8.s
227 gbeauche 1.25
228     cpufast_nf.s: cpuemu.cpp $(OBJ_DIR)/cpuopti
229     $(CXX) $(CPPFLAGS) $(DEFS) -DNOFLAGS -S $(CXXFLAGS) $< -o cputmp_nf.s
230     $(OBJ_DIR)/cpuopti <cputmp_nf.s >$@ || mv cputmp_nf.s $@
231     rm -f cputmp_nf.s
232     cpufast1_nf.s: cpuemu.cpp $(OBJ_DIR)/cpuopti
233     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_1 -DNOFLAGS -S $(CXXFLAGS) $< -o cputmp1_nf.s
234     $(OBJ_DIR)/cpuopti <cputmp1_nf.s >$@ || mv cputmp1_nf.s $@
235     rm -f cputmp1_nf.s
236     cpufast2_nf.s: cpuemu.cpp $(OBJ_DIR)/cpuopti
237     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_2 -DNOFLAGS -S $(CXXFLAGS) $< -o cputmp2_nf.s
238     $(OBJ_DIR)/cpuopti <cputmp2_nf.s >$@ || mv cputmp2_nf.s $@
239     rm -f cputmp2_nf.s
240     cpufast3_nf.s: cpuemu.cpp $(OBJ_DIR)/cpuopti
241     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_3 -DNOFLAGS -S $(CXXFLAGS) $< -o cputmp3_nf.s
242     $(OBJ_DIR)/cpuopti <cputmp3_nf.s >$@ || mv cputmp3_nf.s $@
243     rm -f cputmp3_nf.s
244     cpufast4_nf.s: cpuemu.cpp $(OBJ_DIR)/cpuopti
245     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_4 -DNOFLAGS -S $(CXXFLAGS) $< -o cputmp4_nf.s
246     $(OBJ_DIR)/cpuopti <cputmp4_nf.s >$@ || mv cputmp4_nf.s $@
247     rm -f cputmp4_nf.s
248     cpufast5_nf.s: cpuemu.cpp $(OBJ_DIR)/cpuopti
249     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_5 -DNOFLAGS -S $(CXXFLAGS) $< -o cputmp5_nf.s
250     $(OBJ_DIR)/cpuopti <cputmp5_nf.s >$@ || mv cputmp5_nf.s $@
251     rm -f cputmp5_nf.s
252     cpufast6_nf.s: cpuemu.cpp $(OBJ_DIR)/cpuopti
253     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_6 -DNOFLAGS -S $(CXXFLAGS) $< -o cputmp6_nf.s
254     $(OBJ_DIR)/cpuopti <cputmp6_nf.s >$@ || mv cputmp6_nf.s $@
255     rm -f cputmp6_nf.s
256     cpufast7_nf.s: cpuemu.cpp $(OBJ_DIR)/cpuopti
257     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_7 -DNOFLAGS -S $(CXXFLAGS) $< -o cputmp7_nf.s
258     $(OBJ_DIR)/cpuopti <cputmp7_nf.s >$@ || mv cputmp7_nf.s $@
259     rm -f cputmp7_nf.s
260     cpufast8_nf.s: cpuemu.cpp $(OBJ_DIR)/cpuopti
261     $(CXX) $(CPPFLAGS) $(DEFS) -DPART_8 -DNOFLAGS -S $(CXXFLAGS) $< -o cputmp8_nf.s
262     $(OBJ_DIR)/cpuopti <cputmp8_nf.s >$@ || mv cputmp8_nf.s $@
263     rm -f cputmp8_nf.s
264 cebix 1.1
265     #-------------------------------------------------------------------------
266     # DO NOT DELETE THIS LINE -- make depend depends on it.