forked from desowin/gdigi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (35 loc) · 963 Bytes
/
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
CC = gcc
EXTRA_CFLAGS ?=
EXTRA_LDFLAGS ?=
CFLAGS := $(shell pkg-config --cflags glib-2.0 gio-2.0 gtk+-3.0) -Wall -g -ansi -std=c99 $(EXTRA_CFLAGS)
LDFLAGS = $(EXTRA_LDFLAGS) -Wl,--as-needed
LDADD := $(shell pkg-config --libs glib-2.0 gio-2.0 gtk+-3.0 gthread-2.0 alsa) -lexpat
OBJECTS = gdigi.o gui.o effects.o preset.o gtkknob.o
DEPFILES = $(foreach m,$(OBJECTS:.o=),.$(m).m)
.PHONY : clean distclean all
%.o : %.c
$(CC) $(CFLAGS) -c $<
.%.m : %.c
$(CC) $(CFLAGS) -M -MF $@ -MG $<
all: gdigi
gdigi: $(OBJECTS)
$(CC) $(LDFLAGS) -o $@ $+ $(LDADD)
clean:
rm -f *.o
distclean : clean
rm -f .*.m
rm -f gdigi
install: gdigi
install gdigi $(DESTDIR)/usr/bin
install gdigi.desktop $(DESTDIR)/usr/share/applications/
NODEP_TARGETS := clean distclean
depinc := 1
ifneq (,$(filter $(NODEP_TARGETS),$(MAKECMDGOALS)))
depinc := 0
endif
ifneq (,$(fitler-out $(NODEP_TARGETS),$(MAKECMDGOALS)))
depinc := 1
endif
ifeq ($(depinc),1)
-include $(DEPFILES)
endif