-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
51 lines (42 loc) · 1.36 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
PREFIX=/usr
APPDIR=$(PREFIX)/share/applications
BINDIR=$(PREFIX)/bin
PROGNAME=v4l2_wayland
DESKTOP_FILENAME=$(PROGNAME).desktop
ICON=v4l2_wayland.svg
ICONDIR=$(PREFIX)/share/icons/hicolor/scalable/apps
PROGS=$(PROGNAME)
all: $(PROGS)
LFLAGS = $(shell pkg-config --libs wayland-client) \
$(shell pkg-config --libs wayland-cursor) \
$(shell pkg-config --libs cairo) \
$(shell pkg-config --libs pangocairo) \
$(shell pkg-config --libs gtk+-3.0) \
$(shell pkg-config --libs fftw3) \
-lccv -lm -lpng -ljpeg -lswscale -lavutil -lswresample \
-lavformat -lavcodec -lpthread -ljack
LIBS =
#CFLAGS = -O3 -ffast-math -Wall
CFLAGS =-g -Wall \
$(shell pkg-config --cflags pangocairo) \
$(shell pkg-config --cflags gtk+-3.0) \
$(shell pkg-config --cflags fftw3)
SRCS = v4l2_wayland.c muxing.c sound_shape.c midi.c kmeter.c dingle_dots.c
OBJS = $(SRCS:.c=.o)
HDRS = muxing.h sound_shape.h midi.h v4l2_wayland.h kmeter.h dingle_dots.h
.SUFFIXES:
.SUFFIXES: .c
%.o : %.c ${HDRS}
$(CC) ${CFLAGS} -c $< -o $@
v4l2_wayland: v4l2_wayland.c ${OBJS}
${CC} -o $@ ${OBJS} ${LFLAGS}
install: all
install $(PROGNAME) $(BINDIR)
install -m 644 $(DESKTOP_FILENAME) $(APPDIR)
install -m 644 $(ICON) $(ICONDIR)
uninstall:
rm -f $(BINDIR)/$(PROGNAME)
rm -f $(APPDIR)/$(DESKTOP_FILENAME)
rm -f $(ICONDIR)/$(ICON)
clean:
rm -f ${OBJS} $(PROGS) $(PROGS:%=%.o)