15 |
|
|
16 |
|
DESTDIR = |
17 |
|
|
18 |
+ |
SDL_CFLAGS = @SDL_CFLAGS@ |
19 |
+ |
SDL_LIBS = @SDL_LIBS@ |
20 |
+ |
WANT_GTK = @WANT_GTK@ |
21 |
+ |
GTK_CFLAGS = @GTK_CFLAGS@ |
22 |
+ |
GTK_LIBS = @GTK_LIBS@ |
23 |
+ |
|
24 |
|
LN_S = @LN_S@ |
25 |
|
WINDRES = @WINDRES@ |
26 |
|
CC = @CC@ |
27 |
|
CXX = @CXX@ |
28 |
< |
CFLAGS = @CFLAGS@ |
29 |
< |
CXXFLAGS = @CXXFLAGS@ |
28 |
> |
CFLAGS = @CFLAGS@ $(SDL_CFLAGS) |
29 |
> |
CXXFLAGS = @CXXFLAGS@ $(SDL_CFLAGS) |
30 |
|
CPPFLAGS = @CPPFLAGS@ -I../include -I. @CPUINCLUDES@ |
31 |
|
DEFS = @DEFS@ @DEFINES@ |
32 |
|
LDFLAGS = @LDFLAGS@ |
51 |
|
SRCS = ../main.cpp main_windows.cpp ../prefs.cpp ../prefs_items.cpp prefs_windows.cpp \ |
52 |
|
sys_windows.cpp ../rom_patches.cpp ../slot_rom.cpp ../rsrc_patches.cpp \ |
53 |
|
../emul_op.cpp ../macos_util.cpp ../xpram.cpp xpram_windows.cpp ../timer.cpp \ |
54 |
< |
timer_windows.cpp ../adb.cpp ../serial.cpp ../dummy/serial_dummy.cpp \ |
54 |
> |
timer_windows.cpp ../adb.cpp ../serial.cpp serial_windows.cpp \ |
55 |
|
../ether.cpp ether_windows.cpp ../sony.cpp ../disk.cpp ../cdrom.cpp \ |
56 |
|
../scsi.cpp ../dummy/scsi_dummy.cpp ../video.cpp ../SDL/video_sdl.cpp \ |
57 |
|
video_blit.cpp ../audio.cpp ../SDL/audio_sdl.cpp clip_windows.cpp \ |
60 |
|
../dummy/prefs_editor_dummy.cpp BasiliskII.rc \ |
61 |
|
$(CDENABLESRCS) $(ROUTERSRCS) $(CPUSRCS) |
62 |
|
|
63 |
+ |
UI_SRCS = ../prefs.cpp prefs_windows.cpp prefs_editor_gtk.cpp xpram_windows.cpp \ |
64 |
+ |
../prefs_items.cpp ../user_strings.cpp user_strings_windows.cpp util_windows.cpp \ |
65 |
+ |
b2ether/Packet32.cpp BasiliskIIGUI.rc |
66 |
+ |
|
67 |
+ |
UI_APP = BasiliskIIGUI.exe |
68 |
+ |
|
69 |
|
APP = BasiliskII.exe |
70 |
|
|
71 |
+ |
PROGS = $(APP) |
72 |
+ |
|
73 |
+ |
ifeq ($(WANT_GTK),yes) |
74 |
+ |
PROGS += $(UI_APP) |
75 |
+ |
endif |
76 |
+ |
|
77 |
|
## Rules |
78 |
|
.PHONY: modules install installdirs uninstall mostlyclean clean distclean depend dep |
79 |
|
.SUFFIXES: |
80 |
|
.SUFFIXES: .c .cpp .s .o .h |
81 |
|
|
82 |
< |
all: $(APP) |
82 |
> |
all: $(PROGS) |
83 |
|
|
84 |
|
$(UNIXSRCS): %: ../Unix/% |
85 |
|
$(LN_S) $< $@ |
94 |
|
endef |
95 |
|
OBJS = $(SRCS_LIST_TO_OBJS) |
96 |
|
|
97 |
+ |
define UI_SRCS_LIST_TO_OBJS |
98 |
+ |
$(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(foreach file, $(UI_SRCS), \ |
99 |
+ |
$(basename $(notdir $(file)))))) |
100 |
+ |
endef |
101 |
+ |
UI_OBJS = $(UI_SRCS_LIST_TO_OBJS) |
102 |
+ |
|
103 |
|
SRC_PATHS += $(sort $(foreach file, $(SRCS), $(dir $(file)))) |
104 |
|
VPATH := |
105 |
|
VPATH += $(addprefix :, $(subst ,:, $(filter-out $($(subst, :, ,$(VPATH))), $(SRC_PATHS)))) |
106 |
|
|
107 |
|
$(APP): $(UNIXSRCS) $(OBJ_DIR) $(OBJS) |
108 |
< |
$(CXX) -o $(APP) $(LDFLAGS) $(OBJS) $(LIBS) |
108 |
> |
$(CXX) -o $@ $(LDFLAGS) $(OBJS) $(LIBS) $(SDL_LIBS) |
109 |
> |
|
110 |
> |
$(UI_APP): $(UNIXSRCS) $(OBJ_DIR) $(UI_OBJS) |
111 |
> |
$(CXX) -o $@ $(LDFLAGS) $(UI_OBJS) $(LIBS) $(GTK_LIBS) -mwindows -mno-cygwin |
112 |
|
|
113 |
|
mostlyclean: |
114 |
< |
rm -f $(APP)$(EXEEXT) $(OBJ_DIR)/* core* *.core *~ *.bak |
114 |
> |
rm -f $(APP) $(UI_APP) $(OBJ_DIR)/* core* *.core *~ *.bak |
115 |
|
|
116 |
|
clean: mostlyclean |
117 |
|
rm -f $(UNIXSRCS) |
121 |
|
rm -rf $(OBJ_DIR) |
122 |
|
rm -rf autom4te.cache |
123 |
|
rm -f Makefile |
124 |
< |
rm -f config.cache config.log config.status config.h config.h.in |
124 |
> |
rm -f config.cache config.log config.status config.h |
125 |
|
|
126 |
|
depend dep: |
127 |
|
makedepend $(CPPFLAGS) -Y. $(SRCS) 2>/dev/null |
136 |
|
$(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@ |
137 |
|
$(OBJ_DIR)/%.o : %.s |
138 |
|
$(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $< -o $@ |
139 |
+ |
$(OBJ_DIR)/prefs_editor_gtk.o: prefs_editor_gtk.cpp |
140 |
+ |
$(CXX) -O2 -mno-cygwin -mms-bitfields $(CPPFLAGS) $(DEFS) $(GTK_CFLAGS) -c $< -o $@ |
141 |
|
|
142 |
|
# Windows resources |
143 |
|
$(OBJ_DIR)/%.o: %.rc |