ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/SheepShaver/src/Unix/Makefile.in
Revision: 1.10
Committed: 2004-02-16T16:30:22Z (20 years, 8 months ago) by gbeauche
Branch: MAIN
Changes since 1.9: +3 -2 lines
Log Message:
Add --with-dgcc=COMPILER to use C++ COMPILER (gcc) suitable to compile
synthetic opcodes. Auto-detect ICC and force use of gcc for DYNGEN_CC.

File Contents

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