forked from mywave82/opencubicplayer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.in
161 lines (146 loc) · 6.4 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
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
SUBDIRS+=playsid playwav playxm playym stuff
.PHONY: all clean subdirs $(SUBDIRS)
include boot/Makefile-static
include cpiface/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
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 ocp.hlp libocp$(LIB_SUFFIX)
install:
mkdir -p "$(DESTDIR)$(DOCDIR)"
$(CP) AUTHORS BUGS COPYING CREDITS KEYBOARD_REMAPS SUID "$(DESTDIR)$(DOCDIR)"
mkdir -p "$(DESTDIR)$(DATADIR)/ocp$(DIR_SUFFIX)/data"
$(CP) ocp.hlp "$(DESTDIR)$(DATADIR)/ocp$(DIR_SUFFIX)/data"
mkdir -p "$(DESTDIR)$(DATADIR)/ocp$(DIR_SUFFIX)/etc"
$(CP) ocp.ini "$(DESTDIR)$(DATADIR)/ocp$(DIR_SUFFIX)/etc"
mkdir -p "$(DESTDIR)$(LIBDIR)"
$(CP) libocp$(LIB_SUFFIX) "$(DESTDIR)$(LIBDIR)"
mkdir -p "$(DESTDIR)$(LIBDIR)/autoload"
mkdir -p "$(DESTDIR)$(BINDIR)"
$(CP) ocp "$(DESTDIR)$(BINDIR)/ocp$(DIR_SUFFIX)"
if ! test -z $(DIR_SUFFIX); then ln -sf "ocp$(DIR_SUFFIX)" "$(DESTDIR)$(BINDIR)/ocp"; fi
ifeq ($(DIR_SUFFIX),)
$(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
endif
$(MAKE) -C doc DESTDIR="$(DESTDIR)" install TOPDIR="../$(TOPDIR)"
ifeq (1,$(firstword $(filter 1,$(HAVE_X11) $(HAVE_SDL) $(HAVE_SDL2))))
mkdir -p "$(DESTDIR)$(DATAROOTDIR)/applications"
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),)
$(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),)
$(UPDATE_DESKTOP_DATABASE)
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)$(DATADIR)/ocp$(DIR_SUFFIX)" "$(DESTDIR)$(LIBDIR)" "$(DESTDIR)$(BINDIR)/ocp$(DIR_SUFFIX)" "$(DESTDIR)$(BINDIR)/ocp" "$(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 libocp$(LIB_SUFFIX)
subdirs: $(SUBDIRS)
$(SUBDIRS):
$(MAKE) -C $@ TOPDIR=../$(TOPDIR)
ocp: boot
$(CC) $(LDFLAGS) -o $@ boot/kickload.o @DL_LIBS@ @EFENCE_LIBS@ @DUMA_LIBS@
ifeq ($(HAIKU),1)
rc -o ocp.rsrc ocp.rdef
xres -o $@ 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
libocp$(LIB_SUFFIX): subdirs
$(CC) $(SHARED_FLAGS) $(LDFLAGS) -o $@ $(libocp_start_so) $(libocp_so) $(libocp_end_so) $(STATIC_LIBS)