forked from x42/scarlett-mixer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
71 lines (49 loc) · 1.91 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
#!/usr/bin/make -f
PREFIX ?= /usr/local
bindir = $(PREFIX)/bin
mandir = $(PREFIX)/share/man/man1
CFLAGS ?= -g -Wall -Wno-unused-function
VERSION ?= $(shell (git describe --tags HEAD 2>/dev/null || echo "v0.1") | sed 's/-g.*$$//;s/^v//')
RW ?= robtk/
APP_SRC = src/scarlett_mixer.c
PUGL_SRC = $(RW)pugl/pugl_x11.c
ifeq ($(shell pkg-config --exists cairo pangocairo pango glu gl alsa || echo no), no)
$(error "build dependencies are not satisfied")
endif
GLUICFLAGS=-I. -I$(RW)
GLUICFLAGS+=`pkg-config --cflags cairo pango lv2 glu alsa` -pthread
GLUICFLAGS+=-DDEFAULT_NOT_ONTOP
LOADLIBES=`pkg-config --libs $(PKG_UI_FLAGS) cairo pangocairo pango glu gl alsa` -lX11 -lm
###############################################################################
all: scarlett-mixer
man: scarlett-mixer.1
# TODO source $(RW)robtk.mk, add dependencies
scarlett-mixer: $(APP_SRC) $(RW)robtkapp.c $(RW)ui_gl.c $(PUGL_SRC) Makefile
$(CC) $(CPPFLAGS) \
-o $@ \
-DVERSION=\"$(VERSION)\" \
$(CFLAGS) $(GLUICFLAGS) -std=c99 \
-DXTERNAL_UI -DHAVE_IDLE_IFACE -DRTK_DESCRIPTOR=lv2ui_descriptor \
-DPLUGIN_SOURCE=\"$(APP_SRC)\" \
-DAPPTITLE="\"Scarlett Mixer\"" \
$(RW)robtkapp.c $(RW)ui_gl.c $(PUGL_SRC) \
$(LDFLAGS) $(LOADLIBES)
clean:
rm -f scarlett-mixer
scarlett-mixer.1: scarlett-mixer
help2man -N -n 'Mixer GUI for Focusrite Scarlett USB Devices' -o scarlett-mixer.1 ./scarlett-mixer
install: install-bin install-man
uninstall: uninstall-bin uninstall-man
install-bin: scarlett-mixer
install -d $(DESTDIR)$(bindir)
install -m755 scarlett-mixer $(DESTDIR)$(bindir)
uninstall-bin:
rm -f $(DESTDIR)$(bindir)/scarlett-mixer
-rmdir $(DESTDIR)$(bindir)
install-man:
install -d $(DESTDIR)$(mandir)
install -m644 scarlett-mixer.1 $(DESTDIR)$(mandir)
uninstall-man:
rm -f $(DESTDIR)$(mandir)/scarlett-mixer.1
-rmdir $(DESTDIR)$(mandir)
.PHONY: all clean install uninstall man install-man install-bin uninstall-man uninstall-bin