File: Makefile

package info (click to toggle)
pd-moonlib 0.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 828 kB
  • sloc: ansic: 5,454; makefile: 64; tcl: 22
file content (64 lines) | stat: -rw-r--r-- 1,746 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Makefile to build class 'moonlib' for Pure Data.
# Needs Makefile.pdlibbuilder as helper makefile for platform-dependent build
# settings and rules.
#
# use : make pdincludepath=/path/to/pure-data/src/
#
# The following command will build the external and install the distributable
# files into a subdirectory called build/moonlib :
#
# make install pdincludepath=../pure-data/src/ objectsdir=./build

lib.name = moonlib

uname := $(shell uname -s)
ifeq (MINGW,$(findstring MINGW,$(uname)))
ldlibs = -lpthread
endif

objects = char2f comma dispatch dripchar f2char f2s gamme image mknob panvol~ \
s2f sarray sfread2~ slist ssaw~ tabdump2 tabenv tabreadl tabsort2 tabsort ndmetro

# lcdbitmap

ifneq (MINGW,$(findstring MINGW,$(uname)))
objects += absolutepath basedir dinlet~ popen readsfv~ relativepath wac
endif

class.sources = $(addsuffix .c,$(objects))

# all extra files to be included in binary distribution of the library
datafiles = \
    $(addsuffix -help.pd,$(objects)) \
    moonlib-meta.pd \
    image.tcl \
    LICENSE.txt \
    README.txt

datadirs = img

cflags = -Wno-unused -Wno-unused-parameter

PDLIBBUILDERDIR ?= .
include $(PDLIBBUILDERDIR)/Makefile.pdlibbuilder

VERSION = $(shell git describe --abbrev=4)

update-pdlibbuilder:
	curl https://raw.githubusercontent.com/pure-data/pd-lib-builder/master/Makefile.pdlibbuilder > ./Makefile.pdlibbuilder

deken-source:
	@rm -rf build_src
	@mkdir -p build_src/moonlib
	@cp $(class.sources) _soundfile.c \
		$(datafiles) Makefile.pdlibbuilder Makefile \
			build_src/moonlib
	@cp -r $(datadirs) build_src/moonlib
	cd build_src/ ; deken upload -v $(VERSION) moonlib

deken-binary:
	@rm -rf build
	@make install objectsdir=./build
	cd build/ ; deken upload -v $(VERSION) moonlib