forked from pure-data/pure-data
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
96 lines (76 loc) · 2.2 KB
/
Makefile.am
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
#########################################
##### Defaults & Paths #####
AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I m4/generated -I m4
CFLAGS += @DEFS@
EXTRA_SUBDIRS =
# pkg-config support
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = pd.pc
#########################################
##### Files, Binaries, & Libs #####
##### ASIO #####
if ASIO
EXTRA_SUBDIRS += asio
endif
##### PortAudio #####
if LOCAL_PORTAUDIO
EXTRA_SUBDIRS += portaudio
endif
##### PortMidi #####
if LOCAL_PORTMIDI
EXTRA_SUBDIRS += portmidi
endif
##### Localizations #####
# optionally build localizations
BUILT_SOURCES =
if MSGFMT
EXTRA_SUBDIRS += po
BUILT_SOURCES += locales
endif
# include libpd `here since the libpd subdirs contain their own custom Makefiles
LIBPD_DIST = libpd/Makefile libpd/README.txt libpd/test_libpd/Makefile \
libpd/test_libpd/test_libpd.c libpd/test_libpd/test_libpd.pd
# files that are included but not built
EXTRA_DIST = LICENSE.txt README.txt INSTALL.txt $(LIBPD_DIST)
pkgdata_DATA = \
LICENSE.txt \
README.txt \
$(empty)
# subdirs that are built,
# mac before src due to uninstall target order kludge (see mac/Makefile.am)
SUBDIRS = $(EXTRA_SUBDIRS) linux mac msw src man doc tcl extra font
# subdirs that are always included in the dist, etc.
DIST_SUBDIRS = asio doc extra font linux mac man msw po portmidi portaudio src tcl
#########################################
##### Targets #####
.PHONY: app
# optionally build localizations
if MSGFMT
locales:
${MAKE} -C po all
else
locales:
endif
if MACOSX
# forward target to mac/Makefile
app:
${MAKE} -C mac app
endif
if WINDOWS
# forward target to msw/Makefile
app:
${MAKE} -C msw app
endif
# startup location for GUI plugins and/or patches,
# leftover from Pd-extended & not currently used
install-data-local:
$(INSTALL) -d $(DESTDIR)$(pkglibdir)/startup
$(INSTALL) -d $(DESTDIR)$(pkglibdir)/startup/disabled
# remove the leftover $(libdir)/pd dir, fail silently on any non-empty dirs
# The "|| true" ensures that if the dir is *not* empty, then rmdir does not throw
# an error and stop make.
uninstall-hook:
if test -d $(DESTDIR)$(pkglibdir) ; then \
find $(DESTDIR)$(pkglibdir) -depth -type d | xargs rmdir 2>/dev/null || true ; \
fi