Mercurial > projects > xinhibit-applet
annotate Makefile @ 19:1421ea50aa5c default tip
Improve build system
Do not clobber CPPFLAGS, use XCPPFLAGS instead.
Request POSIX:2004 headers and libraries.
Specify shared libraries in the correct order.
author | Guido Berhoerster <guido+xinhibit-applet@berhoerster.name> |
---|---|
date | Tue, 13 Sep 2016 20:57:12 +0200 |
parents | 7379cd513e6d |
children |
rev | line source |
---|---|
0
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
1 # |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
2 # Copyright (C) 2013 Guido Berhoerster <guido+xinhibit-applet@berhoerster.name> |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
3 # |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
4 # Permission is hereby granted, free of charge, to any person obtaining |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
5 # a copy of this software and associated documentation files (the |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
6 # "Software"), to deal in the Software without restriction, including |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
7 # without limitation the rights to use, copy, modify, merge, publish, |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
8 # distribute, sublicense, and/or sell copies of the Software, and to |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
9 # permit persons to whom the Software is furnished to do so, subject to |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
10 # the following conditions: |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
11 # |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
12 # The above copyright notice and this permission notice shall be included |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
13 # in all copies or substantial portions of the Software. |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
14 # |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
15 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
16 # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
17 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
18 # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
19 # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
20 # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
21 # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
22 # |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
23 |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
24 PACKAGE = xinhibit-applet |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
25 APP_NAME = org.guido-berhoerster.xinhibit-applet |
9
d83540fd999c
Release version 2
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
7
diff
changeset
|
26 VERSION = 2 |
0
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
27 DISTNAME := $(PACKAGE)-$(VERSION) |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
28 |
19
1421ea50aa5c
Improve build system
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
18
diff
changeset
|
29 # gcc, clang, icc, Sun/Solaris Studio |
1421ea50aa5c
Improve build system
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
18
diff
changeset
|
30 CC := $(CC) -std=c99 |
1421ea50aa5c
Improve build system
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
18
diff
changeset
|
31 COMPILE.c = $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(XCPPFLAGS) $(TARGET_ARCH) -c |
11
4df0dc4dcc3d
Fix automatic dependency generation and improve portability
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
9
diff
changeset
|
32 # gcc, clang, icc |
19
1421ea50aa5c
Improve build system
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
18
diff
changeset
|
33 MAKEDEPEND.c = $(CC) -MM $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(XCPPFLAGS) |
11
4df0dc4dcc3d
Fix automatic dependency generation and improve portability
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
9
diff
changeset
|
34 # Sun/Solaris Studio |
4df0dc4dcc3d
Fix automatic dependency generation and improve portability
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
9
diff
changeset
|
35 #MAKEDEPEND.c = $(CC) -xM1 $(CFLAGS) $(CPPFLAGS) |
4df0dc4dcc3d
Fix automatic dependency generation and improve portability
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
9
diff
changeset
|
36 # X makedepend |
4df0dc4dcc3d
Fix automatic dependency generation and improve portability
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
9
diff
changeset
|
37 #MAKEDEPEND.c = makedepend -f- -Y -- $(CFLAGS) $(CPPFLAGS) -- |
19
1421ea50aa5c
Improve build system
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
18
diff
changeset
|
38 LINK.c = $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(XCPPFLAGS) $(LDFLAGS) $(XLDFLAGS) $(TARGET_ARCH) |
1421ea50aa5c
Improve build system
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
18
diff
changeset
|
39 LINK.o = $(CC) $(LDFLAGS) $(XLDFLAGS) $(TARGET_ARCH) |
0
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
40 INSTALL := install |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
41 INSTALL.exec := $(INSTALL) -D -m 0755 |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
42 INSTALL.data := $(INSTALL) -D -m 0644 |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
43 PAX := pax |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
44 GZIP := gzip |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
45 SED := sed |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
46 MSGFMT := msgfmt |
19
1421ea50aa5c
Improve build system
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
18
diff
changeset
|
47 INTLTOOL_UPDATE := intltool-update |
1421ea50aa5c
Improve build system
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
18
diff
changeset
|
48 INTLTOOL_MERGE := intltool-merge |
5
1508a4c35c47
Rewrite the man page in DocBook 5 XML
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
0
diff
changeset
|
49 XSLTPROC := xsltproc |
1508a4c35c47
Rewrite the man page in DocBook 5 XML
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
0
diff
changeset
|
50 DOCBOOK5_MANPAGES_STYLESHEET = http://docbook.sourceforge.net/release/xsl-ns/current/manpages/docbook.xsl |
1508a4c35c47
Rewrite the man page in DocBook 5 XML
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
0
diff
changeset
|
51 |
1508a4c35c47
Rewrite the man page in DocBook 5 XML
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
0
diff
changeset
|
52 define generate-manpage-rule = |
1508a4c35c47
Rewrite the man page in DocBook 5 XML
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
0
diff
changeset
|
53 %.$(1): %.$(1).xml |
1508a4c35c47
Rewrite the man page in DocBook 5 XML
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
0
diff
changeset
|
54 $$(XSLTPROC) \ |
1508a4c35c47
Rewrite the man page in DocBook 5 XML
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
0
diff
changeset
|
55 --xinclude \ |
1508a4c35c47
Rewrite the man page in DocBook 5 XML
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
0
diff
changeset
|
56 --stringparam package $$(PACKAGE) \ |
1508a4c35c47
Rewrite the man page in DocBook 5 XML
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
0
diff
changeset
|
57 --stringparam version $$(VERSION)\ |
1508a4c35c47
Rewrite the man page in DocBook 5 XML
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
0
diff
changeset
|
58 data/docbook-update-source-data.xsl $$< | \ |
1508a4c35c47
Rewrite the man page in DocBook 5 XML
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
0
diff
changeset
|
59 $$(XSLTPROC) \ |
1508a4c35c47
Rewrite the man page in DocBook 5 XML
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
0
diff
changeset
|
60 --xinclude \ |
1508a4c35c47
Rewrite the man page in DocBook 5 XML
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
0
diff
changeset
|
61 $$(DOCBOOK5_MANPAGES_FLAGS) \ |
1508a4c35c47
Rewrite the man page in DocBook 5 XML
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
0
diff
changeset
|
62 --output $$@ \ |
1508a4c35c47
Rewrite the man page in DocBook 5 XML
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
0
diff
changeset
|
63 $$(DOCBOOK5_MANPAGES_STYLESHEET) \ |
1508a4c35c47
Rewrite the man page in DocBook 5 XML
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
0
diff
changeset
|
64 - |
1508a4c35c47
Rewrite the man page in DocBook 5 XML
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
0
diff
changeset
|
65 endef |
0
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
66 |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
67 DESTDIR ?= |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
68 prefix ?= /usr/local |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
69 bindir ?= $(prefix)/bin |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
70 datadir ?= $(prefix)/share |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
71 mandir ?= $(datadir)/man |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
72 localedir ?= $(datadir)/locale |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
73 sysconfdir ?= /etc |
19
1421ea50aa5c
Improve build system
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
18
diff
changeset
|
74 xdgautostartdir ?= $(sysconfdir)/xdg/autostart |
1421ea50aa5c
Improve build system
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
18
diff
changeset
|
75 |
1421ea50aa5c
Improve build system
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
18
diff
changeset
|
76 OS_NAME := $(shell uname -s) |
1421ea50aa5c
Improve build system
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
18
diff
changeset
|
77 OS_RELEASE := $(shell uname -r) |
0
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
78 |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
79 HAVE_LIBXTST ?= 1 |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
80 |
19
1421ea50aa5c
Improve build system
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
18
diff
changeset
|
81 $(PACKAGE): XCPPFLAGS := $(shell pkg-config --cflags glib-2.0 gtk+-2.0 unique-1.0) \ |
1421ea50aa5c
Improve build system
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
18
diff
changeset
|
82 -D_XOPEN_SOURCE=600 \ |
1421ea50aa5c
Improve build system
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
18
diff
changeset
|
83 -DPACKAGE="\"$(PACKAGE)\"" \ |
1421ea50aa5c
Improve build system
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
18
diff
changeset
|
84 -DAPP_NAME=\"$(APP_NAME)\" \ |
1421ea50aa5c
Improve build system
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
18
diff
changeset
|
85 -DVERSION=\"$(VERSION)\" \ |
1421ea50aa5c
Improve build system
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
18
diff
changeset
|
86 -DLOCALEDIR="\"$(localedir)\"" \ |
1421ea50aa5c
Improve build system
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
18
diff
changeset
|
87 -DG_LOG_DOMAIN=\"$(PACKAGE)\" |
1421ea50aa5c
Improve build system
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
18
diff
changeset
|
88 $(PACKAGE): LDLIBS := $(shell pkg-config --libs glib-2.0 gtk+-2.0 unique-1.0) |
1421ea50aa5c
Improve build system
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
18
diff
changeset
|
89 ifeq ($(OS_NAME),SunOS) |
1421ea50aa5c
Improve build system
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
18
diff
changeset
|
90 $(PACKAGE): XCPPFLAGS += -I/usr/xpg4/include |
1421ea50aa5c
Improve build system
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
18
diff
changeset
|
91 $(PACKAGE): XLDFLAGS += -L/usr/xpg4/lib -R/usr/xpg4/lib |
1421ea50aa5c
Improve build system
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
18
diff
changeset
|
92 endif |
0
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
93 ifeq ($(HAVE_LIBXTST),1) |
19
1421ea50aa5c
Improve build system
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
18
diff
changeset
|
94 $(PACKAGE): XCPPFLAGS += -DHAVE_LIBXTST |
1421ea50aa5c
Improve build system
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
18
diff
changeset
|
95 $(PACKAGE): LDLIBS += -lXtst -lXext -lX11 |
0
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
96 endif |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
97 |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
98 OBJS = main.o xia-icon.o xia-inhibitor.o xia-debug.o |
5
1508a4c35c47
Rewrite the man page in DocBook 5 XML
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
0
diff
changeset
|
99 MANPAGES = data/$(PACKAGE).1 |
19
1421ea50aa5c
Improve build system
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
18
diff
changeset
|
100 AUTOSTART_FILE = data/$(PACKAGE).desktop |
0
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
101 MOFILES := $(patsubst %.po,%.mo,$(wildcard po/*.po)) |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
102 POTFILE = po/$(PACKAGE).pot |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
103 POSRCS := $(shell sed -e 's/\#.*//' -e '/^[ \t]*$$/d' \ |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
104 -e 's/^\[[^]]*\]//' po/POTFILES.in | paste -s -d ' ') |
5
1508a4c35c47
Rewrite the man page in DocBook 5 XML
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
0
diff
changeset
|
105 DOCBOOK5_MANPAGES_FLAGS = --stringparam man.authors.section.enabled 0 \ |
1508a4c35c47
Rewrite the man page in DocBook 5 XML
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
0
diff
changeset
|
106 --stringparam man.copyright.section.enabled 0 |
0
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
107 |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
108 .DEFAULT_TARGET = all |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
109 |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
110 .PHONY: all clean clobber dist install |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
111 |
5
1508a4c35c47
Rewrite the man page in DocBook 5 XML
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
0
diff
changeset
|
112 all: $(PACKAGE) $(MANPAGES) $(MOFILES) $(AUTOSTART_FILE) |
0
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
113 |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
114 $(PACKAGE): $(OBJS) |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
115 $(LINK.o) $^ $(LDLIBS) -o $@ |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
116 |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
117 $(POTFILE): po/POTFILES.in $(POSRCS) |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
118 cd po/ && $(INTLTOOL_UPDATE) --pot --gettext-package="$(PACKAGE)" |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
119 |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
120 pot: $(POTFILE) |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
121 |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
122 update-po: $(POTFILE) |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
123 cd po/ && for lang in $(patsubst po/%.mo,%,$(MOFILES)); do \ |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
124 $(INTLTOOL_UPDATE) --dist --gettext-package="$(PACKAGE)" \ |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
125 $${lang}; \ |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
126 done |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
127 |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
128 %.o: %.c |
11
4df0dc4dcc3d
Fix automatic dependency generation and improve portability
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
9
diff
changeset
|
129 $(MAKEDEPEND.c) $< | $(SED) -f deps.sed >$*.d |
4df0dc4dcc3d
Fix automatic dependency generation and improve portability
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
9
diff
changeset
|
130 $(COMPILE.c) -o $@ $< |
0
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
131 |
5
1508a4c35c47
Rewrite the man page in DocBook 5 XML
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
0
diff
changeset
|
132 $(foreach section,1 2 3 4 5 6 7 8 9,$(eval $(call generate-manpage-rule,$(section)))) |
1508a4c35c47
Rewrite the man page in DocBook 5 XML
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
0
diff
changeset
|
133 |
0
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
134 %.desktop: %.desktop.in $(MOFILES) |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
135 $(INTLTOOL_MERGE) --desktop-style --utf8 po $< $@ |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
136 |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
137 %.mo: %.po |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
138 $(MSGFMT) -o $@ $< |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
139 |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
140 install: |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
141 $(INSTALL.exec) $(PACKAGE) "$(DESTDIR)$(bindir)/$(PACKAGE)" |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
142 for lang in $(patsubst po/%.mo,%,$(MOFILES)); do \ |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
143 $(INSTALL.data) po/$${lang}.mo \ |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
144 "$(DESTDIR)$(localedir)/$${lang}/LC_MESSAGES/$(PACKAGE).mo"; \ |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
145 done |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
146 cd data/icons && for icon in */*/*.png scalable/*/*.svg; do \ |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
147 $(INSTALL.data) $$icon \ |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
148 "$(DESTDIR)$(datadir)/icons/hicolor/$${icon}"; \ |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
149 done |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
150 $(INSTALL.data) $(AUTOSTART_FILE) \ |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
151 "$(DESTDIR)$(xdgautostartdir)/$(notdir $(AUTOSTART_FILE))" |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
152 $(INSTALL.data) data/$(PACKAGE).1 \ |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
153 "$(DESTDIR)$(mandir)/man1/$(PACKAGE).1" |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
154 |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
155 clean: |
19
1421ea50aa5c
Improve build system
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
18
diff
changeset
|
156 rm -f $(PACKAGE) $(OBJS) $(POTFILE) $(MOFILES) $(MANPAGES) \ |
1421ea50aa5c
Improve build system
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
18
diff
changeset
|
157 $(AUTOSTART_FILE) |
0
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
158 |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
159 clobber: clean |
11
4df0dc4dcc3d
Fix automatic dependency generation and improve portability
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
9
diff
changeset
|
160 rm -f $(patsubst %.o,%.d,$(OBJS)) |
0
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
161 |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
162 dist: clobber |
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
163 $(PAX) -w -x ustar -s ',.*/\..*,,' -s ',./[^/]*\.tar\.gz,,' \ |
18
7379cd513e6d
Exclude "." from tarballs
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
11
diff
changeset
|
164 -s ',^\.$$,,' -s ',\./,$(DISTNAME)/,' . | \ |
7379cd513e6d
Exclude "." from tarballs
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
11
diff
changeset
|
165 $(GZIP) > $(DISTNAME).tar.gz |
0
9a16bf50daba
Initial revision
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
diff
changeset
|
166 |
11
4df0dc4dcc3d
Fix automatic dependency generation and improve portability
Guido Berhoerster <guido+xinhibit-applet@berhoerster.name>
parents:
9
diff
changeset
|
167 -include $(patsubst %.o,%.d,$(OBJS)) |