~ubuntu-branches/ubuntu/feisty/basilisk2/feisty

« back to all changes in this revision

Viewing changes to src/Unix/Makefile.in

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2006-06-01 01:11:16 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060601011116-xjhegbgyfsxag5fl
Tags: 0.9.20060529-1
* New upstream CVS snapshot.
* Update local cdbs snippet copyright-check.mk:
  + Broaden scan to also look for "(c)" by default.
  + Make egrep options configurable.
  + Ignore auto-tools files.
* Bump up standards-version to 3.7.2 (no changes needed).
* Let dh_strip do the stripping (not the make install target).

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
SLIRP_SRCS = @SLIRP_SRCS@
36
36
SLIRP_OBJS = $(SLIRP_SRCS:../slirp/%.c=obj/%.o)
37
37
 
 
38
STANDALONE_GUI = @STANDALONE_GUI@
 
39
GUI_CFLAGS = @GUI_CFLAGS@
 
40
GUI_LIBS = @GUI_LIBS@
 
41
GUI_SRCS = ../prefs.cpp prefs_unix.cpp prefs_editor_gtk.cpp ../prefs_items.cpp \
 
42
        ../user_strings.cpp user_strings_unix.cpp xpram_unix.cpp sys_unix.cpp rpc_unix.cpp
 
43
 
38
44
## Files
39
45
SRCS = ../main.cpp main_unix.cpp ../prefs.cpp ../prefs_items.cpp prefs_unix.cpp \
40
46
    sys_unix.cpp ../rom_patches.cpp ../slot_rom.cpp ../rsrc_patches.cpp \
42
48
    timer_unix.cpp ../adb.cpp ../serial.cpp ../ether.cpp \
43
49
    ../sony.cpp ../disk.cpp ../cdrom.cpp ../scsi.cpp ../video.cpp video_blit.cpp \
44
50
    vm_alloc.cpp sigsegv.cpp ../audio.cpp ../extfs.cpp \
45
 
        ../user_strings.cpp user_strings_unix.cpp sshpty.c strlcpy.c \
 
51
        ../user_strings.cpp user_strings_unix.cpp sshpty.c strlcpy.c rpc_unix.cpp \
46
52
    $(SYSSRCS) $(CPUSRCS) $(SLIRP_SRCS)
47
53
APP = BasiliskII
 
54
APP_APP = $(APP).app
 
55
 
 
56
PROGS = $(APP)$(EXEEXT)
 
57
ifeq ($(STANDALONE_GUI),yes)
 
58
GUI_APP = BasiliskIIGUI
 
59
GUI_APP_APP = $(GUI_APP).app
 
60
PROGS += $(GUI_APP)$(EXEEXT)
 
61
else
 
62
CXXFLAGS += $(GUI_CFLAGS)
 
63
LIBS += $(GUI_LIBS)
 
64
endif
48
65
 
49
66
## Rules
50
67
.PHONY: modules install installdirs uninstall mostlyclean clean distclean depend dep
51
68
.SUFFIXES:
52
69
.SUFFIXES: .c .cpp .s .o .h
53
70
 
54
 
all: $(APP)$(EXEEXT)
 
71
all: $(PROGS)
55
72
 
56
73
OBJ_DIR = obj
57
74
$(OBJ_DIR)::
63
80
endef
64
81
OBJS = $(SRCS_LIST_TO_OBJS)
65
82
 
 
83
define GUI_SRCS_LIST_TO_OBJS
 
84
        $(addprefix $(OBJ_DIR)/, $(addsuffix .go, $(foreach file, $(GUI_SRCS), \
 
85
        $(basename $(notdir $(file))))))
 
86
endef
 
87
GUI_OBJS = $(GUI_SRCS_LIST_TO_OBJS)
 
88
 
66
89
SRC_PATHS += $(sort $(foreach file, $(SRCS), $(dir $(file))))
67
90
VPATH :=
68
91
VPATH += $(addprefix :, $(subst  ,:, $(filter-out $($(subst, :, ,$(VPATH))), $(SRC_PATHS))))
69
92
 
70
93
$(APP)$(EXEEXT): $(OBJ_DIR) $(OBJS)
71
 
        $(CXX) -o $(APP)$(EXEEXT) $(LDFLAGS) $(OBJS) $(LIBS)
 
94
        $(CXX) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
72
95
        $(BLESS) $(APP)$(EXEEXT)
73
96
 
 
97
$(GUI_APP)$(EXEEXT): $(OBJ_DIR) $(GUI_OBJS)
 
98
        $(CXX) -o $@ $(LDFLAGS) $(GUI_OBJS) $(GUI_LIBS)
 
99
 
 
100
$(APP)_app: $(APP) ../MacOSX/Info.plist ../MacOSX/$(APP).icns
 
101
        mkdir -p $(APP_APP)/Contents
 
102
        cp -f ../MacOSX/Info.plist $(APP_APP)/Contents/
 
103
        echo -n 'APPL????' > $(APP_APP)/Contents/PkgInfo
 
104
        mkdir -p $(APP_APP)/Contents/MacOS
 
105
        cp -f $(APP) $(APP_APP)/Contents/MacOS/
 
106
        strip $(APP_APP)/Contents/MacOS/$(APP)
 
107
        mkdir -p $(APP_APP)/Contents/Resources
 
108
        cp -f ../MacOSX/$(APP).icns $(APP_APP)/Contents/Resources/
 
109
 
 
110
$(GUI_APP)_app: $(GUI_APP) ../MacOSX/Info.plist ../MacOSX/$(APP).icns
 
111
        mkdir -p $(GUI_APP_APP)/Contents
 
112
        sed -e "s/$(APP)/$(GUI_APP)/" < ../MacOSX/Info.plist > $(GUI_APP_APP)/Contents/Info.plist
 
113
        echo -n 'APPL????' > $(GUI_APP_APP)/Contents/PkgInfo
 
114
        mkdir -p $(GUI_APP_APP)/Contents/MacOS
 
115
        cp -f $(GUI_APP) $(GUI_APP_APP)/Contents/MacOS/
 
116
        strip $(GUI_APP_APP)/Contents/MacOS/$(GUI_APP)
 
117
        mkdir -p $(GUI_APP_APP)/Contents/Resources
 
118
        cp -f ../MacOSX/$(APP).icns $(GUI_APP_APP)/Contents/Resources/$(GUI_APP).icns
 
119
 
74
120
modules:
75
121
        cd Linux/NetDriver; make
76
122
 
77
 
install: $(APP)$(EXEEXT) installdirs
 
123
install: $(PROGS) installdirs
78
124
        $(INSTALL_PROGRAM) $(APP)$(EXEEXT) $(DESTDIR)$(bindir)/$(APP)$(EXEEXT)
 
125
        if test -f "$(GUI_APP)$(EXEEXT)"; then \
 
126
          $(INSTALL_PROGRAM) $(GUI_APP)$(EXEEXT) $(DESTDIR)$(bindir)/$(GUI_APP)$(EXEEXT); \
 
127
        fi
79
128
        -$(INSTALL_DATA) $(APP).1 $(DESTDIR)$(man1dir)/$(APP).1
80
129
        $(INSTALL_DATA) $(KEYCODES) $(DESTDIR)$(datadir)/$(APP)/keycodes
81
130
        $(INSTALL_DATA) fbdevices $(DESTDIR)$(datadir)/$(APP)/fbdevices
86
135
 
87
136
uninstall:
88
137
        rm -f $(DESTDIR)$(bindir)/$(APP)$(EXEEXT)
 
138
        rm -f $(DESTDIR)$(bindir)/$(GUI_APP)$(EXEEXT)
89
139
        rm -f $(DESTDIR)$(man1dir)/$(APP).1
90
140
        rm -f $(DESTDIR)$(datadir)/$(APP)/keycodes
91
141
        rm -f $(DESTDIR)$(datadir)/$(APP)/fbdevices
93
143
        rmdir $(DESTDIR)$(datadir)/$(APP)
94
144
 
95
145
mostlyclean:
96
 
        rm -f $(APP)$(EXEEXT) $(OBJ_DIR)/* core* *.core *~ *.bak
 
146
        rm -f $(PROGS) $(OBJ_DIR)/* core* *.core *~ *.bak
97
147
 
98
148
clean: mostlyclean
99
149
        rm -f cpuemu.cpp cpudefs.cpp cputmp*.s cpufast*.s cpustbl.cpp cputbl.h compemu.cpp compstbl.cpp comptbl.h
118
168
        $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@
119
169
$(OBJ_DIR)/%.o : %.s
120
170
        $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $< -o $@
 
171
$(OBJ_DIR)/%.go : %.cpp
 
172
        $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) $(GUI_CFLAGS) -DSTANDALONE_GUI -c $< -o $@
121
173
 
122
174
# Windows resources
123
175
$(OBJ_DIR)/%.o: %.rc