ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/Makefile.in
Revision: 1.9
Committed: 1999-10-12T18:40:57Z (25 years, 1 month ago) by cebix
Branch: MAIN
Changes since 1.8: +20 -14 lines
Log Message:
- improved Makefile and man page

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