Debian Codegraph @

Makefile

raw symbols SCIP
1 ## Pd library template version 1.0.12
2 # For instructions on how to use this template, see:
3 # http://puredata.info/docs/developer/MakefileTemplate
4 LIBRARY_NAME = unauthorized
5
6 # add your .c source files, one object per file, to the SOURCES
7 # variable, help files will be included automatically, and for GUI
8 # objects, the matching .tcl file too
9 SOURCES = audience~.c beatify~.c blinkenlights.c compressor~.c cooled~.c countund.c disto~.c exciter.c filterbank~.c formant~.c grid.c mp3cast~.c mp3fileout~.c mp3streamin~.c mp3streamout~.c mp3write~.c pianoroll.c playlist.c probalizer.c randomblock~.c samplebox~.c scratcher~.c scrolllist.c sonogram~.c speexin~.c speexout~.c spigot~.c wahwah~.c
10
11 SOURCES_linux = mp3amp~.c
12 #SOURCES_macosx = mp3amp~.c
13
14 # list all pd objects (i.e. myobject.pd) files here, and their helpfiles will
15 # be included automatically
16 PDOBJECTS =
17
18 # example patches and related files, in the 'examples' subfolder
19 EXAMPLES = analyze-100.pd mrandtab.pd randtab.pd resynth-64.pd setosc.pd speaker.gif test-streaming-mp3.pd wanderer.gif xmms.pd yesterday.txt
20
21 # manuals and related files, in the 'manual' subfolder
22 MANUAL = disto~.txt
23
24 # if you want to include any other files in the source and binary tarballs,
25 # list them here. This can be anything from header files, test patches,
26 # documentation, etc. README.txt and LICENSE.txt are required and therefore
27 # automatically included
28 EXTRA_DIST = audience~.h exciter.h filterbank~.h interface.h g_grid.h mpg123.h mpglib.h pianoroll.h probalizer.h timeval.h
29
30 # unit tests and related files here, in the 'unittests' subfolder
31 UNITTESTS =
32
33
34
35 #------------------------------------------------------------------------------#
36 #
37 # things you might need to edit if you are using other C libraries
38 #
39 #------------------------------------------------------------------------------#
40
41 ALL_CFLAGS = -I"$(PD_INCLUDE)"
42 ALL_LDFLAGS =
43 SHARED_LDFLAGS =
44 ALL_LIBS = -lspeex -lmp3lame -lpthread
45
46
47 #------------------------------------------------------------------------------#
48 #
49 # you shouldn't need to edit anything below here, if we did it right :)
50 #
51 #------------------------------------------------------------------------------#
52
53 # these can be set from outside without (usually) breaking the build
54 CFLAGS = -Wall -W -g
55 LDFLAGS =
56 LIBS =
57
58 # get library version from meta file
59 LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd)
60
61 ALL_CFLAGS += -DPD -DVERSION='"$(LIBRARY_VERSION)"'
62
63 PD_INCLUDE = $(PD_PATH)/include/pd
64 # where to install the library, overridden below depending on platform
65 prefix = /usr/local
66 libdir = $(prefix)/lib
67 pkglibdir = $(libdir)/pd-externals
68 objectsdir = $(pkglibdir)
69
70 INSTALL = install
71 INSTALL_PROGRAM = $(INSTALL) -p -m 644
72 INSTALL_DATA = $(INSTALL) -p -m 644
73 INSTALL_DIR = $(INSTALL) -p -m 755 -d
74
75 ALLSOURCES := $(SOURCES) $(SOURCES_android) $(SOURCES_cygwin) $(SOURCES_macosx) \
76 $(SOURCES_iphoneos) $(SOURCES_linux) $(SOURCES_windows)
77
78 DISTDIR=$(LIBRARY_NAME)-$(LIBRARY_VERSION)
79 ORIGDIR=pd-$(LIBRARY_NAME:~=)_$(LIBRARY_VERSION)
80
81 UNAME := $(shell uname -s)
82 ifeq ($(UNAME),Darwin)
83 CPU := $(shell uname -p)
84 ifeq ($(CPU),arm) # iPhone/iPod Touch
85 SOURCES += $(SOURCES_iphoneos)
86 EXTENSION = pd_darwin
87 SHARED_EXTENSION = dylib
88 OS = iphoneos
89 PD_PATH = /Applications/Pd-extended.app/Contents/Resources
90 IPHONE_BASE=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin
91 CC=$(IPHONE_BASE)/gcc
92 CPP=$(IPHONE_BASE)/cpp
93 CXX=$(IPHONE_BASE)/g++
94 ISYSROOT = -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk
95 IPHONE_CFLAGS = -miphoneos-version-min=3.0 $(ISYSROOT) -arch armv6
96 OPT_CFLAGS = -fast -funroll-loops -fomit-frame-pointer
97 ALL_CFLAGS := $(IPHONE_CFLAGS) $(ALL_CFLAGS)
98 ALL_LDFLAGS += -arch armv6 -bundle -undefined dynamic_lookup $(ISYSROOT)
99 SHARED_LDFLAGS += -arch armv6 -dynamiclib -undefined dynamic_lookup $(ISYSROOT)
100 ALL_LIBS += -lc $(LIBS_iphoneos)
101 STRIP = strip -x
102 DISTBINDIR=$(DISTDIR)-$(OS)
103 else # Mac OS X
104 SOURCES += $(SOURCES_macosx)
105 EXTENSION = pd_darwin
106 SHARED_EXTENSION = dylib
107 OS = macosx
108 PD_PATH = /Applications/Pd-extended.app/Contents/Resources
109 OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast
110 # build universal 32-bit on 10.4 and 32/64 on newer
111 ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8)
112 FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=10.4
113 else
114 FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4
115 SOURCES += $(SOURCES_iphoneos)
116 endif
117 ALL_CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include
118 # if the 'pd' binary exists, check the linking against it to aid with stripping
119 BUNDLE_LOADER = $(shell test ! -e $(PD_PATH)/bin/pd || echo -bundle_loader $(PD_PATH)/bin/pd)
120 ALL_LDFLAGS += $(FAT_FLAGS) -bundle $(BUNDLE_LOADER) -undefined dynamic_lookup -L/sw/lib
121 SHARED_LDFLAGS += $(FAT_FLAGS) -dynamiclib -undefined dynamic_lookup \
122 -install_name @loader_path/$(SHARED_LIB) -compatibility_version 1 -current_version 1.0
123 ALL_LIBS += -lc $(LIBS_macosx)
124 STRIP = strip -x
125 DISTBINDIR=$(DISTDIR)-$(OS)
126 # install into ~/Library/Pd on Mac OS X since /usr/local isn't used much
127 pkglibdir=$(HOME)/Library/Pd
128 endif
129 endif
130 # Tho Android uses Linux, we use this fake uname to provide an easy way to
131 # setup all this things needed to cross-compile for Android using the NDK
132 ifeq ($(UNAME),ANDROID)
133 CPU := arm
134 SOURCES += $(SOURCES_android)
135 EXTENSION = pd_linux
136 SHARED_EXTENSION = so
137 OS = android
138 PD_PATH = /usr
139 NDK_BASE := /usr/local/android-ndk
140 NDK_PLATFORM_VERSION := 5
141 NDK_SYSROOT=$(NDK_BASE)/platforms/android-$(NDK_PLATFORM_VERSION)/arch-arm
142 NDK_UNAME := $(shell uname -s | tr '[A-Z]' '[a-z]')
143 NDK_TOOLCHAIN_BASE=$(NDK_BASE)/toolchains/arm-linux-androideabi-4.4.3/prebuilt/$(NDK_UNAME)-x86
144 CC := $(NDK_TOOLCHAIN_BASE)/bin/arm-linux-androideabi-gcc --sysroot=$(NDK_SYSROOT)
145 OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer
146 CFLAGS +=
147 LDFLAGS += -rdynamic -shared
148 SHARED_LDFLAGS += -Wl,-soname,$(SHARED_LIB) -shared
149 LIBS += -lc $(LIBS_android)
150 STRIP := $(NDK_TOOLCHAIN_BASE)/bin/arm-linux-androideabi-strip \
151 --strip-unneeded -R .note -R .comment
152 DISTBINDIR=$(DISTDIR)-$(OS)-$(shell uname -m)
153 endif
154 ifeq ($(UNAME),Linux)
155 CPU := $(shell uname -m)
156 SOURCES += $(SOURCES_linux)
157 EXTENSION = pd_linux
158 SHARED_EXTENSION = so
159 OS = linux
160 PD_PATH = /usr
161 OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer
162 ALL_CFLAGS += -fPIC
163 ALL_LDFLAGS += -rdynamic -shared -fPIC -Wl,-rpath,"\$$ORIGIN",--enable-new-dtags
164 SHARED_LDFLAGS += -Wl,-soname,$(SHARED_LIB) -shared
165 ALL_LIBS += -lc $(LIBS_linux)
166 STRIP = strip --strip-unneeded -R .note -R .comment
167 DISTBINDIR=$(DISTDIR)-$(OS)-$(shell uname -m)
168 endif
169 ifeq ($(UNAME),GNU)
170 # GNU/Hurd, should work like GNU/Linux for basically all externals
171 CPU := $(shell uname -m)
172 SOURCES += $(SOURCES_linux)
173 EXTENSION = pd_linux
174 SHARED_EXTENSION = so
175 OS = linux
176 PD_PATH = /usr
177 OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer
178 ALL_CFLAGS += -fPIC
179 ALL_LDFLAGS += -rdynamic -shared -fPIC -Wl,-rpath,"\$$ORIGIN",--enable-new-dtags
180 SHARED_LDFLAGS += -shared -Wl,-soname,$(SHARED_LIB)
181 ALL_LIBS += -lc $(LIBS_linux)
182 STRIP = strip --strip-unneeded -R .note -R .comment
183 DISTBINDIR=$(DISTDIR)-$(OS)-$(shell uname -m)
184 endif
185 ifeq ($(UNAME),GNU/kFreeBSD)
186 # Debian GNU/kFreeBSD, should work like GNU/Linux for basically all externals
187 CPU := $(shell uname -m)
188 SOURCES += $(SOURCES_linux)
189 EXTENSION = pd_linux
190 SHARED_EXTENSION = so
191 OS = linux
192 PD_PATH = /usr
193 OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer
194 ALL_CFLAGS += -fPIC
195 ALL_LDFLAGS += -rdynamic -shared -fPIC -Wl,-rpath,"\$$ORIGIN",--enable-new-dtags
196 SHARED_LDFLAGS += -shared -Wl,-soname,$(SHARED_LIB)
197 ALL_LIBS += -lc $(LIBS_linux)
198 STRIP = strip --strip-unneeded -R .note -R .comment
199 DISTBINDIR=$(DISTDIR)-$(OS)-$(shell uname -m)
200 endif
201 ifeq (CYGWIN,$(findstring CYGWIN,$(UNAME)))
202 CPU := $(shell uname -m)
203 SOURCES += $(SOURCES_cygwin)
204 EXTENSION = dll
205 SHARED_EXTENSION = dll
206 OS = cygwin
207 PD_PATH = $(shell cygpath $$PROGRAMFILES)/pd
208 OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer
209 ALL_CFLAGS +=
210 ALL_LDFLAGS += -rdynamic -shared -L"$(PD_PATH)/src" -L"$(PD_PATH)/bin"
211 SHARED_LDFLAGS += -shared -Wl,-soname,$(SHARED_LIB)
212 ALL_LIBS += -lc -lpd $(LIBS_cygwin)
213 STRIP = strip --strip-unneeded -R .note -R .comment
214 DISTBINDIR=$(DISTDIR)-$(OS)
215 endif
216 ifeq (MINGW,$(findstring MINGW,$(UNAME)))
217 CPU := $(shell uname -m)
218 SOURCES += $(SOURCES_windows)
219 EXTENSION = dll
220 SHARED_EXTENSION = dll
221 OS = windows
222 PD_PATH = $(shell cd "$$PROGRAMFILES/pd" && pwd)
223 # MinGW doesn't seem to include cc so force gcc
224 CC=gcc
225 OPT_CFLAGS = -O3 -funroll-loops -fomit-frame-pointer
226 ALL_CFLAGS += -mms-bitfields
227 ALL_LDFLAGS += -s -shared -Wl,--enable-auto-import -L"$(PD_PATH)/src" -L"$(PD_PATH)/bin" -L"$(PD_PATH)/obj"
228 SHARED_LDFLAGS += -shared
229 ALL_LIBS += -lpd -lwsock32 -lkernel32 -luser32 -lgdi32 $(LIBS_windows)
230 STRIP = strip --strip-unneeded -R .note -R .comment
231 DISTBINDIR=$(DISTDIR)-$(OS)
232 endif
233
234 # in case somebody manually set the HELPPATCHES above
235 HELPPATCHES ?= $(SOURCES:.c=-help.pd) $(PDOBJECTS:.pd=-help.pd)
236
237 ALL_CFLAGS := $(ALL_CFLAGS) $(CFLAGS) $(OPT_CFLAGS)
238 ALL_LDFLAGS := $(LDFLAGS) $(ALL_LDFLAGS)
239 ALL_LIBS := $(LIBS) $(ALL_LIBS)
240
241 SHARED_SOURCE ?= $(wildcard lib$(LIBRARY_NAME).c)
242 SHARED_HEADER ?= $(shell test ! -e $(LIBRARY_NAME).h || echo $(LIBRARY_NAME).h)
243 SHARED_LIB ?= $(SHARED_SOURCE:.c=.$(SHARED_EXTENSION))
244 SHARED_TCL_LIB = $(wildcard lib$(LIBRARY_NAME).tcl)
245
246 .PHONY = install libdir_install single_install install-doc install-examples install-manual install-unittests clean distclean dist etags $(LIBRARY_NAME)
247
248 all: $(SOURCES:.c=.$(EXTENSION)) $(SHARED_LIB)
249
250 %.o: %.c
251 $(CC) $(ALL_CFLAGS) -o "$*.o" -c "$*.c"
252
253 %.$(EXTENSION): %.o $(SHARED_LIB)
254 $(CC) $(ALL_LDFLAGS) -o "$*.$(EXTENSION)" "$*.o" $(ALL_LIBS) $(SHARED_LIB)
255 chmod a-x "$*.$(EXTENSION)"
256
257 # this links everything into a single binary file
258 $(LIBRARY_NAME): $(SOURCES:.c=.o) $(LIBRARY_NAME).o lib$(LIBRARY_NAME).o
259 $(CC) $(ALL_LDFLAGS) -o $(LIBRARY_NAME).$(EXTENSION) $(SOURCES:.c=.o) \
260 $(LIBRARY_NAME).o lib$(LIBRARY_NAME).o $(ALL_LIBS)
261 chmod a-x $(LIBRARY_NAME).$(EXTENSION)
262
263 $(SHARED_LIB): $(SHARED_SOURCE:.c=.o)
264 $(CC) $(SHARED_LDFLAGS) -o $(SHARED_LIB) $(SHARED_SOURCE:.c=.o) $(LIBS)
265
266 install: libdir_install
267
268 # The meta and help files are explicitly installed to make sure they are
269 # actually there. Those files are not optional, then need to be there.
270 libdir_install: $(SOURCES:.c=.$(EXTENSION)) $(SHARED_LIB) install-doc install-examples install-manual install-unittests
271 $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)
272 $(INSTALL_DATA) $(LIBRARY_NAME)-meta.pd \
273 $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)
274 test -z "$(strip $(SOURCES))" || (\
275 $(INSTALL_PROGRAM) $(SOURCES:.c=.$(EXTENSION)) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) && \
276 $(STRIP) $(addprefix $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/,$(SOURCES:.c=.$(EXTENSION))))
277 test -z "$(strip $(SHARED_LIB))" || \
278 $(INSTALL_DATA) $(SHARED_LIB) \
279 $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)
280 test -z "$(strip $(wildcard $(SOURCES:.c=.tcl)))" || \
281 $(INSTALL_DATA) $(wildcard $(SOURCES:.c=.tcl)) \
282 $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)
283 test -z "$(strip $(PDOBJECTS))" || \
284 $(INSTALL_DATA) $(PDOBJECTS) \
285 $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)
286 test -z "$(strip $(SHARED_TCL_LIB))" || \
287 $(INSTALL_DATA) $(SHARED_TCL_LIB) \
288 $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)
289
290 # install library linked as single binary
291 single_install: $(LIBRARY_NAME) install-doc install-examples install-manual install-unittests
292 $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)
293 $(INSTALL_PROGRAM) $(LIBRARY_NAME).$(EXTENSION) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)
294 $(STRIP) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/$(LIBRARY_NAME).$(EXTENSION)
295
296 install-doc:
297 $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)
298 test -z "$(strip $(SOURCES) $(PDOBJECTS))" || \
299 $(INSTALL_DATA) $(HELPPATCHES) \
300 $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)
301 $(INSTALL_DATA) README.txt $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/README.txt
302 $(INSTALL_DATA) LICENSE.txt $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/LICENSE.txt
303
304 install-examples:
305 test -z "$(strip $(EXAMPLES))" || \
306 $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/examples && \
307 for file in $(EXAMPLES); do \
308 $(INSTALL_DATA) examples/$$file $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/examples; \
309 done
310
311 install-manual:
312 test -z "$(strip $(MANUAL))" || \
313 $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/manual && \
314 for file in $(MANUAL); do \
315 $(INSTALL_DATA) manual/$$file $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/manual; \
316 done
317
318 install-unittests:
319 test -z "$(strip $(UNITTESTS))" || \
320 $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/unittests && \
321 for file in $(UNITTESTS); do \
322 $(INSTALL_DATA) unittests/$$file $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/unittests; \
323 done
324
325 clean:
326 -rm -f -- $(SOURCES:.c=.o) $(SOURCES_LIB:.c=.o) $(SHARED_SOURCE:.c=.o)
327 -rm -f -- $(SOURCES:.c=.$(EXTENSION))
328 -rm -f -- $(LIBRARY_NAME).o
329 -rm -f -- $(LIBRARY_NAME).$(EXTENSION)
330 -rm -f -- $(SHARED_LIB)
331
332 distclean: clean
333 -rm -f -- $(DISTBINDIR).tar.gz
334 -rm -rf -- $(DISTBINDIR)
335 -rm -f -- $(DISTDIR).tar.gz
336 -rm -rf -- $(DISTDIR)
337 -rm -f -- $(ORIGDIR).tar.gz
338 -rm -rf -- $(ORIGDIR)
339
340
341 $(DISTBINDIR):
342 $(INSTALL_DIR) $(DISTBINDIR)
343
344 libdir: all $(DISTBINDIR)
345 $(INSTALL_DATA) $(LIBRARY_NAME)-meta.pd $(DISTBINDIR)
346 $(INSTALL_DATA) $(SOURCES) $(SHARED_SOURCE) $(SHARED_HEADER) $(DISTBINDIR)
347 $(INSTALL_DATA) $(HELPPATCHES) $(DISTBINDIR)
348 test -z "$(strip $(EXTRA_DIST))" || \
349 $(INSTALL_DATA) $(EXTRA_DIST) $(DISTBINDIR)
350 # tar --exclude-vcs -czpf $(DISTBINDIR).tar.gz $(DISTBINDIR)
351
352 $(DISTDIR):
353 $(INSTALL_DIR) $(DISTDIR)
354
355 $(ORIGDIR):
356 $(INSTALL_DIR) $(ORIGDIR)
357
358 dist: $(DISTDIR)
359 $(INSTALL_DATA) Makefile $(DISTDIR)
360 $(INSTALL_DATA) README.txt $(DISTDIR)
361 $(INSTALL_DATA) LICENSE.txt $(DISTDIR)
362 $(INSTALL_DATA) $(LIBRARY_NAME)-meta.pd $(DISTDIR)
363 test -z "$(strip $(ALLSOURCES))" || \
364 $(INSTALL_DATA) $(ALLSOURCES) $(DISTDIR)
365 test -z "$(strip $(wildcard $(ALLSOURCES:.c=.tcl)))" || \
366 $(INSTALL_DATA) $(wildcard $(ALLSOURCES:.c=.tcl)) $(DISTDIR)
367 test -z "$(strip $(wildcard $(LIBRARY_NAME).c))" || \
368 $(INSTALL_DATA) $(LIBRARY_NAME).c $(DISTDIR)
369 test -z "$(strip $(SHARED_HEADER))" || \
370 $(INSTALL_DATA) $(SHARED_HEADER) $(DISTDIR)
371 test -z "$(strip $(SHARED_SOURCE))" || \
372 $(INSTALL_DATA) $(SHARED_SOURCE) $(DISTDIR)
373 test -z "$(strip $(SHARED_TCL_LIB))" || \
374 $(INSTALL_DATA) $(SHARED_TCL_LIB) $(DISTDIR)
375 test -z "$(strip $(PDOBJECTS))" || \
376 $(INSTALL_DATA) $(PDOBJECTS) $(DISTDIR)
377 test -z "$(strip $(HELPPATCHES))" || \
378 $(INSTALL_DATA) $(HELPPATCHES) $(DISTDIR)
379 test -z "$(strip $(EXTRA_DIST))" || \
380 $(INSTALL_DATA) $(EXTRA_DIST) $(DISTDIR)
381 test -z "$(strip $(EXAMPLES))" || \
382 $(INSTALL_DIR) $(DISTDIR)/examples && \
383 for file in $(EXAMPLES); do \
384 $(INSTALL_DATA) examples/$$file $(DISTDIR)/examples; \
385 done
386 test -z "$(strip $(MANUAL))" || \
387 $(INSTALL_DIR) $(DISTDIR)/manual && \
388 for file in $(MANUAL); do \
389 $(INSTALL_DATA) manual/$$file $(DISTDIR)/manual; \
390 done
391 test -z "$(strip $(UNITTESTS))" || \
392 $(INSTALL_DIR) $(DISTDIR)/unittests && \
393 for file in $(UNITTESTS); do \
394 $(INSTALL_DATA) unittests/$$file $(DISTDIR)/unittests; \
395 done
396 tar --exclude-vcs -czpf $(DISTDIR).tar.gz $(DISTDIR)
397
398 # make a Debian source package
399 dpkg-source:
400 debclean
401 make distclean dist
402 mv $(DISTDIR) $(ORIGDIR)
403 tar --exclude-vcs -czpf ../$(ORIGDIR).orig.tar.gz $(ORIGDIR)
404 rm -f -- $(DISTDIR).tar.gz
405 rm -rf -- $(DISTDIR) $(ORIGDIR)
406 cd .. && dpkg-source -b $(LIBRARY_NAME)
407
408 etags: TAGS
409
410 TAGS: $(wildcard $(PD_INCLUDE)/*.h) $(SOURCES) $(SHARED_SOURCE) $(SHARED_HEADER)
411 etags $(wildcard $(PD_INCLUDE)/*.h)
412 etags -a *.h $(SOURCES) $(SHARED_SOURCE) $(SHARED_HEADER)
413 etags -a --language=none --regex="/proc[ \t]+\([^ \t]+\)/\1/" *.tcl
414
415 showsetup:
416 @echo "CC: $(CC)"
417 @echo "CFLAGS: $(CFLAGS)"
418 @echo "LDFLAGS: $(LDFLAGS)"
419 @echo "LIBS: $(LIBS)"
420 @echo "ALL_CFLAGS: $(ALL_CFLAGS)"
421 @echo "ALL_LDFLAGS: $(ALL_LDFLAGS)"
422 @echo "ALL_LIBS: $(ALL_LIBS)"
423 @echo "PD_INCLUDE: $(PD_INCLUDE)"
424 @echo "PD_PATH: $(PD_PATH)"
425 @echo "objectsdir: $(objectsdir)"
426 @echo "LIBRARY_NAME: $(LIBRARY_NAME)"
427 @echo "LIBRARY_VERSION: $(LIBRARY_VERSION)"
428 @echo "SOURCES: $(SOURCES)"
429 @echo "SHARED_HEADER: $(SHARED_HEADER)"
430 @echo "SHARED_SOURCE: $(SHARED_SOURCE)"
431 @echo "SHARED_LIB: $(SHARED_LIB)"
432 @echo "SHARED_TCL_LIB: $(SHARED_TCL_LIB)"
433 @echo "PDOBJECTS: $(PDOBJECTS)"
434 @echo "ALLSOURCES: $(ALLSOURCES)"
435 @echo "ALLSOURCES TCL: $(wildcard $(ALLSOURCES:.c=.tcl))"
436 @echo "UNAME: $(UNAME)"
437 @echo "CPU: $(CPU)"
438 @echo "pkglibdir: $(pkglibdir)"
439 @echo "DISTDIR: $(DISTDIR)"
440 @echo "ORIGDIR: $(ORIGDIR)"