Skip to content

HTTPS clone URL

Subversion checkout URL

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