summaryrefslogtreecommitdiff
path: root/app-laptop/pommed/pommed-1.31/gpomme/Makefile
blob: 438d152d13a2fb2a361dbc7c4e2178bba5700c62 (plain)
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
CC = gcc

GTK_CFLAGS = $(shell pkg-config --cflags gtk+-2.0)
GTK_LIBS = $(shell pkg-config --libs gtk+-2.0)

GLADE_CFLAGS = $(shell pkg-config --cflags libglade-2.0)
GLADE_LIBS = $(shell pkg-config --libs libglade-2.0)

DBUS_CFLAGS = $(shell pkg-config dbus-1 --cflags) -DDBUS_API_SUBJECT_TO_CHANGE
DBUS_LIBS = $(shell pkg-config dbus-1 --libs)

DBUSGLIB_CFLAGS = $(shell pkg-config dbus-glib-1 --cflags)
DBUSGLIB_LIBS = $(shell pkg-config dbus-glib-1 --libs)

CONFUSE_CFLAGS = $(shell pkg-config libconfuse --cflags)
CONFUSE_LIBS = $(shell pkg-config libconfuse --libs)

INOTIFY_CFLAGS = $(shell test -e /usr/include/sys/inotify.h || echo -DNO_SYS_INOTIFY_H)

CFLAGS = -g -O2 -Wall $(DBUS_CFLAGS) $(DBUSGLIB_CFLAGS) $(GTK_CFLAGS) $(CONFUSE_CFLAGS) $(GLADE_CFLAGS) $(INOTIFY_CFLAGS)
LDFLAGS = -lpthread -lX11 $(DBUS_LIBS) $(DBUSGLIB_LIBS) $(GTK_LIBS) $(CONFUSE_LIBS) $(GLADE_LIBS)

SOURCES = gpomme.c theme.c conffile.c \
		../client-common/dbus-client.c \
		../client-common/video-client.c
POFILES = po/fr.po po/de.po po/es.po po/it.po po/ja.po

OBJS = $(SOURCES:%.c=%.o)
MOFILES = $(POFILES:%.po=%.mo)

all: gpomme mo

mo: $(MOFILES)

gpomme: $(OBJS) $(LIBS)

gpomme.o: gpomme.c gpomme.h theme.h ../client-common/dbus-client.h ../client-common/video-client.h

theme.o: theme.c theme.h gpomme.h

conffile.o: conffile.c conffile.h gpomme.h theme.h

../client-common/dbus-client.o: ../client-common/dbus-client.c ../client-common/dbus-client.h

../client-common/video-client.o: ../client-common/video-client.c ../client-common/video-client.h

%.mo: %.po
	@echo Building $@...
	@msgfmt --statistics -o $@ $<

updatepo:
	xgettext -L C -k_ -o po/gpomme.pot $(SOURCES)
	for po in $(POFILES); do \
		msgmerge -U $$po po/gpomme.pot; \
	done

clean:
	rm -f gpomme $(OBJS) $(MOFILES)
	rm -f *~ po/*~ ../client-common/*~