blob: d00259428590b6bfe5bdbc801315044ae9e5eb87 (
plain)
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
|
include config.mk
CMODULE_PREFIX ?= cmodules
LUAMODULE_PREFIX ?= luamodules
CFLAGS := $(shell pkg-config --cflags melisma.h) -std=c11 -D_XOPEN_SOURCE=700 -D_GNU_SOURCE
LDFLAGS := -shared -fPIC -lm
CMODULES := $(CSOURCES:%.c=%.so)
all: $(CMODULES)
mod/sample.so: CFLAGS += $(shell pkg-config --cflags samplerate sndfile)
mod/sample.so: LDFLAGS += $(shell pkg-config --libs samplerate sndfile)
mod/%.so: mod/%.c
@ printf "CCLD\t%s\n" $(@)
@ $(CC) -o $(@) $(<) $(CFLAGS) $(LDFLAGS)
install: all
install -Dm644 -t $(CMODULE_PREFIX)/melisma $(CMODULES)
install -Dm644 -t $(LUAMODULE_PREFIX)/melisma $(LUASOURCES)
debug: CFLAGS += -Wno-cpp -O0 -g
debug: all
doc:
ldoc .
clean:
rm -rf mod/*.so
.PHONY: install clean doc
|