aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile69
1 files changed, 50 insertions, 19 deletions
diff --git a/Makefile b/Makefile
index 4c5d754..8c613f9 100644
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,12 @@
-# To use this Makefile for your project, first put the name of your library in
-# LIBRARY_NAME variable. The folder for your project should have the same name
-# as your library.
+## Pd library template version 1.0
+# For instructions on how to use this template, see:
+# http://puredata.info/docs/developer/MakefileTemplate
LIBRARY_NAME = mapping
-LIBRARY_VERSION = 0.2
-# Next, add your .c source files to the SOURCES variable. The help files will
-# be included automatically
+# add your .c source files to the SOURCES variable, help files will be
+# included automatically
SOURCES =
-
# For objects that only build on certain platforms, add those to the SOURCES
# line for the right platforms.
SOURCES_android =
@@ -20,12 +18,20 @@ SOURCES_windows =
# list all pd objects (i.e. myobject.pd) files here, and their helpfiles will
# be included automatically
-PDOBJECTS = amplitude_n.pd autoscale.pd breakpoint.pd breakpoint_smooth.pd buttongate.pd bytemask.pd cartesian2spherical.pd center_point.pd circular.pd circular_seat.pd circular_sigmoid.pd correlation.pd cubic_seat.pd curve_draw.pd curve_exp.pd curve_fade.pd curve_graph.pd curve_log.pd curve.pd debounce.pd debytemask.pd degrees2mapping.pd delay_n.pd desegment.pd diff_n.pd disjoin.pd distance2d.pd distance_n.pd distance.pd downsample.pd elliptic.pd elliptic_seat.pd elliptic_sigmoid.pd env-.pd env.pd env+.pd exponential_curve.pd exponential_seat.pd exponential_sigmoid.pd fir.pd gaussian.pd hysteresis.pd iir.pd join.pd keygate.pd last_n.pd listto.pd local_max.pd local_min.pd logistic_sigmoid.pd lop.pd mapping2degrees.pd mapping2midi.pd mapping2radians.pd max_n.pd mean_n.pd median_3.pd median_5.pd median_7.pd median_n.pd median.pd midi2mapping.pd min_n.pd multi_slider.pd nl.pd notescale.pd one2four.pd one2three.pd one2two.pd oscillo.pd pmattractor_2d.pd pmattractor_3d.pd pmcloud_1d.pd pmcloud_2d.pd pmcloud_3d.pd pmcube_3d.pd pmfilter_2d.pd pmfilter_3d.pd pmfilter.pd pmmulti_stable_2d.pd pmopen_string_1d.pd pmrepulsor_1d.pd pmrepulsor_2d.pd pmrepulsor_3d.pd pmrigid_open_string_2d.pd pmrigid_string_2d.pd pmsquare_2d.pd pmstring_1d.pd polar2cartesian.pd polar.pd quadratic.pd quartic.pd radians2mapping.pd rec_play.pd resample.pd reverse.pd rnd-stat.pd segment.pd sigmoide.pd simplified_cubic_seat.pd simplified_quadratic.pd sinusoid.pd smooth_double.pd smooth.pd smooth_triple.pd speedlimiter-.pd speedlimiter.pd speedlimiter+.pd spherical2cartesian.pd spiral.pd split_n.pd stepper.pd stream_check.pd test_n.pd threshold_max.pd threshold.pd timeroll.pd tolist.pd track_max.pd track_min.pd upsample.pd variance.pd vector.pd wave_loop.pd wave.pd
+PDOBJECTS = amplitude_n.pd autoscale.pd breakpoint.pd breakpoint_smooth.pd buttongate.pd bytemask.pd cartesian2spherical.pd center_point.pd circular.pd circular_seat.pd circular_sigmoid.pd correlation.pd cubic_seat.pd curve_draw.pd curve_exp.pd curve_fade.pd curve_graph.pd curve_log.pd curve.pd debounce.pd debytemask.pd degrees2mapping.pd delay_n.pd desegment.pd diff_n.pd disjoin.pd distance2d.pd distance_n.pd distance.pd downsample.pd elliptic.pd elliptic_seat.pd elliptic_sigmoid.pd env-.pd env.pd env+.pd exponential_curve.pd exponential_seat.pd exponential_sigmoid.pd fir.pd gaussian.pd hysteresis.pd iir.pd join.pd keygate.pd last_n.pd listto.pd local_max.pd local_min.pd logistic_sigmoid.pd lop.pd mapping2degrees.pd mapping2midi.pd mapping2radians.pd max_n.pd mean_n.pd median_3.pd median_5.pd median_7.pd median_n.pd median.pd midi2mapping.pd min_n.pd multi_slider.pd nl.pd notescale.pd one2four.pd one2three.pd one2two.pd oscillo.pd pmattractor_2d.pd pmattractor_3d.pd pmcloud_1d.pd pmcloud_2d.pd pmcloud_3d.pd pmcube_3d.pd pmfilter_2d.pd pmfilter_3d.pd pmfilter.pd pmmulti_stable_2d.pd pmopen_string_1d.pd pmrepulsor_1d.pd pmrepulsor_2d.pd pmrepulsor_3d.pd pmrigid_open_string_2d.pd pmrigid_string_2d.pd pmsquare_2d.pd pmstring_1d.pd polar2cartesian.pd polar.pd quadratic.pd quartic.pd radians2mapping.pd rec_play.pd resample.pd reverse.pd rnd-stat.pd segment.pd sigmoide.pd simplified_cubic_seat.pd simplified_quadratic.pd sinusoid.pd smooth_double.pd smooth.pd smooth_triple.pd speedlimiter-.pd speedlimiter.pd speedlimiter+.pd spherical2cartesian.pd spiral.pd split_n.pd stepper.pd stream_check.pd test_n.pd threshold_max.pd threshold.pd timeroll.pd tolist.pd track_max.pd track_min.pd upsample.pd variance.pd vector.pd wave_loop.pd wave.pd
+
+# example patches and related files, in the 'examples' subfolder
+EXAMPLES =
+
+# manuals and related files, in the 'manual' subfolder
+MANUAL =
# if you want to include any other files in the source and binary tarballs,
-# list them here. This can be anything from header files, READMEs, example
-# patches, documentation, etc.
-EXTRA_DIST = README.txt TODO
+# list them here. This can be anything from header files, example patches,
+# documentation, etc. README.txt and LICENSE.txt are required and therefore
+# automatically included
+EXTRA_DIST = TODO
+
#------------------------------------------------------------------------------#
@@ -34,6 +40,9 @@ EXTRA_DIST = README.txt TODO
#
#------------------------------------------------------------------------------#
+# get library version from meta file
+LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd)
+
# where Pd lives
PD_PATH = ../../pd
# where to install the library
@@ -120,8 +129,7 @@ ifeq (MINGW,$(findstring MINGW,$(UNAME)))
EXTENSION = dll
OS = windows
OPT_CFLAGS = -O3 -funroll-loops -fomit-frame-pointer -march=i686 -mtune=pentium4
- WINDOWS_HACKS = -D'O_NONBLOCK=1'
- CFLAGS += -mms-bitfields $(WINDOWS_HACKS)
+ CFLAGS += -mms-bitfields
LDFLAGS += -s -shared -Wl,--enable-auto-import
LIBS += -L$(PD_PATH)/src -L$(PD_PATH)/bin -L$(PD_PATH)/obj -lpd -lwsock32 -lkernel32 -luser32 -lgdi32
STRIP = strip --strip-unneeded -R .note -R .comment
@@ -132,7 +140,7 @@ endif
CFLAGS += $(OPT_CFLAGS)
-.PHONY = install libdir_install single_install install-doc install-exec clean dist etags
+.PHONY = install libdir_install single_install install-doc install-exec install-examples install-manual clean dist etags
all: $(SOURCES:.c=.$(EXTENSION))
@@ -153,7 +161,7 @@ install: libdir_install
# The meta and help files are explicitly installed to make sure they are
# actually there. Those files are not optional, then need to be there.
-libdir_install: $(SOURCES:.c=.$(EXTENSION)) install-doc install-examples
+libdir_install: $(SOURCES:.c=.$(EXTENSION)) install-doc install-examples install-manual
$(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)
$(INSTALL_FILE) $(LIBRARY_NAME)-meta.pd \
$(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)
@@ -179,11 +187,21 @@ install-doc:
$(INSTALL_FILE) $(PDOBJECTS:.pd=-help.pd) \
$(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)
$(INSTALL_FILE) README.txt $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/README.txt
+ $(INSTALL_FILE) LICENSE.txt $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/LICENSE.txt
install-examples:
- test ! -d examples || (\
+ test -z "$(strip $(EXAMPLES))" || \
$(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/examples && \
- $(INSTALL_FILE) examples/*.* $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/examples)
+ for file in $(EXAMPLES); do \
+ $(INSTALL_FILE) examples/$$file $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/examples; \
+ done
+
+install-manual:
+ test -z "$(strip $(MANUAL))" || \
+ $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/manual && \
+ for file in $(MANUAL); do \
+ $(INSTALL_FILE) manual/$$file $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/manual; \
+ done
clean:
@@ -214,6 +232,8 @@ $(DISTDIR):
dist: $(DISTDIR)
$(INSTALL_FILE) Makefile $(DISTDIR)
+ $(INSTALL_FILE) README.txt $(DISTDIR)
+ $(INSTALL_FILE) LICENSE.txt $(DISTDIR)
$(INSTALL_FILE) $(LIBRARY_NAME)-meta.pd $(DISTDIR)
test -z "$(strip $(ALLSOURCES))" || \
$(INSTALL_FILE) $(ALLSOURCES) $(DISTDIR)
@@ -225,18 +245,29 @@ dist: $(DISTDIR)
$(INSTALL_FILE) $(PDOBJECTS:.pd=-help.pd) $(DISTDIR)
test -z "$(strip $(EXTRA_DIST))" || \
$(INSTALL_FILE) $(EXTRA_DIST) $(DISTDIR)
+ test -z "$(strip $(EXAMPLES))" || \
+ $(INSTALL_DIR) $(DISTDIR)/examples && \
+ for file in $(EXAMPLES); do \
+ $(INSTALL_FILE) examples/$$file $(DISTDIR)/examples; \
+ done
+ test -z "$(strip $(MANUAL))" || \
+ $(INSTALL_DIR) $(DISTDIR)/manual && \
+ for file in $(MANUAL); do \
+ $(INSTALL_FILE) manual/$$file $(DISTDIR)/manual; \
+ done
tar --exclude-vcs -czpf $(DISTDIR).tar.gz $(DISTDIR)
etags:
etags *.h $(SOURCES) ../../pd/src/*.[ch] /usr/include/*.h /usr/include/*/*.h
-showpaths:
+showsetup:
@echo "PD_PATH: $(PD_PATH)"
@echo "objectsdir: $(objectsdir)"
@echo "LIBRARY_NAME: $(LIBRARY_NAME)"
+ @echo "LIBRARY_VERSION: $(LIBRARY_VERSION)"
@echo "SOURCES: $(SOURCES)"
+ @echo "PDOBJECTS: $(PDOBJECTS)"
@echo "ALLSOURCES: $(ALLSOURCES)"
@echo "UNAME: $(UNAME)"
@echo "CPU: $(CPU)"
-