35 |
|
SLIRP_SRCS = @SLIRP_SRCS@ |
36 |
|
SLIRP_OBJS = $(SLIRP_SRCS:../slirp/%.c=obj/%.o) |
37 |
|
|
38 |
+ |
STANDALONE_GUI = @STANDALONE_GUI@ |
39 |
+ |
GUI_SRCS = ../prefs.cpp prefs_unix.cpp prefs_editor_gtk.cpp ../prefs_items.cpp \ |
40 |
+ |
../user_strings.cpp user_strings_unix.cpp xpram_unix.cpp sys_unix.cpp |
41 |
+ |
|
42 |
|
## Files |
43 |
|
SRCS = ../main.cpp main_unix.cpp ../prefs.cpp ../prefs_items.cpp prefs_unix.cpp \ |
44 |
|
sys_unix.cpp ../rom_patches.cpp ../slot_rom.cpp ../rsrc_patches.cpp \ |
51 |
|
APP = BasiliskII |
52 |
|
APP_APP = $(APP).app |
53 |
|
|
54 |
+ |
PROGS = $(APP)$(EXEEXT) |
55 |
+ |
ifeq ($(STANDALONE_GUI),yes) |
56 |
+ |
GUI_APP = BasiliskIIGUI |
57 |
+ |
PROGS += $(GUI_APP)$(EXEEXT) |
58 |
+ |
endif |
59 |
+ |
|
60 |
|
## Rules |
61 |
|
.PHONY: modules install installdirs uninstall mostlyclean clean distclean depend dep |
62 |
|
.SUFFIXES: |
63 |
|
.SUFFIXES: .c .cpp .s .o .h |
64 |
|
|
65 |
< |
all: $(APP)$(EXEEXT) |
65 |
> |
all: $(PROGS) |
66 |
|
|
67 |
|
OBJ_DIR = obj |
68 |
|
$(OBJ_DIR):: |
74 |
|
endef |
75 |
|
OBJS = $(SRCS_LIST_TO_OBJS) |
76 |
|
|
77 |
+ |
define GUI_SRCS_LIST_TO_OBJS |
78 |
+ |
$(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(foreach file, $(GUI_SRCS), \ |
79 |
+ |
$(basename $(notdir $(file)))))) |
80 |
+ |
endef |
81 |
+ |
GUI_OBJS = $(GUI_SRCS_LIST_TO_OBJS) |
82 |
+ |
|
83 |
|
SRC_PATHS += $(sort $(foreach file, $(SRCS), $(dir $(file)))) |
84 |
|
VPATH := |
85 |
|
VPATH += $(addprefix :, $(subst ,:, $(filter-out $($(subst, :, ,$(VPATH))), $(SRC_PATHS)))) |
86 |
|
|
87 |
|
$(APP)$(EXEEXT): $(OBJ_DIR) $(OBJS) |
88 |
< |
$(CXX) -o $(APP)$(EXEEXT) $(LDFLAGS) $(OBJS) $(LIBS) |
88 |
> |
$(CXX) -o $@ $(LDFLAGS) $(OBJS) $(LIBS) |
89 |
|
$(BLESS) $(APP)$(EXEEXT) |
90 |
|
|
91 |
+ |
$(GUI_APP)$(EXEEXT): $(OBJ_DIR) $(GUI_OBJS) |
92 |
+ |
$(CXX) -o $@ $(LDFLAGS) $(GUI_OBJS) $(LIBS) |
93 |
+ |
|
94 |
|
$(APP)_app: $(APP) ../MacOSX/Info.plist ../MacOSX/$(APP).icns |
95 |
|
mkdir -p $(APP_APP)/Contents |
96 |
|
cp -f ../MacOSX/Info.plist $(APP_APP)/Contents/ |
104 |
|
modules: |
105 |
|
cd Linux/NetDriver; make |
106 |
|
|
107 |
< |
install: $(APP)$(EXEEXT) installdirs |
107 |
> |
install: $(PROGS) installdirs |
108 |
|
$(INSTALL_PROGRAM) $(APP)$(EXEEXT) $(DESTDIR)$(bindir)/$(APP)$(EXEEXT) |
109 |
+ |
if test -f "$(GUI_APP)$(EXEEXT)"; then \ |
110 |
+ |
$(INSTALL_PROGRAM) $(GUI_APP)$(EXEEXT) $(DESTDIR)$(bindir)/$(GUI_APP)$(EXEEXT); \ |
111 |
+ |
fi |
112 |
|
-$(INSTALL_DATA) $(APP).1 $(DESTDIR)$(man1dir)/$(APP).1 |
113 |
|
$(INSTALL_DATA) $(KEYCODES) $(DESTDIR)$(datadir)/$(APP)/keycodes |
114 |
|
$(INSTALL_DATA) fbdevices $(DESTDIR)$(datadir)/$(APP)/fbdevices |
119 |
|
|
120 |
|
uninstall: |
121 |
|
rm -f $(DESTDIR)$(bindir)/$(APP)$(EXEEXT) |
122 |
+ |
rm -f $(DESTDIR)$(bindir)/$(GUI_APP)$(EXEEXT) |
123 |
|
rm -f $(DESTDIR)$(man1dir)/$(APP).1 |
124 |
|
rm -f $(DESTDIR)$(datadir)/$(APP)/keycodes |
125 |
|
rm -f $(DESTDIR)$(datadir)/$(APP)/fbdevices |
127 |
|
rmdir $(DESTDIR)$(datadir)/$(APP) |
128 |
|
|
129 |
|
mostlyclean: |
130 |
< |
rm -f $(APP)$(EXEEXT) $(OBJ_DIR)/* core* *.core *~ *.bak |
130 |
> |
rm -f $(PROGS) $(OBJ_DIR)/* core* *.core *~ *.bak |
131 |
|
|
132 |
|
clean: mostlyclean |
133 |
|
rm -f cpuemu.cpp cpudefs.cpp cputmp*.s cpufast*.s cpustbl.cpp cputbl.h compemu.cpp compstbl.cpp comptbl.h |