File: GNUmakefile

package info (click to toggle)
lv2vocoder 1-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 204 kB
  • ctags: 54
  • sloc: ansic: 221; sh: 26; makefile: 5
file content (36 lines) | stat: -rw-r--r-- 981 bytes parent folder | download | duplicates (4)
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
PLUGIN_NAME = vocoder

# These files go into the bundle
BUNDLE_FILES = manifest.ttl vocoder.ttl vocoder.so

CFLAGS = -c -Wall -fPIC -DPIC $(strip $(shell pkg-config --cflags lv2core))

GENDEP_SED_EXPR = "s/^\\(.*\\)\\.o *: /$(subst /,\/,$(@:.d=.o)) $(subst /,\/,$@) : /g"
GENDEP_C = set -e; $(GCC_PREFIX)gcc -MM $(CFLAGS) $< | sed $(GENDEP_SED_EXPR) > $@; [ -s $@ ] || rm -f $@

default: $(PLUGIN_NAME).lv2

%.o:%.c
	@echo "Compiling $< to $@ ..."
	@$(CC) $(CFLAGS) $< -o $@

%.d: %.c
	@echo "Generating dependency for $< to $@ ..."
	@$(GENDEP_C)

vocoder.so: vocoder.o
	@echo "Creating LV2 shared library $@ ..."
	@g++ -shared -fPIC $(LDFLAGS) $< -o $@

# The main target - the LV2 plugin bundle
$(PLUGIN_NAME).lv2: $(BUNDLE_FILES)
	@echo "Creating LV2 bundle $@ ..."
	@rm -rf $(PLUGIN_NAME).lv2
	@mkdir $(PLUGIN_NAME).lv2
	@cp $(BUNDLE_FILES) $(PLUGIN_NAME).lv2

clean:
	rm -rf *.o vocoder.so $(PLUGIN_NAME).lv2

install: $(PLUGIN_NAME).lv2
	@./install_lv2.sh $(PLUGIN_NAME).lv2