aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2010-04-06 18:21:24 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2010-04-06 18:21:24 +0000
commite643122ec4c39da56aa8fa1a7c31faa2e94f9035 (patch)
tree5d8905420c83b6b94746f4efdf2ae2209c253e3e
parent5b830ab4cbbe6526d045c26638ef87521d39db25 (diff)
updated libdir style projects with latest version of Makefile template
svn path=/trunk/externals/motex/; revision=13377
-rw-r--r--LICENSE.txt (renamed from LICENSE)0
-rw-r--r--Makefile70
-rw-r--r--README.txt (renamed from README)0
-rw-r--r--motex-meta.pd2
4 files changed, 52 insertions, 20 deletions
diff --git a/LICENSE b/LICENSE.txt
index 085912e..085912e 100644
--- a/LICENSE
+++ b/LICENSE.txt
diff --git a/Makefile b/Makefile
index 4c2b1c2..5c6acfa 100644
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,10 @@
-# 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 = motex
-LIBRARY_VERSION = 1.1.4
-# 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 = getenv.c ln~.c pan~.c pansig~.c pol2rec~.c polygate~.c rec2pol~.c shuffle.c system.c
# For objects that only build on certain platforms, add those to the SOURCES
@@ -14,17 +13,25 @@ SOURCES_android =
SOURCES_cygwin =
SOURCES_macosx =
SOURCES_iphoneos =
-SOURCES_linux =
+SOURCES_linux =
SOURCES_windows =
# list all pd objects (i.e. myobject.pd) files here, and their helpfiles will
# be included automatically
PDOBJECTS =
+# 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 LICENSE
+# 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 =
+
#------------------------------------------------------------------------------#
@@ -33,6 +40,9 @@ EXTRA_DIST = README LICENSE
#
#------------------------------------------------------------------------------#
+# 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
@@ -119,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
@@ -131,7 +140,7 @@ endif
CFLAGS += $(OPT_CFLAGS)
-.PHONY = install libdir_install single_install install-doc install-exec install-examples clean dist etags
+.PHONY = install libdir_install single_install install-doc install-exec install-examples install-manual clean dist etags
all: $(SOURCES:.c=.$(EXTENSION))
@@ -152,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)
@@ -177,12 +186,22 @@ install-doc:
test -z "$(strip $(PDOBJECTS))" || \
$(INSTALL_FILE) $(PDOBJECTS:.pd=-help.pd) \
$(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)
- $(INSTALL_FILE) README $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/README.txt
+ $(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:
@@ -213,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)
@@ -224,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)"
-
diff --git a/README b/README.txt
index 1302ea6..1302ea6 100644
--- a/README
+++ b/README.txt
diff --git a/motex-meta.pd b/motex-meta.pd
index f5217d5..aa2b3da 100644
--- a/motex-meta.pd
+++ b/motex-meta.pd
@@ -4,5 +4,5 @@
#X text 10 30 NAME motex;
#X text 10 50 AUTHOR Iain Mott <iain.mott@bigpond.com>;
#X text 10 70 LICENSE GNU GPL;
-#X text 10 90 VERSION 1.1.3-cvs;
+#X text 10 90 VERSION 1.1.4;
#X restore 10 10 pd META;