forked from kmatheussen/jack_capture
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
78 lines (59 loc) · 2.08 KB
/
Makefile
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
PREFIX ?= /usr/local
bindir = $(PREFIX)/bin
VERSION=0.9.71
CC=gcc
CPP=g++
OPTIMIZE=-O3
#OPTIMIZE=-O0 -g
COMPILEFLAGS=$(CPPFLAGS) $(CFLAGS) $(OPTIMIZE) -DVERSION=\"$(VERSION)\" -Wall -Wextra -Wno-unused
LINKFLAGS=$(LDFLAGS) -ljack -lsndfile -lm -lpthread -lrt
targets = jack_capture
all: check_dependencies jack_capture
install: $(targets)
install -d $(DESTDIR)$(bindir)
install -m755 $(targets) $(DESTDIR)$(bindir)
uninstall:
rm -f $(DESTDIR)$(bindir)/jack_capture
-rmdir $(DESTDIR)$(bindir)
check_dependencies:
@echo
@echo "Checking dependencies: "
which bash
which tr
which sed
which install
which pkg-config
which $(CC)
which $(CPP)
$(CC) -E testsndfile.c >/dev/null
@echo "All seems good "
@echo
dist: clean
rm -fr /tmp/jack_capture-$(VERSION)
rm -fr jack_capture-$(VERSION)
mkdir /tmp/jack_capture-$(VERSION)
cp -a * /tmp/jack_capture-$(VERSION)/
mv /tmp/jack_capture-$(VERSION) .
tar cvf jack_capture-$(VERSION).tar jack_capture-$(VERSION)
gzip jack_capture-$(VERSION).tar
marcel_upload jack_capture-$(VERSION).tar.gz
ls -la jack_capture-$(VERSION)
rm -fr jack_capture-$(VERSION)
jack_capture: setformat.c jack_capture.c vringbuffer.c upwaker.c osc.c Makefile das_config.h config_flags
$(CC) $(COMPILEFLAGS) jack_capture.c vringbuffer.c upwaker.c osc.c -o jack_capture $(LINKFLAGS) `cat config_flags`
jack_capture_gui2: jack_capture_gui2.cpp
$(CPP) $(CPPFLAGS) $(OPTIMIZE) jack_capture_gui2.cpp $(LDFLAGS) `pkg-config --libs --cflags gtk+-2.0` -o jack_capture_gui2
config_flags: Makefile das_config.h
cat das_config.h |grep COMPILEFLAGS|sed s/\\/\\/COMPILEFLAGS//|tr '\n' ' ' >config_flags
das_config.h: gen_das_config_h.sh
bash gen_das_config_h.sh >das_config.h
@echo
@echo "jack_capture was configured with the following options:"
@echo "------------------------------"
@cat das_config.h
@echo "------------------------------"
@echo
setformat.c: gen_setformat_c.sh
bash gen_setformat_c.sh >setformat.c
clean:
rm -f *~ jack_capture jack_capture_gui2 config_flags *.wav *.flac *.ogg *.mp3 *.au *.aiff *.wavex temp.c* setformat.c* das_config.h* a.out *.gz *.orig "#*"