2 |
|
|
3 |
|
## System specific configuration |
4 |
|
@SET_MAKE@ |
5 |
+ |
SHELL = /bin/sh |
6 |
|
|
7 |
< |
prefix=@prefix@ |
8 |
< |
exec_prefix=@exec_prefix@ |
9 |
< |
bindir=$(exec_prefix)/bin |
10 |
< |
sharedir=$(prefix)/share/BasiliskII |
11 |
< |
mandir=$(prefix)/man |
7 |
> |
prefix = @prefix@ |
8 |
> |
exec_prefix = @exec_prefix@ |
9 |
> |
bindir = @bindir@ |
10 |
> |
datadir = @datadir@ |
11 |
> |
mandir = @mandir@ |
12 |
> |
man1dir = $(mandir)/man1 |
13 |
|
|
14 |
|
CC = @CC@ |
15 |
|
CXX = @CXX@ |
16 |
|
CFLAGS = @CFLAGS@ |
17 |
|
CXXFLAGS = @CXXFLAGS@ |
18 |
|
CPPFLAGS = @CPPFLAGS@ -I../include -I. @CPUINCLUDES@ |
19 |
< |
DEFS = @DEFS@ @DEFINES@ -D_REENTRANT -DSHAREDIR=\"$(sharedir)\" |
19 |
> |
DEFS = @DEFS@ @DEFINES@ -D_REENTRANT -DDATADIR=\"$(datadir)/$(APP)\" |
20 |
|
LDFLAGS = @LDFLAGS@ |
21 |
|
LIBS = @LIBS@ |
22 |
|
SYSSRCS = @SYSSRCS@ |
26 |
|
INSTALL_DATA = @INSTALL_DATA@ |
27 |
|
|
28 |
|
## Files |
29 |
< |
SRCS=../prefs.cpp ../rom_patches.cpp ../slot_rom.cpp ../rsrc_patches.cpp ../emul_op.cpp \ |
30 |
< |
../macos_util.cpp ../xpram.cpp ../timer.cpp ../adb.cpp ../serial.cpp ../ether.cpp ../sony.cpp \ |
31 |
< |
../disk.cpp ../cdrom.cpp ../scsi.cpp ../video.cpp ../audio.cpp ../user_strings.cpp \ |
32 |
< |
main_unix.cpp prefs_unix.cpp sys_unix.cpp xpram_unix.cpp timer_unix.cpp clip_unix.cpp \ |
33 |
< |
serial_unix.cpp video_x.cpp \ |
29 |
> |
SRCS = ../main.cpp main_unix.cpp ../prefs.cpp ../prefs_items.cpp prefs_unix.cpp \ |
30 |
> |
sys_unix.cpp ../rom_patches.cpp ../slot_rom.cpp ../rsrc_patches.cpp \ |
31 |
> |
../emul_op.cpp ../macos_util.cpp ../xpram.cpp xpram_unix.cpp ../timer.cpp \ |
32 |
> |
timer_unix.cpp clip_unix.cpp ../adb.cpp ../serial.cpp ../ether.cpp \ |
33 |
> |
../sony.cpp ../disk.cpp ../cdrom.cpp ../scsi.cpp ../video.cpp video_x.cpp \ |
34 |
> |
../audio.cpp ../extfs.cpp extfs_unix.cpp ../user_strings.cpp \ |
35 |
> |
user_strings_unix.cpp \ |
36 |
|
$(SYSSRCS) $(CPUSRCS) |
37 |
|
APP = BasiliskII |
38 |
|
|
39 |
|
## Rules |
40 |
< |
.PHONY: clean distclean realclean depend |
40 |
> |
.PHONY: modules install uninstall clean distclean depend dep |
41 |
> |
.SUFFIXES: |
42 |
> |
.SUFFIXES: .c .cpp .s .o .h |
43 |
|
|
44 |
< |
default: $(APP) |
44 |
> |
all: $(APP) |
45 |
|
|
46 |
|
OBJ_DIR = obj |
47 |
|
$(OBJ_DIR):: |
63 |
|
modules: |
64 |
|
cd Linux/NetDriver; make |
65 |
|
|
66 |
< |
install: $(APP) |
67 |
< |
$(INSTALL_PROGRAM) BasiliskII $(bindir)/ |
68 |
< |
$(INSTALL_DATA) BasiliskII.1 $(mandir)/man1/ |
69 |
< |
$(INSTALL) -d $(sharedir) |
70 |
< |
$(INSTALL_DATA) keycodes $(sharedir) |
66 |
> |
install: $(APP) installdirs |
67 |
> |
$(INSTALL_PROGRAM) $(APP) $(bindir)/$(APP) |
68 |
> |
-$(INSTALL_DATA) $(APP).1 $(man1dir)/$(APP).1 |
69 |
> |
$(INSTALL_DATA) keycodes $(datadir)/$(APP)/keycodes |
70 |
> |
$(INSTALL_DATA) fbdevices $(datadir)/$(APP)/fbdevices |
71 |
> |
|
72 |
> |
installdirs: |
73 |
> |
$(SHELL) mkinstalldirs $(bindir) $(man1dir) $(datadir)/$(APP) |
74 |
|
|
75 |
|
uninstall: |
76 |
< |
-rm -f $(bindir)/BasiliskII |
77 |
< |
-rm -f $(mandir)/man1/BasiliskII.1 |
78 |
< |
-rm -rf $(sharedir) |
79 |
< |
|
80 |
< |
clean: |
72 |
< |
-rm -f $(OBJ_DIR)/* core* *.core *~ *.bak |
73 |
< |
-rm -f cpuemu.cpp cpudefs.cpp cputmp.s cpufast*.s cpustbl.cpp cputbl.h |
76 |
> |
rm -f $(bindir)/$(APP) |
77 |
> |
rm -f $(man1dir)/$(APP).1 |
78 |
> |
rm -f $(datadir)/$(APP)/keycodes |
79 |
> |
rm -f $(datadir)/$(APP)/fbdevices |
80 |
> |
rmdir $(datadir)/$(APP) |
81 |
|
|
82 |
< |
distclean: clean |
83 |
< |
-rm -f Makefile |
84 |
< |
-rm -f config.cache config.log config.status config.h |
85 |
< |
-strip $(APP) |
82 |
> |
mostlyclean: |
83 |
> |
rm -f $(APP) $(OBJ_DIR)/* core* *.core *~ *.bak |
84 |
> |
|
85 |
> |
clean: mostlyclean |
86 |
> |
rm -f cpuemu.cpp cpudefs.cpp cputmp*.s cpufast*.s cpustbl.cpp cputbl.h |
87 |
|
|
88 |
< |
realclean: distclean |
89 |
< |
-rm -f $(APP) |
88 |
> |
distclean: clean |
89 |
> |
rm -rf $(OBJ_DIR) |
90 |
> |
rm -f Makefile |
91 |
> |
rm -f config.cache config.log config.status config.h |
92 |
|
|
93 |
|
depend dep: |
94 |
< |
makedepend $(CPPFLAGS) -Y ../*.cpp ../*.c *.cpp |
94 |
> |
makedepend $(CPPFLAGS) -Y. $(SRCS) 2>/dev/null |
95 |
|
|
96 |
|
$(OBJ_DIR)/%.o : %.c |
97 |
|
$(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $< -o $@ |
108 |
|
$(CC) $(LDFLAGS) -o $(OBJ_DIR)/gencpu $(OBJ_DIR)/gencpu.o $(OBJ_DIR)/readcpu.o $(OBJ_DIR)/cpudefs.o |
109 |
|
cpudefs.cpp: $(OBJ_DIR)/build68k ../uae_cpu/table68k |
110 |
|
$(OBJ_DIR)/build68k <../uae_cpu/table68k >cpudefs.cpp |
101 |
– |
cpuemu.cpp: $(OBJ_DIR)/gencpu |
102 |
– |
$(OBJ_DIR)/gencpu |
111 |
|
cpustbl.cpp: cpuemu.cpp |
112 |
|
cputbl.h: cpuemu.cpp |
113 |
+ |
|
114 |
+ |
cpuemu.cpp: $(OBJ_DIR)/gencpu |
115 |
+ |
$(OBJ_DIR)/gencpu |
116 |
+ |
|
117 |
+ |
$(OBJ_DIR)/cpuemu1.o: cpuemu.cpp |
118 |
+ |
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_1 $(CXXFLAGS) -c $< -o $@ |
119 |
+ |
$(OBJ_DIR)/cpuemu2.o: cpuemu.cpp |
120 |
+ |
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_2 $(CXXFLAGS) -c $< -o $@ |
121 |
+ |
$(OBJ_DIR)/cpuemu3.o: cpuemu.cpp |
122 |
+ |
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_3 $(CXXFLAGS) -c $< -o $@ |
123 |
+ |
$(OBJ_DIR)/cpuemu4.o: cpuemu.cpp |
124 |
+ |
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_4 $(CXXFLAGS) -c $< -o $@ |
125 |
+ |
$(OBJ_DIR)/cpuemu5.o: cpuemu.cpp |
126 |
+ |
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_5 $(CXXFLAGS) -c $< -o $@ |
127 |
+ |
$(OBJ_DIR)/cpuemu6.o: cpuemu.cpp |
128 |
+ |
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_6 $(CXXFLAGS) -c $< -o $@ |
129 |
+ |
$(OBJ_DIR)/cpuemu7.o: cpuemu.cpp |
130 |
+ |
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_7 $(CXXFLAGS) -c $< -o $@ |
131 |
+ |
$(OBJ_DIR)/cpuemu8.o: cpuemu.cpp |
132 |
+ |
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_8 $(CXXFLAGS) -c $< -o $@ |
133 |
+ |
|
134 |
|
cpufast.s: cpuemu.cpp $(OBJ_DIR)/cpuopti |
135 |
|
$(CXX) $(CPPFLAGS) $(DEFS) -S $(CXXFLAGS) $< -o cputmp.s |
136 |
|
$(OBJ_DIR)/cpuopti <cputmp.s >$@ || mv cputmp.s $@ |
137 |
|
rm -f cputmp.s |
138 |
+ |
cpufast1.s: cpuemu.cpp $(OBJ_DIR)/cpuopti |
139 |
+ |
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_1 -S $(CXXFLAGS) $< -o cputmp1.s |
140 |
+ |
$(OBJ_DIR)/cpuopti <cputmp1.s >$@ || mv cputmp1.s $@ |
141 |
+ |
rm -f cputmp1.s |
142 |
+ |
cpufast2.s: cpuemu.cpp $(OBJ_DIR)/cpuopti |
143 |
+ |
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_2 -S $(CXXFLAGS) $< -o cputmp2.s |
144 |
+ |
$(OBJ_DIR)/cpuopti <cputmp2.s >$@ || mv cputmp2.s $@ |
145 |
+ |
rm -f cputmp2.s |
146 |
+ |
cpufast3.s: cpuemu.cpp $(OBJ_DIR)/cpuopti |
147 |
+ |
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_3 -S $(CXXFLAGS) $< -o cputmp3.s |
148 |
+ |
$(OBJ_DIR)/cpuopti <cputmp3.s >$@ || mv cputmp3.s $@ |
149 |
+ |
rm -f cputmp3.s |
150 |
+ |
cpufast4.s: cpuemu.cpp $(OBJ_DIR)/cpuopti |
151 |
+ |
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_4 -S $(CXXFLAGS) $< -o cputmp4.s |
152 |
+ |
$(OBJ_DIR)/cpuopti <cputmp4.s >$@ || mv cputmp4.s $@ |
153 |
+ |
rm -f cputmp4.s |
154 |
+ |
cpufast5.s: cpuemu.cpp $(OBJ_DIR)/cpuopti |
155 |
+ |
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_5 -S $(CXXFLAGS) $< -o cputmp5.s |
156 |
+ |
$(OBJ_DIR)/cpuopti <cputmp5.s >$@ || mv cputmp5.s $@ |
157 |
+ |
rm -f cputmp5.s |
158 |
+ |
cpufast6.s: cpuemu.cpp $(OBJ_DIR)/cpuopti |
159 |
+ |
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_6 -S $(CXXFLAGS) $< -o cputmp6.s |
160 |
+ |
$(OBJ_DIR)/cpuopti <cputmp6.s >$@ || mv cputmp6.s $@ |
161 |
+ |
rm -f cputmp6.s |
162 |
+ |
cpufast7.s: cpuemu.cpp $(OBJ_DIR)/cpuopti |
163 |
+ |
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_7 -S $(CXXFLAGS) $< -o cputmp7.s |
164 |
+ |
$(OBJ_DIR)/cpuopti <cputmp7.s >$@ || mv cputmp7.s $@ |
165 |
+ |
rm -f cputmp7.s |
166 |
+ |
cpufast8.s: cpuemu.cpp $(OBJ_DIR)/cpuopti |
167 |
+ |
$(CXX) $(CPPFLAGS) $(DEFS) -DPART_8 -S $(CXXFLAGS) $< -o cputmp8.s |
168 |
+ |
$(OBJ_DIR)/cpuopti <cputmp8.s >$@ || mv cputmp8.s $@ |
169 |
+ |
rm -f cputmp8.s |
170 |
|
|
171 |
|
#------------------------------------------------------------------------- |
172 |
|
# DO NOT DELETE THIS LINE -- make depend depends on it. |