annotate Makefile @ 22:9d00c0e07c47 version-3

Release version 3
author Guido Berhoerster <guido+xwrited@berhoerster.name>
date Sat, 30 Jun 2018 23:07:36 +0200
parents f0accfc74f7b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
1 #
19
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
2 # Copyright (C) 2018 Guido Berhoerster <guido+xwrited@berhoerster.name>
0
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
3 #
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
4 # Permission is hereby granted, free of charge, to any person obtaining
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
5 # a copy of this software and associated documentation files (the
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
6 # "Software"), to deal in the Software without restriction, including
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
7 # without limitation the rights to use, copy, modify, merge, publish,
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
8 # distribute, sublicense, and/or sell copies of the Software, and to
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
9 # permit persons to whom the Software is furnished to do so, subject to
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
10 # the following conditions:
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
11 #
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
12 # The above copyright notice and this permission notice shall be included
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
13 # in all copies or substantial portions of the Software.
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
14 #
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
15 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
16 # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
17 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
18 # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
19 # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
20 # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
21 # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
22 #
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
23
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
24 PACKAGE = xwrited
19
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
25 APPLICATION_ID = org.guido-berhoerster.code.xwrited
22
9d00c0e07c47 Release version 3
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 19
diff changeset
26 VERSION = 3
0
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
27 DISTNAME := $(PACKAGE)-$(VERSION)
19
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
28 BUG_ADDRESS = guido+xwrited@berhoerster.name
0
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
29
18
4a5330979433 Modernize and improve build system
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 17
diff changeset
30 # gcc, clang, icc, Sun/Solaris Studio
4a5330979433 Modernize and improve build system
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 17
diff changeset
31 CC := $(CC) -std=c99
4a5330979433 Modernize and improve build system
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 17
diff changeset
32 COMPILE.c = $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(XCPPFLAGS) $(TARGET_ARCH) -c
0
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
33 # gcc, clang, icc
18
4a5330979433 Modernize and improve build system
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 17
diff changeset
34 MAKEDEPEND.c = $(CC) -MM $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(XCPPFLAGS)
0
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
35 # Sun/Solaris Studio
18
4a5330979433 Modernize and improve build system
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 17
diff changeset
36 #MAKEDEPEND.c = $(CC) -xM1 $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(XCPPFLAGS)
0
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
37 # X makedepend
18
4a5330979433 Modernize and improve build system
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 17
diff changeset
38 #MAKEDEPEND.c = makedepend -f- -Y -- $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(XCPPFLAGS) --
19
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
39 LINK.c = $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(XCPPFLAGS) $(LDFLAGS) $(XLDFLAGS) $(TARGET_ARCH)
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
40 LINK.o = $(CC) $(LDFLAGS) $(XLDFLAGS) $(TARGET_ARCH)
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
41 CP := cp
0
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
42 INSTALL := install
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
43 INSTALL.exec := $(INSTALL) -D -m 0755
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
44 INSTALL.data := $(INSTALL) -D -m 0644
19
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
45 INSTALL.link := $(CP) -f -P
0
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
46 PAX := pax
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
47 GZIP := gzip
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
48 SED := sed
5
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
49 XSLTPROC := xsltproc
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
50 DOCBOOK5_MANPAGES_STYLESHEET = http://docbook.sourceforge.net/release/xsl-ns/current/manpages/docbook.xsl
19
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
51 DOCBOOK5_MANPAGES_FLAGS = --stringparam man.authors.section.enabled 0 \
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
52 --stringparam man.copyright.section.enabled 0
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
53 MSGFMT = msgfmt
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
54 MSGMERGE = msgmerge
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
55 XGETTEXT = xgettext
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
56 XGETTEXT_OPTIONS = --copyright-holder "$(AUTHOR)" \
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
57 --package-name '$(PACKAGE)' \
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
58 --package-version '$(VERSION)' \
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
59 --msgid-bugs-address '$(BUG_ADDRESS)' \
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
60 --default-domain '$(PACKAGE)' \
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
61 --from-code UTF-8 \
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
62 --keyword=_ \
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
63 --keyword=N_ \
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
64 --keyword=C_:1c,2 \
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
65 --keyword=NC_:1c,2 \
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
66 --keyword=g_dngettext:2,3 \
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
67 --add-comments
5
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
68
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
69 define generate-manpage-rule =
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
70 %.$(1): %.$(1).xml
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
71 $$(XSLTPROC) \
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
72 --xinclude \
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
73 --stringparam package $$(PACKAGE) \
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
74 --stringparam version $$(VERSION)\
19
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
75 docbook-update-source-data.xsl $$< | \
5
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
76 $$(XSLTPROC) \
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
77 --xinclude \
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
78 $$(DOCBOOK5_MANPAGES_FLAGS) \
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
79 --output $$@ \
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
80 $$(DOCBOOK5_MANPAGES_STYLESHEET) \
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
81 -
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
82 endef
0
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
83
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
84 DESTDIR ?=
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
85 prefix ?= /usr/local
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
86 bindir ?= $(prefix)/bin
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
87 datadir ?= $(prefix)/share
5
f0c7f45022c0 Add manpage
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 3
diff changeset
88 mandir ?= $(datadir)/man
0
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
89 localedir ?= $(datadir)/locale
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
90 sysconfdir ?= /etc
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
91 xdgautostartdir ?= $(sysconfdir)/xdg/autostart
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
92
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
93 OS_NAME := $(shell uname -s)
3
6e2d746b06ae Support FreeBSD > 9.0
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 2
diff changeset
94 OS_RELEASE := $(shell uname -r)
6e2d746b06ae Support FreeBSD > 9.0
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 2
diff changeset
95
19
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
96 OBJS = xwrited.o \
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
97 xwd-application.o
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
98 ifneq ($(findstring $(OS_NAME),Linux FreeBSD),)
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
99 OBJS += xwd-utmp-utempter.o
0
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
100 else
19
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
101 OBJS += xwd-utmp-utmpx.o
0
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
102 endif
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
103
19
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
104 MANPAGES = $(PACKAGE).1
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
105
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
106 AUTOSTART_FILE = $(APPLICATION_ID).desktop
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
107
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
108 LINGUAS := $(shell sed 's/\#.*//' po/LINGUAS)
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
109 MOFILES := $(patsubst %,po/%.mo,$(LINGUAS))
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
110 POTFILES_IN := $(shell sed 's/\#.*//' po/POTFILES.in)
0
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
111 POTFILE = po/$(PACKAGE).pot
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
112
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
113 .DEFAULT_TARGET = all
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
114
19
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
115 .PHONY: all pot update-po clean clobber dist install
0
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
116
19
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
117 all: $(PACKAGE) $(AUTOSTART_FILE) $(MOFILES) $(MANPAGES)
0
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
118
19
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
119 $(PACKAGE): XCFLAGS = $(shell pkg-config --cflags gobject-2.0 gio-2.0 \
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
120 glib-2.0) \
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
121 -DPACKAGE=\"$(PACKAGE)\" \
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
122 -DAPPLICATION_ID=\"$(APPLICATION_ID)\" \
18
4a5330979433 Modernize and improve build system
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 17
diff changeset
123 -DVERSION=\"$(VERSION)\" \
19
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
124 -DG_LOG_DOMAIN=\"$(PACKAGE)\" \
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
125 -DPACKAGE_LOCALE_DIR="\"$(localedir)\"" \
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
126 -DGETTEXT_PACKAGE=\"$(PACKAGE)\"
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
127 $(PACKAGE): LDLIBS = $(shell pkg-config --libs gobject-2.0 gio-2.0 \
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
128 glib-2.0)
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
129
18
4a5330979433 Modernize and improve build system
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 17
diff changeset
130 ifeq ($(OS_NAME),Linux)
19
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
131 $(PACKAGE): XCPPFLAGS += -D_XOPEN_SOURCE=600
18
4a5330979433 Modernize and improve build system
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 17
diff changeset
132 $(PACKAGE): LDLIBS += -lutempter
4a5330979433 Modernize and improve build system
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 17
diff changeset
133 else ifeq ($(OS_NAME),FreeBSD)
4a5330979433 Modernize and improve build system
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 17
diff changeset
134 $(PACKAGE): LDLIBS += -lulog
4a5330979433 Modernize and improve build system
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 17
diff changeset
135 else ifeq ($(OS_NAME),SunOS)
19
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
136 $(PACKAGE): XCPPFLAGS += -D_XOPEN_SOURCE=600 -I/usr/xpg4/include
18
4a5330979433 Modernize and improve build system
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 17
diff changeset
137 $(PACKAGE): XLDFLAGS += -L/usr/xpg4/lib -R/usr/xpg4/lib
4a5330979433 Modernize and improve build system
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 17
diff changeset
138 endif
19
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
139
0
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
140 $(PACKAGE): $(OBJS)
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
141 $(LINK.o) $^ $(LDLIBS) -o $@
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
142
19
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
143 $(POTFILE): po/POTFILES.in $(POTFILES_IN)
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
144 $(XGETTEXT) $(XGETTEXT_OPTIONS) --files-from $< --output $@
0
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
145
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
146 pot: $(POTFILE)
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
147
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
148 update-po: $(POTFILE)
19
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
149 for pofile in $(patsubst %.mo,%.po,$(MOFILES)); do \
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
150 $(MSGMERGE) --update --backup off $$pofile $<; \
0
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
151 done
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
152
19
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
153 %.mo: %.po
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
154 $(MSGFMT) --output $@ $<
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
155
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
156 %.desktop: %.desktop.in
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
157 $(MSGFMT) --desktop --template $< -d po --output $@
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
158
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
159 $(foreach section,1 2 3 4 5 6 7 8 9,$(eval $(call generate-manpage-rule,$(section))))
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
160
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
161 %.mo: %.po
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
162 $(MSGFMT) -o $@ $<
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
163
0
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
164 %.o: %.c
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
165 $(MAKEDEPEND.c) $< | $(SED) -f deps.sed >$*.d
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
166 $(COMPILE.c) -o $@ $<
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
167
19
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
168 install: all
0
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
169 $(INSTALL.exec) $(PACKAGE) "$(DESTDIR)$(bindir)/$(PACKAGE)"
19
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
170 $(INSTALL.data) $(AUTOSTART_FILE) \
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
171 $(DESTDIR)$(xdgautostartdir)/$(AUTOSTART_FILE)
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
172 for lang in $(LINGUAS); do \
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
173 $(INSTALL.data) po/$${lang}.mo \
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
174 $(DESTDIR)$(localedir)/$${lang}/LC_MESSAGES/$(PACKAGE).mo; \
0
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
175 done
19
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
176 for manpage in $(MANPAGES); do \
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
177 $(INSTALL.data) $${manpage} \
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
178 "$(DESTDIR)$(mandir)/man$${manpage##*.}/$${manpage##*/}"; \
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
179 done
0
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
180
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
181 clean:
19
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
182 rm -f $(PACKAGE) $(OBJS) $(AUTOSTART_FILE) $(POTFILE) $(MOFILES) \
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
183 $(MANPAGES)
0
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
184
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
185 clobber: clean
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
186 rm -f $(patsubst %.o,%.d,$(OBJS))
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
187
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
188 dist: clobber
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
189 $(PAX) -w -x ustar -s ',.*/\..*,,' -s ',./[^/]*\.tar\.gz,,' \
17
48caa69c609d Exclude "." from tarballs
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 14
diff changeset
190 -s ',^\.$$,,' -s ',\./,$(DISTNAME)/,' . | \
48caa69c609d Exclude "." from tarballs
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 14
diff changeset
191 $(GZIP) > $(DISTNAME).tar.gz
0
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
192
19
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
193 -include local.mk
f0accfc74f7b Port to GLib version 2.48 or later
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents: 18
diff changeset
194
0
52694b49dcc4 Initial revision
Guido Berhoerster <guido+xwrited@berhoerster.name>
parents:
diff changeset
195 -include $(patsubst %.o,%.d,$(OBJS))