ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/SheepShaver/src/Unix/Makefile.in
Revision: 1.1
Committed: 2002-02-04T16:58:13Z (22 years, 9 months ago) by cebix
Branch: MAIN
Branch point for: cebix
Log Message:
Initial revision

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     about_window_unix.cpp ../user_strings.cpp user_strings_unix.cpp $(SYSSRCS)
35     APP = SheepShaver
36    
37     ## Rules
38     .PHONY: modules install uninstall clean distclean depend dep
39     .SUFFIXES:
40     .SUFFIXES: .c .cpp .S .o .h
41    
42     all: $(APP)
43    
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     cd NetDriver; make
63    
64     install: $(APP) installdirs
65     $(INSTALL_PROGRAM) $(APP) $(bindir)/$(APP)
66     -$(INSTALL_DATA) $(APP).1 $(man1dir)/$(APP).1
67    
68     installdirs:
69     $(SHELL) mkinstalldirs $(bindir) $(man1dir)
70    
71     uninstall:
72     rm -f $(bindir)/$(APP)
73     rm -f $(man1dir)/$(APP).1
74    
75     clean:
76     rm -f $(APP) $(OBJ_DIR)/* core* *.core *~ *.bak
77    
78     distclean: clean
79     rm -rf $(OBJ_DIR)
80     rm -f Makefile
81     rm -f config.cache config.log config.status config.h
82    
83     depend dep:
84     makedepend $(CPPFLAGS) -Y. $(SRCS) 2>/dev/null
85    
86     $(OBJ_DIR)/%.o : %.c
87     $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $< -o $@
88     $(OBJ_DIR)/%.o : %.cpp
89     $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@
90     $(OBJ_DIR)/%.o : %.S
91     $(CPP) $(CPPFLAGS) -D__ASSEMBLY__ $< -o $*.s
92     $(AS) $(ASFLAGS) -o $@ $*.s
93     rm $*.s
94    
95     #-------------------------------------------------------------------------
96     # DO NOT DELETE THIS LINE -- make depend depends on it.