File: Makefile

package info (click to toggle)
gdigi 0.4.0-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 1,168 kB
  • sloc: ansic: 13,659; makefile: 41
file content (49 lines) | stat: -rw-r--r-- 1,188 bytes parent folder | download | duplicates (2)
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
CC = gcc
EXTRA_CFLAGS ?=
EXTRA_LDFLAGS ?=
CFLAGS := $(shell pkg-config --cflags glib-2.0 gio-2.0 gtk+-3.0 libxml-2.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 libxml-2.0) -lexpat -lm
OBJECTS = gdigi.o gui.o effects.o preset.o gtkknob.o preset_xml.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)

images/gdigi_icon.h: images/icon.png
	gdk-pixbuf-csource --raw --name=gdigi_icon $< > $@

clean:
	rm -f *.o

distclean : clean
	rm -f .*.m
	rm -f images/gdigi_icon.h
	rm -f gdigi

install: gdigi
	install gdigi $(DESTDIR)/usr/bin
	install -m 0644 gdigi.desktop $(DESTDIR)/usr/share/applications/
	install -m 0644 images/gdigi.png $(DESTDIR)/usr/share/icons/

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