ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/Makefile.in
Revision: 1.17
Committed: 2000-07-25T15:19:42Z (24 years, 3 months ago) by cebix
Branch: MAIN
Changes since 1.16: +7 -6 lines
Log Message:
- more cleanups
- splitted prefs.cpp into prefs.cpp and prefs_items.cpp to make prefs.cpp
  reusable for other projects

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.1 CC = @CC@
15     CXX = @CXX@
16     CFLAGS = @CFLAGS@
17     CXXFLAGS = @CXXFLAGS@
18     CPPFLAGS = @CPPFLAGS@ -I../include -I. @CPUINCLUDES@
19 cebix 1.6 DEFS = @DEFS@ @DEFINES@ -D_REENTRANT -DDATADIR=\"$(datadir)/$(APP)\"
20 cebix 1.1 LDFLAGS = @LDFLAGS@
21     LIBS = @LIBS@
22     SYSSRCS = @SYSSRCS@
23     CPUSRCS = @CPUSRCS@
24 cebix 1.3 INSTALL = @INSTALL@
25     INSTALL_PROGRAM = @INSTALL_PROGRAM@ -s
26     INSTALL_DATA = @INSTALL_DATA@
27 cebix 1.1
28     ## Files
29 cebix 1.17 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 cebix 1.1 $(SYSSRCS) $(CPUSRCS)
37     APP = BasiliskII
38    
39     ## Rules
40 cebix 1.15 .PHONY: modules install uninstall clean distclean depend dep
41 cebix 1.9 .SUFFIXES:
42     .SUFFIXES: .c .cpp .s .o .h
43 cebix 1.2
44 cebix 1.9 all: $(APP)
45 cebix 1.1
46     OBJ_DIR = obj
47     $(OBJ_DIR)::
48     @[ -d $(OBJ_DIR) ] || mkdir $(OBJ_DIR) > /dev/null 2>&1
49    
50     define SRCS_LIST_TO_OBJS
51     $(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(foreach file, $(SRCS), \
52     $(basename $(notdir $(file))))))
53     endef
54     OBJS = $(SRCS_LIST_TO_OBJS)
55    
56     SRC_PATHS += $(sort $(foreach file, $(SRCS), $(dir $(file))))
57     VPATH :=
58     VPATH += $(addprefix :, $(subst ,:, $(filter-out $($(subst, :, ,$(VPATH))), $(SRC_PATHS))))
59    
60     $(APP): $(OBJ_DIR) $(OBJS)
61     $(CXX) -o $(APP) $(LDFLAGS) $(OBJS) $(LIBS)
62    
63     modules:
64 cebix 1.2 cd Linux/NetDriver; make
65 cebix 1.1
66 cebix 1.14 install: $(APP) installdirs
67 cebix 1.9 $(INSTALL_PROGRAM) $(APP) $(bindir)/$(APP)
68     -$(INSTALL_DATA) $(APP).1 $(man1dir)/$(APP).1
69     $(INSTALL_DATA) keycodes $(datadir)/$(APP)/keycodes
70 cebix 1.13 $(INSTALL_DATA) fbdevices $(datadir)/$(APP)/fbdevices
71 cebix 1.14
72     installdirs:
73     $(SHELL) mkinstalldirs $(bindir) $(man1dir) $(datadir)/$(APP)
74 cebix 1.5
75     uninstall:
76 cebix 1.9 rm -f $(bindir)/$(APP)
77     rm -f $(man1dir)/$(APP).1
78     rm -f $(datadir)/$(APP)/keycodes
79 cebix 1.13 rm -f $(datadir)/$(APP)/fbdevices
80 cebix 1.9 rmdir $(datadir)/$(APP)
81    
82     mostlyclean:
83     rm -f $(APP) $(OBJ_DIR)/* core* *.core *~ *.bak
84    
85     clean: mostlyclean
86 cebix 1.11 rm -f cpuemu.cpp cpudefs.cpp cputmp*.s cpufast*.s cpustbl.cpp cputbl.h
87 cebix 1.1
88     distclean: clean
89 cebix 1.9 rm -rf $(OBJ_DIR)
90     rm -f Makefile
91     rm -f config.cache config.log config.status config.h
92 cebix 1.1
93     depend dep:
94 cebix 1.8 makedepend $(CPPFLAGS) -Y. $(SRCS) 2>/dev/null
95 cebix 1.1
96     $(OBJ_DIR)/%.o : %.c
97     $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $< -o $@
98     $(OBJ_DIR)/%.o : %.cpp
99     $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@
100     $(OBJ_DIR)/%.o : %.s
101     $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $< -o $@
102    
103     $(OBJ_DIR)/cpuopti: $(OBJ_DIR)/cpuopti.o
104     $(CC) $(LDFLAGS) -o $(OBJ_DIR)/cpuopti $(OBJ_DIR)/cpuopti.o
105     $(OBJ_DIR)/build68k: $(OBJ_DIR)/build68k.o
106     $(CC) $(LDFLAGS) -o $(OBJ_DIR)/build68k $(OBJ_DIR)/build68k.o
107     $(OBJ_DIR)/gencpu: $(OBJ_DIR)/gencpu.o $(OBJ_DIR)/readcpu.o $(OBJ_DIR)/cpudefs.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
111 cebix 1.11 cpustbl.cpp: cpuemu.cpp
112     cputbl.h: cpuemu.cpp
113    
114 cebix 1.1 cpuemu.cpp: $(OBJ_DIR)/gencpu
115     $(OBJ_DIR)/gencpu
116 cebix 1.11
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 cebix 1.1 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 cebix 1.11 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 cebix 1.1
171     #-------------------------------------------------------------------------
172     # DO NOT DELETE THIS LINE -- make depend depends on it.