COPYING: add GPLv3
[pd-aubio.git] / Makefile.am
1 ## Process this file with automake to produce Makefile.in. -*-Makefile-*-
2 # inspired from Guenter Geiger's Makefile.am for plugin 
3 # pure-data/externals/plugin~/Makefile.am -- rev 1.1
4
5 pddir = $(prefix)/lib/pd
6
7 ## Make and install the shared library.
8 pdinstalldir = $(pddir)/extra
9 pdinstallrefdir = $(pddir)/doc/5.reference
10 pdinstallexpdir = $(pddir)/doc/aubio
11
12 if MINGW
13 PDEXT = aubio.dll
14 else
15 if DARWIN
16 PDEXT = aubio.pd_darwin
17 else
18 PDEXT = aubio.pd_linux
19 endif
20 endif
21
22 pdinstall_PROGRAMS = $(PDEXT)
23
24 ALLSOURCES = \
25         aubio_setup.c \
26         aubioonset~.c \
27         aubiotempo~.c \
28         aubiotss~.c \
29         aubioquiet~.c \
30         aubiopitch~.c \
31         aubiozcr~.c
32
33 aubio_pd_linux_SOURCES = $(ALLSOURCES)
34 aubio_pd_darwin_SOURCES = $(ALLSOURCES)
35 aubio_dll_SOURCES = $(ALLSOURCES)
36
37 pdincludedir = $(pddir)/src
38
39 AM_CFLAGS  = -I$(top_srcdir)/src -I$(pdincludedir) -DPD @AUBIO_CFLAGS@
40 if MINGW
41 else
42 AM_CFLAGS += -fPIC -DPIC 
43 endif
44
45 AM_LDFLAGS  = -L$(top_builddir)/src @AUBIO_LIBS@ 
46 if MINGW
47 AM_LDFLAGS += -export_dynamic -shared -lpd
48 else
49 if DARWIN
50 AM_LDFLAGS += -bundle -undefined suppress -flat_namespace
51 else
52 AM_LDFLAGS += --export_dynamic --shared
53 endif
54 endif
55
56 ## Install the documentation.
57
58 pdinstallref_DATA = \
59         help/aubioonset~-help.pd \
60         help/aubioquiet~-help.pd \
61         help/aubiotempo~-help.pd \
62         help/aubiotss~-help.pd \
63         help/aubiopitch~-help.pd
64
65 pdinstallexp_DATA = \
66         examples/onset-cam.pd
67
68 EXTRA_DIST = $(pdinstallref_DATA) $(pdinstallexp_DATA)