ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/SheepShaver/src/Unix/Makefile.in
Revision: 1.2
Committed: 2003-01-04T12:23:39Z (21 years, 5 months ago) by gbeauche
Branch: MAIN
Changes since 1.1: +2 -1 lines
Log Message:
Sync with changes from cxmon and B2. I have yet to find out why my old
disk image (8.1 based) no longer boots completely. :-/

File Contents

# User Rev Content
1 cebix 1.1 # Linux makefile for SheepShaver
2    
3     ## System specific configuration
4     @SET_MAKE@
5     SHELL = /bin/sh
6    
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.
19     DEFS = @DEFS@ -D_REENTRANT -DDATADIR=\"$(datadir)/$(APP)\"
20     LDFLAGS = @LDFLAGS@
21     LIBS = @LIBS@
22     SYSSRCS = @SYSSRCS@
23     INSTALL = @INSTALL@
24     INSTALL_PROGRAM = @INSTALL_PROGRAM@ -s
25     INSTALL_DATA = @INSTALL_DATA@
26    
27     ## Files
28     SRCS = main_unix.cpp ../prefs.cpp ../prefs_items.cpp prefs_unix.cpp sys_unix.cpp \
29     ../rom_patches.cpp ../rsrc_patches.cpp ../emul_op.cpp ../name_registry.cpp \
30     ../macos_util.cpp ../timer.cpp timer_unix.cpp ../xpram.cpp xpram_unix.cpp \
31     ../adb.cpp clip_unix.cpp ../sony.cpp ../disk.cpp ../cdrom.cpp ../scsi.cpp \
32     Linux/scsi_linux.cpp ../video.cpp video_x.cpp ../audio.cpp audio_oss_esd.cpp ../ether.cpp \
33     Linux/ether_linux.cpp ../serial.cpp serial_unix.cpp ../extfs.cpp extfs_unix.cpp \
34 gbeauche 1.2 about_window_unix.cpp ../user_strings.cpp user_strings_unix.cpp \
35     sshpty.c strlcpy.c $(SYSSRCS)
36 cebix 1.1 APP = SheepShaver
37    
38     ## Rules
39     .PHONY: modules install uninstall clean distclean depend dep
40     .SUFFIXES:
41     .SUFFIXES: .c .cpp .S .o .h
42    
43     all: $(APP)
44    
45     OBJ_DIR = obj
46     $(OBJ_DIR)::
47     @[ -d $(OBJ_DIR) ] || mkdir $(OBJ_DIR) > /dev/null 2>&1
48    
49     define SRCS_LIST_TO_OBJS
50     $(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(foreach file, $(SRCS), \
51     $(basename $(notdir $(file))))))
52     endef
53     OBJS = $(SRCS_LIST_TO_OBJS)
54    
55     SRC_PATHS += $(sort $(foreach file, $(SRCS), $(dir $(file))))
56     VPATH :=
57     VPATH += $(addprefix :, $(subst ,:, $(filter-out $($(subst, :, ,$(VPATH))), $(SRC_PATHS))))
58    
59     $(APP): $(OBJ_DIR) $(OBJS)
60     $(CXX) -o $(APP) $(LDFLAGS) $(OBJS) $(LIBS)
61    
62     modules:
63     cd NetDriver; make
64    
65     install: $(APP) installdirs
66     $(INSTALL_PROGRAM) $(APP) $(bindir)/$(APP)
67     -$(INSTALL_DATA) $(APP).1 $(man1dir)/$(APP).1
68    
69     installdirs:
70     $(SHELL) mkinstalldirs $(bindir) $(man1dir)
71    
72     uninstall:
73     rm -f $(bindir)/$(APP)
74     rm -f $(man1dir)/$(APP).1
75    
76     clean:
77     rm -f $(APP) $(OBJ_DIR)/* core* *.core *~ *.bak
78    
79     distclean: clean
80     rm -rf $(OBJ_DIR)
81     rm -f Makefile
82     rm -f config.cache config.log config.status config.h
83    
84     depend dep:
85     makedepend $(CPPFLAGS) -Y. $(SRCS) 2>/dev/null
86    
87     $(OBJ_DIR)/%.o : %.c
88     $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $< -o $@
89     $(OBJ_DIR)/%.o : %.cpp
90     $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@
91     $(OBJ_DIR)/%.o : %.S
92     $(CPP) $(CPPFLAGS) -D__ASSEMBLY__ $< -o $*.s
93     $(AS) $(ASFLAGS) -o $@ $*.s
94     rm $*.s
95    
96     #-------------------------------------------------------------------------
97     # DO NOT DELETE THIS LINE -- make depend depends on it.