ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/SheepShaver/src/Unix/Makefile.in
Revision: 1.9
Committed: 2004-01-18T22:12:24Z (20 years, 10 months ago) by gbeauche
Branch: MAIN
Changes since 1.8: +4 -3 lines
Log Message:
Handle dummy files. Merge in configure stuff for Mach exception filters.
Check whether struct sigaction defines sa_restorer member. Don't include
posix_sem.cpp on native Linux/ppc builds.

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 gbeauche 1.7 CPUSRCS = @CPUSRCS@
24     DYNGENSRCS = @DYNGENSRCS@
25     DYNGEN_OP_FLAGS = @DYNGEN_OP_FLAGS@
26 gbeauche 1.9 BLESS = @BLESS@
27 cebix 1.1 INSTALL = @INSTALL@
28     INSTALL_PROGRAM = @INSTALL_PROGRAM@ -s
29     INSTALL_DATA = @INSTALL_DATA@
30    
31     ## Files
32     SRCS = main_unix.cpp ../prefs.cpp ../prefs_items.cpp prefs_unix.cpp sys_unix.cpp \
33     ../rom_patches.cpp ../rsrc_patches.cpp ../emul_op.cpp ../name_registry.cpp \
34     ../macos_util.cpp ../timer.cpp timer_unix.cpp ../xpram.cpp xpram_unix.cpp \
35     ../adb.cpp clip_unix.cpp ../sony.cpp ../disk.cpp ../cdrom.cpp ../scsi.cpp \
36 gbeauche 1.9 ../video.cpp video_blit.cpp video_x.cpp ../audio.cpp ../ether.cpp ../thunks.cpp \
37     ../serial.cpp ../extfs.cpp extfs_unix.cpp \
38 gbeauche 1.2 about_window_unix.cpp ../user_strings.cpp user_strings_unix.cpp \
39 gbeauche 1.3 vm_alloc.cpp sigsegv.cpp \
40 gbeauche 1.7 sshpty.c strlcpy.c $(SYSSRCS) $(CPUSRCS)
41 cebix 1.1 APP = SheepShaver
42    
43     ## Rules
44     .PHONY: modules install uninstall clean distclean depend dep
45     .SUFFIXES:
46     .SUFFIXES: .c .cpp .S .o .h
47    
48     all: $(APP)
49    
50     OBJ_DIR = obj
51     $(OBJ_DIR)::
52     @[ -d $(OBJ_DIR) ] || mkdir $(OBJ_DIR) > /dev/null 2>&1
53    
54     define SRCS_LIST_TO_OBJS
55     $(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(foreach file, $(SRCS), \
56     $(basename $(notdir $(file))))))
57     endef
58     OBJS = $(SRCS_LIST_TO_OBJS)
59    
60 gbeauche 1.7 define DYNGENSRCS_LIST_TO_OBJS
61     $(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(foreach file, $(DYNGENSRCS), \
62     $(basename $(notdir $(file))))))
63     endef
64     DYNGENOBJS = $(DYNGENSRCS_LIST_TO_OBJS)
65    
66 cebix 1.1 SRC_PATHS += $(sort $(foreach file, $(SRCS), $(dir $(file))))
67     VPATH :=
68     VPATH += $(addprefix :, $(subst ,:, $(filter-out $($(subst, :, ,$(VPATH))), $(SRC_PATHS))))
69    
70     $(APP): $(OBJ_DIR) $(OBJS)
71     $(CXX) -o $(APP) $(LDFLAGS) $(OBJS) $(LIBS)
72 gbeauche 1.9 $(BLESS) $(APP)
73 cebix 1.1
74     modules:
75     cd NetDriver; make
76    
77     install: $(APP) installdirs
78     $(INSTALL_PROGRAM) $(APP) $(bindir)/$(APP)
79     -$(INSTALL_DATA) $(APP).1 $(man1dir)/$(APP).1
80    
81     installdirs:
82     $(SHELL) mkinstalldirs $(bindir) $(man1dir)
83    
84     uninstall:
85     rm -f $(bindir)/$(APP)
86     rm -f $(man1dir)/$(APP).1
87    
88     clean:
89 gbeauche 1.5 rm -f $(APP) $(OBJ_DIR)/* core* *.core *~ *.bak ppc-execute-impl.cpp
90 gbeauche 1.7 rm -f dyngen basic-dyngen-ops.hpp ppc-dyngen-ops.hpp
91 cebix 1.1
92     distclean: clean
93     rm -rf $(OBJ_DIR)
94     rm -f Makefile
95     rm -f config.cache config.log config.status config.h
96    
97     depend dep:
98     makedepend $(CPPFLAGS) -Y. $(SRCS) 2>/dev/null
99    
100     $(OBJ_DIR)/%.o : %.c
101     $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $< -o $@
102     $(OBJ_DIR)/%.o : %.cpp
103     $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@
104     $(OBJ_DIR)/%.o : %.S
105     $(CPP) $(CPPFLAGS) -D__ASSEMBLY__ $< -o $*.s
106     $(AS) $(ASFLAGS) -o $@ $*.s
107     rm $*.s
108 gbeauche 1.5
109     # Kheperix CPU emulator
110     GENEXEC = ../kpx_cpu/src/cpu/ppc/genexec.pl
111    
112 gbeauche 1.6 $(OBJ_DIR)/ppc-execute.o: ppc-execute-impl.cpp
113 gbeauche 1.5 ppc-execute-impl.cpp: ../kpx_cpu/src/cpu/ppc/ppc-decode.cpp $(GENEXEC)
114 gbeauche 1.6 $(CPP) $(CPPFLAGS) -DGENEXEC $< | $(GENEXEC) > $@
115 gbeauche 1.7
116     dyngen: $(DYNGENOBJS)
117     $(CXX) -o $@ $(LDFLAGS) $(DYNGENOBJS)
118    
119     $(OBJ_DIR)/basic-dyngen.o: basic-dyngen-ops.hpp
120     $(OBJ_DIR)/basic-dyngen-ops.o: ../kpx_cpu/src/cpu/jit/basic-dyngen-ops.cpp
121     $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) $(DYNGEN_OP_FLAGS) -c $< -o $@
122     basic-dyngen-ops.hpp: $(OBJ_DIR)/basic-dyngen-ops.o dyngen
123     ./dyngen -o $@ $<
124    
125     $(OBJ_DIR)/ppc-dyngen.o: ppc-dyngen-ops.hpp
126     $(OBJ_DIR)/ppc-dyngen-ops.o: ../kpx_cpu/src/cpu/ppc/ppc-dyngen-ops.cpp
127     $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) $(DYNGEN_OP_FLAGS) -c $< -o $@
128     ppc-dyngen-ops.hpp: $(OBJ_DIR)/ppc-dyngen-ops.o dyngen
129     ./dyngen -o $@ $<
130 cebix 1.1
131     #-------------------------------------------------------------------------
132     # DO NOT DELETE THIS LINE -- make depend depends on it.