13 |
|
|
14 |
|
DESTDIR = |
15 |
|
|
16 |
+ |
SDL_CFLAGS = @SDL_CFLAGS@ |
17 |
+ |
SDL_LIBS = @SDL_LIBS@ |
18 |
+ |
WANT_GTK = @WANT_GTK@ |
19 |
+ |
GTK_CFLAGS = @GTK_CFLAGS@ |
20 |
+ |
GTK_LIBS = @GTK_LIBS@ |
21 |
+ |
|
22 |
|
LN_S = @LN_S@ |
23 |
|
WINDRES = @WINDRES@ |
24 |
|
CC = @CC@ |
25 |
|
CXX = @CXX@ |
26 |
< |
CFLAGS = @CFLAGS@ |
27 |
< |
CXXFLAGS = @CXXFLAGS@ |
26 |
> |
CFLAGS = @CFLAGS@ $(SDL_CFLAGS) |
27 |
> |
CXXFLAGS = @CXXFLAGS@ $(SDL_CFLAGS) |
28 |
|
CPPFLAGS = @CPPFLAGS@ -I../include -I. |
29 |
|
DEFS = @DEFS@ |
30 |
|
LDFLAGS = @LDFLAGS@ |
61 |
|
about_window_windows.cpp ../user_strings.cpp user_strings_windows.cpp \ |
62 |
|
../dummy/prefs_editor_dummy.cpp clip_windows.cpp util_windows.cpp kernel_windows.cpp \ |
63 |
|
vm_alloc.cpp sigsegv.cpp posix_emu.cpp SheepShaver.rc $(CPUSRCS) $(ROUTERSRCS) |
64 |
+ |
|
65 |
+ |
UI_SRCS = ../prefs.cpp prefs_windows.cpp prefs_editor_gtk.cpp xpram_windows.cpp \ |
66 |
+ |
../prefs_items.cpp ../user_strings.cpp user_strings_windows.cpp SheepShaverGUI.rc |
67 |
+ |
|
68 |
+ |
UI_APP = SheepShaverGUI.exe |
69 |
+ |
|
70 |
|
APP = SheepShaver.exe |
71 |
|
|
72 |
+ |
ifeq ($(WANT_GTK),yes) |
73 |
+ |
PROGS += $(UI_APP) |
74 |
+ |
endif |
75 |
+ |
|
76 |
|
## Rules |
77 |
|
.PHONY: clean distclean |
78 |
|
.SUFFIXES: |
79 |
|
.SUFFIXES: .c .cpp .S .o .h |
80 |
|
|
81 |
< |
all: $(APP) |
81 |
> |
all: $(PROGS) |
82 |
|
|
83 |
|
$(UNIXSRCS): %: ../Unix/% |
84 |
|
$(LN_S) $< $@ |
93 |
|
endef |
94 |
|
OBJS = $(SRCS_LIST_TO_OBJS) |
95 |
|
|
96 |
+ |
define UI_SRCS_LIST_TO_OBJS |
97 |
+ |
$(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(foreach file, $(UI_SRCS), \ |
98 |
+ |
$(basename $(notdir $(file)))))) |
99 |
+ |
endef |
100 |
+ |
UI_OBJS = $(UI_SRCS_LIST_TO_OBJS) |
101 |
+ |
|
102 |
|
define DYNGENSRCS_LIST_TO_OBJS |
103 |
|
$(addprefix $(OBJ_DIR)/, $(addsuffix .ho, $(foreach file, $(DYNGENSRCS), \ |
104 |
|
$(basename $(notdir $(file)))))) |
110 |
|
VPATH += $(addprefix :, $(subst ,:, $(filter-out $($(subst, :, ,$(VPATH))), $(SRC_PATHS)))) |
111 |
|
|
112 |
|
$(APP): $(UNIXSRCS) $(OBJ_DIR) $(OBJS) |
113 |
< |
$(CXX) -o $(APP) $(LDFLAGS) $(OBJS) $(LIBS) |
113 |
> |
$(CXX) -o $(APP) $(LDFLAGS) $(OBJS) $(LIBS) $(SDL_LIBS) |
114 |
> |
|
115 |
> |
$(UI_APP): $(UNIXSRCS) $(OBJ_DIR) $(UI_OBJS) |
116 |
> |
$(CXX) -o $@ $(LDFLAGS) $(UI_OBJS) $(LIBS) $(GTK_LIBS) -mwindows -mno-cygwin |
117 |
> |
|
118 |
> |
mostlyclean: |
119 |
> |
rm -f $(APP) $(UI_APP) $(OBJ_DIR)/* core* *.core *~ *.bak |
120 |
|
|
121 |
< |
clean: |
121 |
> |
clean: mostlyclean |
122 |
|
rm -f $(UNIXSRCS) |
123 |
< |
rm -f $(APP) $(OBJ_DIR)/* core* *.core *~ *.bak ppc-execute-impl.cpp |
96 |
< |
rm -f dyngen basic-dyngen-ops.hpp ppc-dyngen-ops.hpp |
123 |
> |
rm -f dyngen basic-dyngen-ops.hpp ppc-dyngen-ops.hpp ppc-execute-impl.cpp |
124 |
|
|
125 |
|
distclean: clean |
126 |
|
rm -rf $(OBJ_DIR) |
127 |
+ |
rm -rf autom4te.cache |
128 |
|
rm -f Makefile |
129 |
|
rm -f config.cache config.log config.status config.h |
130 |
|
|
145 |
|
$(CPP) $(CPPFLAGS) -D__ASSEMBLY__ $< -o $*.out.s |
146 |
|
$(AS) $(ASFLAGS) -o $@ $*.out.s |
147 |
|
rm $*.out.s |
148 |
+ |
$(OBJ_DIR)/prefs_editor_gtk.o: prefs_editor_gtk.cpp |
149 |
+ |
$(CXX) -O2 -mno-cygwin -mms-bitfields $(CPPFLAGS) $(DEFS) $(GTK_CFLAGS) -c $< -o $@ |
150 |
|
|
151 |
|
# Windows resources |
152 |
|
$(OBJ_DIR)/%.o: %.rc |