From 807489796062fa1a5675607bab307e57618924f9 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Tue, 24 Aug 2010 04:46:07 +0000 Subject: updated to Makefile version 1.0.2 svn path=/trunk/externals/mapping/; revision=13928 --- Makefile | 57 +++++++++++++++++++++++++++------------------------------ 1 file changed, 27 insertions(+), 30 deletions(-) diff --git a/Makefile b/Makefile index 3044d88..0084820 100644 --- a/Makefile +++ b/Makefile @@ -1,21 +1,12 @@ -## Pd library template version 1.0.1 +## Pd library template version 1.0.2 # For instructions on how to use this template, see: # http://puredata.info/docs/developer/MakefileTemplate LIBRARY_NAME = mapping -# add your .c source files to the SOURCES variable, help files will be -# included automatically +# add your .c source files, one object per file, 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 = -SOURCES_cygwin = -SOURCES_macosx = -SOURCES_iphoneos = -SOURCES_linux = -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 @@ -27,13 +18,23 @@ EXAMPLES = 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, example patches, +# list them here. This can be anything from header files, test patches, # documentation, etc. README.txt and LICENSE.txt are required and therefore # automatically included EXTRA_DIST = TODO +#------------------------------------------------------------------------------# +# +# things you might need to edit if you are using other C libraries +# +#------------------------------------------------------------------------------# + +CFLAGS = -DPD -I$(PD_PATH)/src -Wall -W -g +LDFLAGS = +LIBS = + #------------------------------------------------------------------------------# # # you shouldn't need to edit anything below here, if we did it right :) @@ -51,14 +52,10 @@ libdir = $(prefix)/lib pkglibdir = $(libdir)/pd-externals objectsdir = $(pkglibdir) - INSTALL = install INSTALL_FILE = $(INSTALL) -p -m 644 INSTALL_DIR = $(INSTALL) -p -m 755 -d -CFLAGS = -DPD -I$(PD_PATH)/src -Wall -W -g -LDFLAGS = -LIBS = ALLSOURCES := $(SOURCES) $(SOURCES_android) $(SOURCES_cygwin) $(SOURCES_macosx) \ $(SOURCES_iphoneos) $(SOURCES_linux) $(SOURCES_windows) @@ -110,6 +107,7 @@ ifeq ($(UNAME),Darwin) endif endif ifeq ($(UNAME),Linux) + CPU := $(shell uname -m) SOURCES += $(SOURCES_linux) EXTENSION = pd_linux OS = linux @@ -121,6 +119,7 @@ ifeq ($(UNAME),Linux) DISTBINDIR=$(DISTDIR)-$(OS)-$(shell uname -m) endif ifeq (CYGWIN,$(findstring CYGWIN,$(UNAME))) + CPU := $(shell uname -m) SOURCES += $(SOURCES_cygwin) EXTENSION = dll OS = cygwin @@ -132,6 +131,7 @@ ifeq (CYGWIN,$(findstring CYGWIN,$(UNAME))) DISTBINDIR=$(DISTDIR)-$(OS) endif ifeq (MINGW,$(findstring MINGW,$(UNAME))) + CPU := $(shell uname -m) SOURCES += $(SOURCES_windows) EXTENSION = dll OS = windows @@ -143,10 +143,13 @@ ifeq (MINGW,$(findstring MINGW,$(UNAME))) DISTBINDIR=$(DISTDIR)-$(OS) endif +# in case somebody manually set the HELPPATCHES above +HELPPATCHES ?= $(SOURCES:.c=-help.pd) $(PDOBJECTS:.c=-help.pd) + CFLAGS += $(OPT_CFLAGS) -.PHONY = install libdir_install single_install install-doc install-exec install-examples install-manual clean dist etags +.PHONY = install libdir_install single_install install-doc install-exec install-examples install-manual clean dist etags $(LIBRARY_NAME) all: $(SOURCES:.c=.$(EXTENSION)) @@ -162,7 +165,6 @@ $(LIBRARY_NAME): $(SOURCES:.c=.o) $(LIBRARY_NAME).o $(CC) $(LDFLAGS) -o $(LIBRARY_NAME).$(EXTENSION) $(SOURCES:.c=.o) $(LIBRARY_NAME).o $(LIBS) chmod a-x $(LIBRARY_NAME).$(EXTENSION) - install: libdir_install # The meta and help files are explicitly installed to make sure they are @@ -186,11 +188,8 @@ single_install: $(LIBRARY_NAME) install-doc install-exec install-doc: $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) - test -z "$(strip $(SOURCES))" || \ - $(INSTALL_FILE) $(SOURCES:.c=-help.pd) \ - $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) - test -z "$(strip $(PDOBJECTS))" || \ - $(INSTALL_FILE) $(PDOBJECTS:.pd=-help.pd) \ + test -z "$(strip $(SOURCES) $(PDOBJECTS))" || \ + $(INSTALL_FILE) $(HELPPATCHES) \ $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) $(INSTALL_FILE) README.txt $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/README.txt $(INSTALL_FILE) LICENSE.txt $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/LICENSE.txt @@ -211,7 +210,7 @@ install-manual: clean: - -rm -f -- $(SOURCES:.c=.o) + -rm -f -- $(SOURCES:.c=.o) $(SOURCES_LIB:.c=.o) -rm -f -- $(SOURCES:.c=.$(EXTENSION)) -rm -f -- $(LIBRARY_NAME).o -rm -f -- $(LIBRARY_NAME).$(EXTENSION) @@ -231,7 +230,7 @@ $(DISTBINDIR): libdir: all $(DISTBINDIR) $(INSTALL_FILE) $(LIBRARY_NAME)-meta.pd $(DISTBINDIR) $(INSTALL_FILE) $(SOURCES) $(DISTBINDIR) - $(INSTALL_FILE) $(SOURCES:.c=-help.pd) $(DISTBINDIR) + $(INSTALL_FILE) $(HELPPATCHES) $(DISTBINDIR) test -z "$(strip $(EXTRA_DIST))" || \ $(INSTALL_FILE) $(EXTRA_DIST) $(DISTBINDIR) # tar --exclude-vcs -czpf $(DISTBINDIR).tar.gz $(DISTBINDIR) @@ -249,12 +248,10 @@ dist: $(DISTDIR) $(INSTALL_FILE) $(LIBRARY_NAME)-meta.pd $(DISTDIR) test -z "$(strip $(ALLSOURCES))" || \ $(INSTALL_FILE) $(ALLSOURCES) $(DISTDIR) - test -z "$(strip $(ALLSOURCES))" || \ - $(INSTALL_FILE) $(ALLSOURCES:.c=-help.pd) $(DISTDIR) test -z "$(strip $(PDOBJECTS))" || \ $(INSTALL_FILE) $(PDOBJECTS) $(DISTDIR) - test -z "$(strip $(PDOBJECTS))" || \ - $(INSTALL_FILE) $(PDOBJECTS:.pd=-help.pd) $(DISTDIR) + test -z "$(strip $(HELPPATCHES))" || \ + $(INSTALL_FILE) $(HELPPATCHES) $(DISTDIR) test -z "$(strip $(EXTRA_DIST))" || \ $(INSTALL_FILE) $(EXTRA_DIST) $(DISTDIR) test -z "$(strip $(EXAMPLES))" || \ -- cgit v1.2.1