aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2010-08-07 18:53:21 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2010-08-07 18:53:21 +0000
commita6ce01be3c04fee2af699c6149a1b683f515f7ba (patch)
tree1d64f845795f9d5d4cb4cba08e9453ee2f0fd0f9
parent11021db5316f4e75fb210cbc8d3b6f8e315c9a65 (diff)
added target to generate Debian source package
svn path=/trunk/externals/motex/; revision=13768
-rw-r--r--Makefile28
1 files changed, 21 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index b1f0c02..b598c4e 100644
--- a/Makefile
+++ b/Makefile
@@ -18,10 +18,10 @@ SOURCES_windows =
# list all pd objects (i.e. myobject.pd) files here, and their helpfiles will
# be included automatically
-PDOBJECTS =
+PDOBJECTS = noisegate~.pd
# example patches and related files, in the 'examples' subfolder
-EXAMPLES =
+EXAMPLES = polvoc.pd
# manuals and related files, in the 'manual' subfolder
MANUAL =
@@ -62,6 +62,9 @@ LIBS =
ALLSOURCES := $(SOURCES) $(SOURCES_android) $(SOURCES_cygwin) $(SOURCES_macosx) \
$(SOURCES_iphoneos) $(SOURCES_linux) $(SOURCES_windows)
+DISTDIR=$(LIBRARY_NAME)-$(LIBRARY_VERSION)
+ORIGDIR=pd-$(LIBRARY_NAME)_$(LIBRARY_VERSION)
+
UNAME := $(shell uname -s)
ifeq ($(UNAME),Darwin)
CPU := $(shell uname -p)
@@ -81,7 +84,6 @@ ifeq ($(UNAME),Darwin)
LDFLAGS += -arch armv6 -bundle -undefined dynamic_lookup $(ISYSROOT)
LIBS += -lc
STRIP = strip -x
- DISTDIR=$(LIBRARY_NAME)-$(LIBRARY_VERSION)
DISTBINDIR=$(DISTDIR)-$(OS)
else # Mac OS X
SOURCES += $(SOURCES_macosx)
@@ -102,7 +104,6 @@ ifeq ($(UNAME),Darwin)
LDFLAGS += $(shell test -e $(PD_PATH)/bin/pd && echo -bundle_loader $(PD_PATH)/bin/pd)
LIBS += -lc
STRIP = strip -x
- DISTDIR=$(LIBRARY_NAME)-$(LIBRARY_VERSION)
DISTBINDIR=$(DISTDIR)-$(OS)
# install into ~/Library/Pd on Mac OS X since /usr/local isn't used much
pkglibdir=$(HOME)/Library/Pd
@@ -117,7 +118,6 @@ ifeq ($(UNAME),Linux)
LDFLAGS += -Wl,--export-dynamic -shared -fPIC
LIBS += -lc
STRIP = strip --strip-unneeded -R .note -R .comment
- DISTDIR=$(LIBRARY_NAME)-$(LIBRARY_VERSION)
DISTBINDIR=$(DISTDIR)-$(OS)-$(shell uname -m)
endif
ifeq (CYGWIN,$(findstring CYGWIN,$(UNAME)))
@@ -129,7 +129,6 @@ ifeq (CYGWIN,$(findstring CYGWIN,$(UNAME)))
LDFLAGS += -Wl,--export-dynamic -shared -L$(PD_PATH)/src
LIBS += -lc -lpd
STRIP = strip --strip-unneeded -R .note -R .comment
- DISTDIR=$(LIBRARY_NAME)-$(LIBRARY_VERSION)
DISTBINDIR=$(DISTDIR)-$(OS)
endif
ifeq (MINGW,$(findstring MINGW,$(UNAME)))
@@ -141,7 +140,6 @@ ifeq (MINGW,$(findstring MINGW,$(UNAME)))
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
- DISTDIR=$(LIBRARY_NAME)-$(LIBRARY_VERSION)
DISTBINDIR=$(DISTDIR)-$(OS)
endif
@@ -223,6 +221,8 @@ distclean: clean
-rm -rf -- $(DISTBINDIR)
-rm -f -- $(DISTDIR).tar.gz
-rm -rf -- $(DISTDIR)
+ -rm -f -- $(ORIGDIR).tar.gz
+ -rm -rf -- $(ORIGDIR)
$(DISTBINDIR):
@@ -239,6 +239,9 @@ libdir: all $(DISTBINDIR)
$(DISTDIR):
$(INSTALL_DIR) $(DISTDIR)
+$(ORIGDIR):
+ $(INSTALL_DIR) $(ORIGDIR)
+
dist: $(DISTDIR)
$(INSTALL_FILE) Makefile $(DISTDIR)
$(INSTALL_FILE) README.txt $(DISTDIR)
@@ -266,6 +269,15 @@ dist: $(DISTDIR)
done
tar --exclude-vcs -czpf $(DISTDIR).tar.gz $(DISTDIR)
+# make a Debian source package
+dpkg-source:
+ debclean
+ make distclean dist
+ mv $(DISTDIR) $(ORIGDIR)
+ tar --exclude-vcs -czpf ../$(ORIGDIR).orig.tar.gz $(ORIGDIR)
+ rm -f -- $(DISTDIR).tar.gz
+ rm -rf -- $(DISTDIR) $(ORIGDIR)
+ cd .. && dpkg-source -b $(LIBRARY_NAME)
etags:
etags *.h $(SOURCES) ../../pd/src/*.[ch] /usr/include/*.h /usr/include/*/*.h
@@ -281,3 +293,5 @@ showsetup:
@echo "UNAME: $(UNAME)"
@echo "CPU: $(CPU)"
@echo "pkglibdir: $(pkglibdir)"
+ @echo "DISTDIR: $(DISTDIR)"
+ @echo "ORIGDIR: $(ORIGDIR)"