File: Makefile

package info (click to toggle)
ir.lv2 1.3.3~dfsg0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 356 kB
  • ctags: 440
  • sloc: cpp: 3,112; ansic: 188; makefile: 90
file content (61 lines) | stat: -rw-r--r-- 2,224 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
# Please edit PREFIX and/or INSTDIR to your liking,
# then issue 'make install' as root (or 'sudo make install').

# Issue 'make convert4chan' to compile the 4-channel converter utility
# (for local use, not installed by make install)

PREFIX = /usr
INSTDIR = $(DESTDIR)$(PREFIX)/lib/lv2/ir.lv2

INST_FILES = ir.so ir_gui.so ir.ttl manifest.ttl

# change "-O2 -ffast-math" to "-g -O0" below if you want to debug the plugin
CPPFLAGS += -Wall -I. -I/usr/include `pkg-config --cflags gtk+-2.0` `pkg-config --cflags gthread-2.0` -D__STDC_FORMAT_MACROS -g -O2 -ffast-math
LIBS += -lc -lm -lzita-convolver -lsamplerate -lsndfile `pkg-config --libs gthread-2.0` `pkg-config --libs gtk+-2.0`

ifeq ($(shell pkg-config --atleast-version='2.16' gtk+-2.0; echo $$?), 1)
   $(error "At least GTK+ version 2.16 is needed to build IR.")
endif

ifeq ($(shell pkg-config --atleast-version='2.20' gtk+-2.0; echo $$?), 0)
   CPPFLAGS += -D_HAVE_GTK_ATLEAST_2_20
endif

C4CFLAGS = -Wall -I. -I/usr/include `pkg-config --cflags gthread-2.0` -O2 -ffast-math
C4LIBS = -lsndfile `pkg-config --libs gthread-2.0`

all: ir.so ir_gui.so

ir.o: ir.cc ir.h ir_utils.h
	g++ ir.cc $(CPPFLAGS) -c -fPIC -o ir.o

ir_gui.o: ir_gui.cc ir.h ir_utils.h ir_wavedisplay.h
	g++ ir_gui.cc $(CPPFLAGS) -c -fPIC -o ir_gui.o

ir_utils.o: ir_utils.cc ir_utils.h ir.h
	g++ ir_utils.cc $(CPPFLAGS) -c -fPIC -o ir_utils.o

ir_meter.o: ir_meter.cc ir_meter.h ir.h ir_utils.h
	g++ ir_meter.cc $(CPPFLAGS) -c -fPIC -o ir_meter.o

ir_modeind.o: ir_modeind.cc ir_modeind.h ir.h ir_utils.h
	g++ ir_modeind.cc $(CPPFLAGS) -c -fPIC -o ir_modeind.o

ir_wavedisplay.o: ir_wavedisplay.cc ir_wavedisplay.h ir.h ir_utils.h
	g++ ir_wavedisplay.cc $(CPPFLAGS) -c -fPIC -o ir_wavedisplay.o

ir.so: ir.o ir_utils.o
	g++ $(LDFLAGS) ir.o ir_utils.o $(LIBS) -shared -o ir.so

ir_gui.so: ir_gui.o ir_utils.o ir_meter.o ir_modeind.o ir_wavedisplay.o
	g++ $(LDFLAGS) ir_gui.o ir_utils.o ir_meter.o ir_modeind.o ir_wavedisplay.o $(LIBS) -shared -z nodelete -o ir_gui.so

convert4chan: convert4chan.c
	gcc $(C4CFLAGS) $(CPPFLAGS) $(LDFLAGS) convert4chan.c $(C4LIBS) -o convert4chan

install: all
	mkdir -p $(INSTDIR)
	cp $(INST_FILES) $(INSTDIR)

clean:
	rm -f *~ *.o ir.so ir_gui.so convert4chan