-
Notifications
You must be signed in to change notification settings - Fork 19
/
Makefile.in
169 lines (155 loc) · 6.54 KB
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
TOPDIR=./
include $(TOPDIR)Rules.make
SUBDIRS=boot cpiface dev doc devp devw filesel goodies help medialib playay playcda playflac playgmd playtimidity playhvl playit playogg playopl plugins
ifeq ($(HAVE_MAD),1)
SUBDIRS+=playmp2
endif
ifeq ($(HAVE_LIBGME),1)
SUBDIRS+=playgme
endif
SUBDIRS+=playsid playwav playxm playym stuff
SUBDIRS+=mingw
.PHONY: all clean subdirs $(SUBDIRS)
include boot/Makefile-static
include cpiface/Makefile-static
include devp/Makefile-static
include filesel/Makefile-static
include filesel/cdfs/Makefile-static
include stuff/Makefile-static
include dev/Makefile-static
include help/Makefile-static
include medialib/Makefile-static
include mingw/Makefile-static
libocp_start_so=$(LIBOCP_START_OBJECTS)
libocp_so:=$(LIBOCP_OBJECTS)
ifeq ($(STATIC_BUILD),1)
libocp_so+=$(STATIC_OBJECTS)
endif
libocp_end_so=$(LIBOCP_END_OBJECTS)
all: subdirs ocp$(EXE_SUFFIX) ocp.hlp libocp$(LIB_SUFFIX)
install:
mkdir -p "$(DESTDIR)$(DOCDIR)"
$(CP) AUTHORS BUGS COPYING CREDITS KEYBOARD_REMAPS "$(DESTDIR)$(DOCDIR)"
mkdir -p "$(DESTDIR)$(DATADIROCP)/data"
$(CP) ocp.hlp "$(DESTDIR)$(DATADIROCP)/data"
mkdir -p "$(DESTDIR)$(DATADIROCP)/etc"
$(CP) ocp.ini "$(DESTDIR)$(DATADIROCP)/etc"
mkdir -p "$(DESTDIR)$(LIBDIROCP)"
$(CP) libocp$(LIB_SUFFIX) "$(DESTDIR)$(LIBDIROCP)"
mkdir -p "$(DESTDIR)$(LIBDIROCP)/autoload"
mkdir -p "$(DESTDIR)$(BINDIR)"
$(CP) ocp$(EXE_SUFFIX) "$(DESTDIR)$(BINDIR)/ocp$(EXE_SUFFIX)"
ifneq ($(WINDOWS),1)
$(CP) SUID "$(DESTDIR)$(DOCDIR)"
$(CP) ocp-curses "$(DESTDIR)$(BINDIR)/ocp-curses"
ifeq ($(LINUX),1)
$(CP) ocp-vcsa "$(DESTDIR)$(BINDIR)/ocp-vcsa"
endif
ifeq ($(HAVE_SDL),1)
$(CP) ocp-sdl "$(DESTDIR)$(BINDIR)/ocp-sdl"
endif
ifeq ($(HAVE_SDL2),1)
$(CP) ocp-sdl2 "$(DESTDIR)$(BINDIR)/ocp-sdl2"
endif
ifeq ($(HAVE_X11),1)
$(CP) ocp-x11 "$(DESTDIR)$(BINDIR)/ocp-x11"
endif
$(MAKE) -C doc DESTDIR="$(DESTDIR)" install TOPDIR="../$(TOPDIR)"
ifeq (1,$(firstword $(filter 1,$(HAVE_X11) $(HAVE_SDL) $(HAVE_SDL2))))
mkdir -p "$(DESTDIR)$(DATAROOTDIR)/icons/hicolor/16x16/apps/"
mkdir -p "$(DESTDIR)$(DATAROOTDIR)/icons/hicolor/22x22/apps/"
mkdir -p "$(DESTDIR)$(DATAROOTDIR)/icons/hicolor/24x24/apps/"
mkdir -p "$(DESTDIR)$(DATAROOTDIR)/icons/hicolor/32x32/apps/"
mkdir -p "$(DESTDIR)$(DATAROOTDIR)/icons/hicolor/48x48/apps/"
mkdir -p "$(DESTDIR)$(DATAROOTDIR)/icons/hicolor/64x64/apps/"
mkdir -p "$(DESTDIR)$(DATAROOTDIR)/icons/hicolor/128x128/apps/"
mkdir -p "$(DESTDIR)$(DATAROOTDIR)/icons/hicolor/scalable/apps/"
mkdir -p "$(DESTDIR)$(DATAROOTDIR)/mime/packages"
$(CP) desktop/opencubicplayer-16x16.png "$(DESTDIR)$(DATAROOTDIR)/icons/hicolor/16x16/apps/opencubicplayer.png"
$(CP) desktop/opencubicplayer-22x22.png "$(DESTDIR)$(DATAROOTDIR)/icons/hicolor/22x22/apps/opencubicplayer.png"
$(CP) desktop/opencubicplayer-24x24.png "$(DESTDIR)$(DATAROOTDIR)/icons/hicolor/24x24/apps/opencubicplayer.png"
$(CP) desktop/opencubicplayer-32x32.png "$(DESTDIR)$(DATAROOTDIR)/icons/hicolor/32x32/apps/opencubicplayer.png"
$(CP) desktop/opencubicplayer-48x48.png "$(DESTDIR)$(DATAROOTDIR)/icons/hicolor/48x48/apps/opencubicplayer.png"
$(CP) desktop/opencubicplayer-64x64.png "$(DESTDIR)$(DATAROOTDIR)/icons/hicolor/64x64/apps/opencubicplayer.png"
$(CP) desktop/opencubicplayer-128x128.png "$(DESTDIR)$(DATAROOTDIR)/icons/hicolor/128x128/apps/opencubicplayer.png"
$(CP) desktop/opencubicplayer.svg "$(DESTDIR)$(DATAROOTDIR)/icons/hicolor/scalable/apps/opencubicplayer.svg"
$(CP) desktop/opencubicplayer.xml "$(DESTDIR)$(DATAROOTDIR)/mime/packages/opencubicplayer.xml"
ifneq ($(UPDATE_MIME_DATABASE),)
mkdir -p "$(DESTDIR)$(DATAROOTDIR)/applications"
$(UPDATE_MIME_DATABASE) "$(DESTDIR)$(DATAROOTDIR)/mime"
endif
ifneq ($(DESKTOP_FILE_INSTALL),)
mkdir -p "$(DESTDIR)$(DATAROOTDIR)/applications"
$(DESKTOP_FILE_INSTALL) --vendor="cubic.org" --dir="$(DESTDIR)$(DATAROOTDIR)/applications" desktop/opencubicplayer.desktop
endif
ifneq ($(UPDATE_DESKTOP_DATABASE),)
mkdir -p "$(DESTDIR)$(DATAROOTDIR)/applications"
$(UPDATE_DESKTOP_DATABASE)
endif
endif
endif
for i in $(SUBDIRS) ; do \
$(MAKE) -C $$i TOPDIR=../$(TOPDIR) install || exit 1 ;\
done
uninstall:
for i in $(SUBDIRS) ; do \
$(MAKE) -C $$i TOPDIR=../$(TOPDIR) uninstall || exit 1 ;\
done
rm -Rf "$(DESTDIR)$(DOCDIR)" "$(DESTDIR)$(DATADIROCP)" "$(DESTDIR)$(LIBDIROCP)" "$(DESTDIR)$(BINDIR)/ocp$(EXE_SUFFIX)" "$(DESTDIR)$(BINDIR)/ocp-curses" "$(DESTDIR)$(BINDIR)/ocp-sdl" "$(DESTDIR)$(BINDIR)/ocp-sdl2" "$(DESTDIR)$(BINDIR)/ocp-vcsa" "$(DESTDIR)$(BINDIR)/ocp-x11"
rm -f "$(DESTDIR)$(DATAROOTDIR)/applications/opencubicplayer.desktop"
rm -f "$(DESTDIR)$(DATAROOTDIR)/applications/cubic.org-opencubicplayer.desktop"
rm -f "$(DESTDIR)$(DATAROOTDIR)/icons/hicolor/16x16/apps/opencubicplayer.png"
rm -f "$(DESTDIR)$(DATAROOTDIR)/icons/hicolor/22x22/apps/opencubicplayer.png"
rm -f "$(DESTDIR)$(DATAROOTDIR)/icons/hicolor/24x24/apps/opencubicplayer.png"
rm -f "$(DESTDIR)$(DATAROOTDIR)/icons/hicolor/32x32/apps/opencubicplayer.png"
rm -f "$(DESTDIR)$(DATAROOTDIR)/icons/hicolor/48x48/apps/opencubicplayer.png"
rm -f "$(DESTDIR)$(DATAROOTDIR)/icons/hicolor/64x64/apps/opencubicplayer.png"
rm -f "$(DESTDIR)$(DATAROOTDIR)/icons/hicolor/128x128/apps/opencubicplayer.png"
rm -f "$(DESTDIR)$(DATAROOTDIR)/icons/hicolor/scalable/apps/opencubicplayer.svg"
rm -f "$(DESTDIR)$(DATAROOTDIR)/mime/packages/opencubicplayer.xml"
ifneq ($(UPDATE_MIME_DATABASE),)
$(UPDATE_MIME_DATABASE) "$(DESTDIR)$(DATAROOTDIR)/mime" || true
endif
ifneq ($(UPDATE_DESKTOP_DATABASE),)
$(UPDATE_DESKTOP_DATABASE) || true
endif
clean:
for i in $(SUBDIRS) ; do \
$(MAKE) -C $$i TOPDIR=../$(TOPDIR) clean || exit 1 ;\
done
rm -f ocp$(EXE_SUFFIX) libocp$(LIB_SUFFIX)
subdirs: $(SUBDIRS)
$(SUBDIRS):
$(MAKE) -C $@ TOPDIR=../$(TOPDIR)
OCP_OBJECTS+=boot/kickload.o
ocp$(EXE_SUFFIX): boot
$(CC) $(LDFLAGS) -o $@ $(OCP_OBJECTS) @DL_LIBS@ @EFENCE_LIBS@ @DUMA_LIBS@
ifeq ($(HAIKU),1)
rc -o haiku/ocp.rsrc haiku/ocp.rdef
xres -o $@ haiku/ocp.rsrc
mimeset $@
endif
ocp.hlp: doc/opencp.dox goodies
goodies/helpc/ocphhc doc/opencp.dox $@
distclean: clean
rm -Rf \
autom4te.cache \
config.log \
config.status \
config.h \
playsid/sidplayfp-config/config.h \
Rules.make \
Makefile \
goodies/helpc/Makefile \
goodies/pack/Makefile \
ocp.ini \
desktop/opencubicplayer.desktop \
doc/ocp.1 \
doc/opencp.dox \
doc/texi/faq.texi \
doc/texi/ocp.texi \
playsid/libsidplayfp-git/src/builders/resid-builder/resid/siddefs.h \
playsid/libsidplayfp-git/src/builders/residfp-builder/residfp/siddefs-fp.h \
mingw/ocp.rc
libocp$(LIB_SUFFIX): subdirs
$(CXX) $(SHARED_FLAGS) $(LDFLAGS) -o $@ $(libocp_start_so) $(libocp_so) $(libocp_end_so) $(STATIC_LIBS)