ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/Makefile.in
Revision: 1.2
Committed: 1999-10-03T15:11:07Z (24 years, 7 months ago) by cebix
Branch: MAIN
Changes since 1.1: +9 -7 lines
Log Message:
- improved the clean/distclean targets

File Contents

# User Rev Content
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 cebix 1.2 .PHONY: clean distclean realclean depend
36    
37 cebix 1.1 default: $(APP)
38    
39     OBJ_DIR = obj
40     $(OBJ_DIR)::
41     @[ -d $(OBJ_DIR) ] || mkdir $(OBJ_DIR) > /dev/null 2>&1
42    
43     define SRCS_LIST_TO_OBJS
44     $(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(foreach file, $(SRCS), \
45     $(basename $(notdir $(file))))))
46     endef
47     OBJS = $(SRCS_LIST_TO_OBJS)
48    
49     SRC_PATHS += $(sort $(foreach file, $(SRCS), $(dir $(file))))
50     VPATH :=
51     VPATH += $(addprefix :, $(subst ,:, $(filter-out $($(subst, :, ,$(VPATH))), $(SRC_PATHS))))
52    
53     $(APP): $(OBJ_DIR) $(OBJS)
54     $(CXX) -o $(APP) $(LDFLAGS) $(OBJS) $(LIBS)
55    
56     modules:
57 cebix 1.2 cd Linux/NetDriver; make
58 cebix 1.1
59     install: $(APP)
60     $(INSTALL_PROGRAM) -s BasiliskII $(bindir)
61     $(INSTALL_DATA) BasiliskII.1 $(mandir)/man1/
62     $(INSTALL_DATA) basilisk_ii_keycodes $(libdir)
63    
64     clean:
65 cebix 1.2 -rm -f $(OBJ_DIR)/* core* *.core *~ *.bak
66     -rm -f cpuemu.cpp cpudefs.cpp cputmp.s cpufast*.s cpustbl.cpp cputbl.h
67 cebix 1.1
68     distclean: clean
69 cebix 1.2 -rm -f Makefile
70     -rm -f config.cache config.log config.status config.h
71     -strip $(APP)
72 cebix 1.1
73     realclean: distclean
74 cebix 1.2 -rm -f $(APP)
75 cebix 1.1
76     depend dep:
77     makedepend $(CPPFLAGS) -Y ../*.cpp ../*.c *.cpp
78    
79     $(OBJ_DIR)/%.o : %.c
80     $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $< -o $@
81     $(OBJ_DIR)/%.o : %.cpp
82     $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@
83     $(OBJ_DIR)/%.o : %.s
84     $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $< -o $@
85    
86     $(OBJ_DIR)/cpuopti: $(OBJ_DIR)/cpuopti.o
87     $(CC) $(LDFLAGS) -o $(OBJ_DIR)/cpuopti $(OBJ_DIR)/cpuopti.o
88     $(OBJ_DIR)/build68k: $(OBJ_DIR)/build68k.o
89     $(CC) $(LDFLAGS) -o $(OBJ_DIR)/build68k $(OBJ_DIR)/build68k.o
90     $(OBJ_DIR)/gencpu: $(OBJ_DIR)/gencpu.o $(OBJ_DIR)/readcpu.o $(OBJ_DIR)/cpudefs.o
91     $(CC) $(LDFLAGS) -o $(OBJ_DIR)/gencpu $(OBJ_DIR)/gencpu.o $(OBJ_DIR)/readcpu.o $(OBJ_DIR)/cpudefs.o
92     cpudefs.cpp: $(OBJ_DIR)/build68k ../uae_cpu/table68k
93     $(OBJ_DIR)/build68k <../uae_cpu/table68k >cpudefs.cpp
94     cpuemu.cpp: $(OBJ_DIR)/gencpu
95     $(OBJ_DIR)/gencpu
96     cpustbl.cpp: cpuemu.cpp
97     cputbl.h: cpuemu.cpp
98     cpufast.s: cpuemu.cpp $(OBJ_DIR)/cpuopti
99     $(CXX) $(CPPFLAGS) $(DEFS) -S $(CXXFLAGS) $< -o cputmp.s
100     $(OBJ_DIR)/cpuopti <cputmp.s >$@ || mv cputmp.s $@
101     rm -f cputmp.s
102    
103     #-------------------------------------------------------------------------
104     # DO NOT DELETE THIS LINE -- make depend depends on it.