1 |
cebix |
1.1 |
# Unix makefile for Basilisk II |
2 |
|
|
|
3 |
|
|
## System specific configuration |
4 |
|
|
@SET_MAKE@ |
5 |
|
|
CC = @CC@ |
6 |
|
|
CXX = @CXX@ |
7 |
|
|
CFLAGS = @CFLAGS@ |
8 |
|
|
CXXFLAGS = @CXXFLAGS@ |
9 |
|
|
CPPFLAGS = @CPPFLAGS@ -I../include -I. @CPUINCLUDES@ |
10 |
|
|
DEFS = @DEFS@ @DEFINES@ -D_REENTRANT |
11 |
|
|
LDFLAGS = @LDFLAGS@ |
12 |
|
|
LIBS = @LIBS@ |
13 |
|
|
SYSSRCS = @SYSSRCS@ |
14 |
|
|
CPUSRCS = @CPUSRCS@ |
15 |
|
|
|
16 |
|
|
prefix=@prefix@ |
17 |
|
|
exec_prefix=@exec_prefix@ |
18 |
|
|
bindir=$(exec_prefix)/bin |
19 |
|
|
libdir=$(exec_prefix)/lib |
20 |
|
|
mandir=$(prefix)/man |
21 |
|
|
INSTALL=@INSTALL@ |
22 |
|
|
INSTALL_PROGRAM=@INSTALL_PROGRAM@ |
23 |
|
|
INSTALL_DATA=@INSTALL_DATA@ |
24 |
|
|
|
25 |
|
|
## Files |
26 |
|
|
SRCS=../prefs.cpp ../rom_patches.cpp ../slot_rom.cpp ../rsrc_patches.cpp ../emul_op.cpp \ |
27 |
|
|
../macos_util.cpp ../xpram.cpp ../timer.cpp ../adb.cpp ../serial.cpp ../ether.cpp ../sony.cpp \ |
28 |
|
|
../disk.cpp ../cdrom.cpp ../scsi.cpp ../video.cpp ../audio.cpp ../user_strings.cpp \ |
29 |
|
|
main_unix.cpp prefs_unix.cpp sys_unix.cpp xpram_unix.cpp timer_unix.cpp clip_unix.cpp \ |
30 |
|
|
serial_unix.cpp video_x.cpp \ |
31 |
|
|
$(SYSSRCS) $(CPUSRCS) |
32 |
|
|
APP = BasiliskII |
33 |
|
|
|
34 |
|
|
## Rules |
35 |
|
|
default: $(APP) |
36 |
|
|
|
37 |
|
|
OBJ_DIR = obj |
38 |
|
|
$(OBJ_DIR):: |
39 |
|
|
@[ -d $(OBJ_DIR) ] || mkdir $(OBJ_DIR) > /dev/null 2>&1 |
40 |
|
|
|
41 |
|
|
define SRCS_LIST_TO_OBJS |
42 |
|
|
$(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(foreach file, $(SRCS), \ |
43 |
|
|
$(basename $(notdir $(file)))))) |
44 |
|
|
endef |
45 |
|
|
OBJS = $(SRCS_LIST_TO_OBJS) |
46 |
|
|
|
47 |
|
|
SRC_PATHS += $(sort $(foreach file, $(SRCS), $(dir $(file)))) |
48 |
|
|
VPATH := |
49 |
|
|
VPATH += $(addprefix :, $(subst ,:, $(filter-out $($(subst, :, ,$(VPATH))), $(SRC_PATHS)))) |
50 |
|
|
|
51 |
|
|
$(APP): $(OBJ_DIR) $(OBJS) |
52 |
|
|
$(CXX) -o $(APP) $(LDFLAGS) $(OBJS) $(LIBS) |
53 |
|
|
|
54 |
|
|
modules: |
55 |
|
|
cd Linux/NetDriver && make |
56 |
|
|
|
57 |
|
|
install: $(APP) |
58 |
|
|
$(INSTALL_PROGRAM) -s BasiliskII $(bindir) |
59 |
|
|
$(INSTALL_DATA) BasiliskII.1 $(mandir)/man1/ |
60 |
|
|
$(INSTALL_DATA) basilisk_ii_keycodes $(libdir) |
61 |
|
|
|
62 |
|
|
clean: |
63 |
|
|
rm -f $(OBJ_DIR)/* core* *.core *~ *.bak |
64 |
|
|
rm -f cpuemu.cpp cpudefs.cpp cputmp.s cpufast*.s cpustbl.cpp cputbl.h |
65 |
|
|
|
66 |
|
|
distclean: clean |
67 |
|
|
rm -f Makefile |
68 |
|
|
rm -f config.cache config.log config.status config.h |
69 |
|
|
strip $(APP) |
70 |
|
|
|
71 |
|
|
realclean: distclean |
72 |
|
|
rm -f $(APP) |
73 |
|
|
|
74 |
|
|
depend dep: |
75 |
|
|
makedepend $(CPPFLAGS) -Y ../*.cpp ../*.c *.cpp |
76 |
|
|
|
77 |
|
|
$(OBJ_DIR)/%.o : %.c |
78 |
|
|
$(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $< -o $@ |
79 |
|
|
$(OBJ_DIR)/%.o : %.cpp |
80 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@ |
81 |
|
|
$(OBJ_DIR)/%.o : %.s |
82 |
|
|
$(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $< -o $@ |
83 |
|
|
|
84 |
|
|
$(OBJ_DIR)/cpuopti: $(OBJ_DIR)/cpuopti.o |
85 |
|
|
$(CC) $(LDFLAGS) -o $(OBJ_DIR)/cpuopti $(OBJ_DIR)/cpuopti.o |
86 |
|
|
$(OBJ_DIR)/build68k: $(OBJ_DIR)/build68k.o |
87 |
|
|
$(CC) $(LDFLAGS) -o $(OBJ_DIR)/build68k $(OBJ_DIR)/build68k.o |
88 |
|
|
$(OBJ_DIR)/gencpu: $(OBJ_DIR)/gencpu.o $(OBJ_DIR)/readcpu.o $(OBJ_DIR)/cpudefs.o |
89 |
|
|
$(CC) $(LDFLAGS) -o $(OBJ_DIR)/gencpu $(OBJ_DIR)/gencpu.o $(OBJ_DIR)/readcpu.o $(OBJ_DIR)/cpudefs.o |
90 |
|
|
cpudefs.cpp: $(OBJ_DIR)/build68k ../uae_cpu/table68k |
91 |
|
|
$(OBJ_DIR)/build68k <../uae_cpu/table68k >cpudefs.cpp |
92 |
|
|
cpuemu.cpp: $(OBJ_DIR)/gencpu |
93 |
|
|
$(OBJ_DIR)/gencpu |
94 |
|
|
cpustbl.cpp: cpuemu.cpp |
95 |
|
|
cputbl.h: cpuemu.cpp |
96 |
|
|
cpufast.s: cpuemu.cpp $(OBJ_DIR)/cpuopti |
97 |
|
|
$(CXX) $(CPPFLAGS) $(DEFS) -S $(CXXFLAGS) $< -o cputmp.s |
98 |
|
|
$(OBJ_DIR)/cpuopti <cputmp.s >$@ || mv cputmp.s $@ |
99 |
|
|
rm -f cputmp.s |
100 |
|
|
|
101 |
|
|
#------------------------------------------------------------------------- |
102 |
|
|
# DO NOT DELETE THIS LINE -- make depend depends on it. |