annotate Makefile @ 1:e1309515d111

Add README file and manpages
author Guido Berhoerster <guido+libpws@berhoerster.name>
date Wed, 25 Mar 2015 17:10:23 +0100
parents d541e748cfd8
children 97097b4b6bfb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
1 #
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
2 # Copyright (C) 2015 Guido Berhoerster <guido+libpws@berhoerster.name>
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
3 #
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
4 # Permission is hereby granted, free of charge, to any person obtaining
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
5 # a copy of this software and associated documentation files (the
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
6 # "Software"), to deal in the Software without restriction, including
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
7 # without limitation the rights to use, copy, modify, merge, publish,
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
8 # distribute, sublicense, and/or sell copies of the Software, and to
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
9 # permit persons to whom the Software is furnished to do so, subject to
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
10 # the following conditions:
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
11 #
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
12 # The above copyright notice and this permission notice shall be included
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
13 # in all copies or substantial portions of the Software.
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
14 #
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
15 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
16 # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
17 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
18 # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
19 # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
20 # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
21 # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
22 #
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
23
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
24 PACKAGE = libpws
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
25 VERSION = 1.0.0
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
26 DISTNAME := $(PACKAGE)-$(VERSION)
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
27
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
28 # gcc, clang, icc, Sun/Solaris Studio
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
29 CC := $(CC) -std=c99
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
30 COMPILE.c = $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(XCPPFLAGS) $(TARGET_ARCH) -c
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
31 # gcc, clang, icc
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
32 MAKEDEPEND.c = $(CC) -MM $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(XCPPFLAGS)
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
33 # Sun/Solaris Studio
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
34 #MAKEDEPEND.c = $(CC) -xM1 $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(XCPPFLAGS)
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
35 # X makedepend
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
36 #MAKEDEPEND.c = makedepend -f- -Y -- $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(XCPPFLAGS) --
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
37 LINK.c = $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(XCPPFLAGS) $(LDFLAGS) $(XLDFLAGS) $(TARGET_ARCH)
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
38 LINK.o = $(CC) $(LDFLAGS) $(XLDFLAGS) $(TARGET_ARCH)
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
39 AR := ar
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
40 RANLIB := ranlib
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
41 INSTALL := install
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
42 INSTALL.exec := $(INSTALL) -D -m 0755
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
43 INSTALL.lib := $(INSTALL) -D -m 0644
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
44 INSTALL.data := $(INSTALL) -D -m 0644
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
45 PAX := pax
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
46 GZIP := gzip
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
47 SED := sed
1
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
48 XSLTPROC := xsltproc
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
49 DOCBOOK5_MANPAGES_STYLESHEET = http://docbook.sourceforge.net/release/xsl-ns/current/manpages/docbook.xsl
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
50 DOCBOOK5_MANPAGES_FLAGS = --stringparam funcsynopsis.style 'ansi' \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
51 --stringparam man.authors.section.enabled 0 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
52 --stringparam man.copyright.section.enabled 0
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
53 DOCBOOK5_XHTML_STYLESHEET = http://docbook.sourceforge.net/release/xsl-ns/current/xhtml/docbook.xsl
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
54 DOCBOOK5_XHTML_FLAGS = --stringparam funcsynopsis.style 'ansi' \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
55 --stringparam generate.consistent.ids 1 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
56 --stringparam refentry.generate.name 1 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
57 --stringparam refentry.generate.title 0 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
58 --stringparam refentry.xref.manvolnum 1 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
59 --stringparam generate.id.attributes 1 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
60 --stringparam make.valid.html 1 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
61 --stringparam make.clean.html 1 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
62 --stringparam html.cleanup 1 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
63 --stringparam html.longdesc 0 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
64 --stringparam ulink.target '' \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
65 --stringparam docbook.css.source '' \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
66 --stringparam css.decoration 0 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
67 --stringparam default.table.width '100%'
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
68
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
69 define generate-manpage-rule =
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
70 $(addsuffix .%,$(basename $1)): $(addsuffix .%.xml,$(basename $(firstword $1))) docbook-update-source-data.xsl
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
71 $$(XSLTPROC) \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
72 --xinclude \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
73 --stringparam package $$(PACKAGE) \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
74 --stringparam version $$(VERSION) \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
75 docbook-update-source-data.xsl $$< | \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
76 $$(XSLTPROC) \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
77 --xinclude \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
78 --output $(firstword $1) \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
79 $$(DOCBOOK5_MANPAGES_FLAGS) \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
80 $$(DOCBOOK5_MANPAGES_STYLESHEET) \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
81 -
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
82 $$(SED) 's,^\.HP \\w.*$$$$,.HP 4n,' $$@ >$$(@).tmp && mv $$(@).tmp $$@
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
83 for alias in $(wordlist 2,$(words $1),$1); do \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
84 ln -sf $(notdir $(firstword $1)) $$$$alias; \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
85 done
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
86 endef
0
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
87
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
88 DESTDIR ?=
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
89 prefix ?= /usr/local
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
90 bindir ?= $(prefix)/bin
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
91 libdir ?= $(prefix)/lib
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
92 includedir ?= $(prefix)/include
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
93 datadir ?= $(prefix)/share
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
94
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
95 OS_NAME := $(shell uname -s)
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
96 OS_RELEASE := $(shell uname -r)
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
97
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
98 ifeq ($(OS_NAME),Linux)
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
99 HAVE_ARC4RANDOM ?= 0
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
100 HAVE_ENDIAN_H ?= 1
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
101 HAVE_SYS_ENDIAN_H ?= 0
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
102 HAVE_GETENTROPY ?= 0
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
103 HAVE_SYS_TREE_H ?= 0
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
104 else ifneq ($(findstring $(OS_NAME),FreeBSD DragonFly),)
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
105 HAVE_ARC4RANDOM ?= 1
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
106 HAVE_ENDIAN_H ?= 0
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
107 HAVE_SYS_ENDIAN_H ?= 1
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
108 HAVE_GETENTROPY ?= 0
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
109 HAVE_SYS_TREE_H ?= 1
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
110 else ifeq ($(OS_NAME),NetBSD)
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
111 HAVE_ARC4RANDOM ?= 1
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
112 HAVE_ENDIAN_H ?= 0
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
113 HAVE_SYS_ENDIAN_H ?= 1
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
114 HAVE_GETENTROPY ?= 0
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
115 HAVE_SYS_TREE_H ?= 1
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
116 else ifeq ($(OS_NAME),OpenBSD)
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
117 HAVE_ARC4RANDOM ?= 1
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
118 HAVE_ENDIAN_H ?= 0
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
119 HAVE_SYS_ENDIAN_H ?= 1
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
120 HAVE_GETENTROPY ?= 1
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
121 HAVE_SYS_TREE_H ?= 1
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
122 else ifeq ($(OS_NAME),SunOS)
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
123 HAVE_ARC4RANDOM ?= 0
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
124 HAVE_ENDIAN_H ?= 0
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
125 HAVE_SYS_ENDIAN_H ?= 0
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
126 HAVE_GETENTROPY ?= 0
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
127 HAVE_SYS_TREE_H ?= 0
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
128 else
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
129 HAVE_ARC4RANDOM ?= 0
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
130 HAVE_ENDIAN_H ?= 0
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
131 HAVE_SYS_ENDIAN_H ?= 0
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
132 HAVE_GETENTROPY ?= 0
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
133 HAVE_SYS_TREE_H ?= 0
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
134 endif
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
135
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
136 LIBPWS_OBJS = pws.o \
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
137 pws-file.o \
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
138 pws-record.o \
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
139 pws-field.o \
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
140 pws-random.o
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
141 LIBPWS_LIB = $(PACKAGE).a
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
142 LIBPWS_LIB_MEMBERS = $(LIBPWS_OBJS:%.o=$(LIBPWS_LIB)(%.o))
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
143
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
144 OBJS = $(LIBPWS_OBJS)
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
145
1
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
146 LIBPWS_MANPAGES = libpws.3
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
147
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
148 PWS_INIT_MANPAGES = pws_init.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
149 pws_finalize.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
150 pws_set_alloc_functions.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
151 pws_generate_uuid.3
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
152
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
153 PWS3_FILE_CREATE_MANPAGES = pws3_file_create.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
154 pws3_file_destroy.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
155 pws3_file_get_error_code.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
156 pws3_file_get_error_message.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
157 pws3_file_read_mem.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
158 pws3_file_read_stream.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
159 pws3_file_write_mem.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
160 pws3_file_write_stream.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
161 pws3_file_set_header_field.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
162 pws3_file_get_header_field.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
163 pws3_file_remove_header_field.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
164 pws3_file_insert_empty_group.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
165 pws3_file_get_empty_group.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
166 pws3_file_remove_empty_group.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
167 pws3_file_first_empty_group.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
168 pws3_file_last_empty_group.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
169 pws3_file_next_empty_group.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
170 pws3_file_prev_empty_group.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
171 pws3_file_insert_record.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
172 pws3_file_get_record.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
173 pws3_file_remove_record.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
174 pws3_file_first_record.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
175 pws3_file_last_record.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
176 pws3_file_next_record.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
177 pws3_file_prev_record.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
178 pws3_field_create.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
179 pws3_field_destroy.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
180 pws3_field_is_header.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
181 pws3_field_get_type.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
182 pws3_field_get_data_type.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
183 pws3_field_set_uuid.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
184 pws3_field_set_text.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
185 pws3_field_set_time.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
186 pws3_field_set_uint8.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
187 pws3_field_set_uint16.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
188 pws3_field_set_uint32.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
189 pws3_field_set_bytes.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
190 pws3_field_get_uuid.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
191 pws3_field_get_text.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
192 pws3_field_get_time.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
193 pws3_field_get_uint8.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
194 pws3_field_get_uint16.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
195 pws3_field_get_uint32.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
196 pws3_field_get_bytes.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
197 pws3_record_create.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
198 pws3_record_destroy.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
199 pws3_record_set_field.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
200 pws3_record_get_field.3 \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
201 pws3_record_remove_field.3
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
202
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
203 MANPAGES = $(LIBPWS_MANPAGES) \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
204 $(PWS_INIT_MANPAGES) \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
205 $(PWS3_FILE_CREATE_MANPAGES)
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
206
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
207 XHTML_DOCUMENTATION = $(addsuffix .xhtml,$(firstword $(LIBPWS_MANPAGES)) \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
208 $(firstword $(PWS_INIT_MANPAGES)) \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
209 $(firstword $(PWS3_FILE_CREATE_MANPAGES)))
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
210
0
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
211 .DEFAULT_TARGET = all
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
212
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
213 .PHONY: all clean clobber dist install
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
214
1
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
215 all: $(LIBPWS_LIB) $(MANPAGES)
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
216
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
217 doc: $(MANPAGES) $(XHTML_DOCUMENTATION)
0
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
218
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
219 XCPPFLAGS = -Iinclude
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
220 ifeq ($(HAVE_ARC4RANDOM),1)
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
221 XCPPFLAGS += -DHAVE_ARC4RANDOM
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
222 endif
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
223 ifeq ($(HAVE_ENDIAN_H),1)
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
224 XCPPFLAGS += -DHAVE_ENDIAN_H
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
225 else ifeq ($(HAVE_SYS_ENDIAN_H),1)
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
226 XCPPFLAGS += -DHAVE_SYS_ENDIAN_H
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
227 else
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
228 LIBPWS_OBJS += compat/endian.o
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
229 endif
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
230 ifeq ($(HAVE_GETENTROPY),1)
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
231 XCPPFLAGS += -DHAVE_GETENTROPY
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
232 else
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
233 LIBPWS_OBJS += compat/getentropy.o
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
234 endif
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
235 ifeq ($(HAVE_SYS_TREE_H),1)
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
236 XCPPFLAGS += -DHAVE_SYS_TREE_H
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
237 endif
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
238 ifneq ($(findstring $(OS_NAME),FreeBSD DragonFly OpenBSD),)
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
239 XCPPFLAGS += -I/usr/local/include
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
240 XLDFLAGS += -L/usr/local/lib
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
241 else ifeq ($(OS_NAME),NetBSD)
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
242 XCPPFLAGS += -I/usr/pkg/include
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
243 XLDFLAGS += -L/usr/pkg/lib
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
244 endif
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
245 ifeq ($(OS_NAME),SunOS)
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
246 XCPPFLAGS += -I/usr/xpg4/include -D__EXTENSIONS__
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
247 XLDFLAGS += -L/usr/xpg4/lib -R/usr/xpg4/lib
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
248 endif
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
249 ifeq ($(findstring $(OS_NAME),FreeBSD DragonFly NetBSD OpenBSD),)
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
250 XCPPFLAGS += -D_XOPEN_SOURCE=600
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
251 endif
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
252
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
253 $(LIBPWS_LIB): $(LIBPWS_LIB_MEMBERS)
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
254
1
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
255 $(eval $(call generate-manpage-rule,$(LIBPWS_MANPAGES)))
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
256
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
257 $(eval $(call generate-manpage-rule,$(PWS_INIT_MANPAGES)))
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
258
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
259 $(eval $(call generate-manpage-rule,$(PWS3_FILE_CREATE_MANPAGES)))
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
260
0
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
261 %.o: %.c
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
262 $(MAKEDEPEND.c) $< | $(SED) -f deps.sed >$*.d
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
263 $(COMPILE.c) -o $@ $<
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
264
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
265 (%): %
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
266 $(AR) $(ARFLAGS) $@ $<
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
267 $(RANLIB) $@
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
268
1
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
269 %.xhtml: %.xml docbook-update-source-data.xsl
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
270 $(XSLTPROC) \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
271 --xinclude \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
272 --stringparam package $(PACKAGE) \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
273 --stringparam version $(VERSION) \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
274 docbook-update-source-data.xsl $< | \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
275 $(XSLTPROC) \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
276 --xinclude \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
277 --output $@ \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
278 $(DOCBOOK5_XHTML_FLAGS) \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
279 $(DOCBOOK5_XHTML_STYLESHEET) \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
280 -
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
281
0
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
282 install:
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
283 for header in include/*.h; do \
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
284 $(INSTALL.data) $${header} \
1
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
285 "$(DESTDIR)$(includedir)/$${header##*/}"; \
0
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
286 done
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
287 $(INSTALL.lib) $(LIBPWS_LIB) \
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
288 "$(DESTDIR)$(libdir)/$(notdir $(LIBPWS_LIB))"
1
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
289 for manpage in $(MANPAGES); do \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
290 if [ -L $${manpage} ]; then \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
291 $(INSTALL.link) $${manpage} \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
292 "$(DESTDIR)$(mandir)/man$${manpage##*.}/$${manpage##*/}"; \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
293 else \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
294 $(INSTALL.data) $${manpage} \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
295 "$(DESTDIR)$(mandir)/man$${manpage##*.}/$${manpage##*/}"; \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
296 fi \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
297 done
0
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
298
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
299 clean:
1
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
300 rm -f $(LIBPWS_LIB) $(LIBPWS_OBJS) $(MANPAGES) \
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents: 0
diff changeset
301 $(XHTML_DOCUMENTATION)
0
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
302
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
303 clobber: clean
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
304 rm -f $(patsubst %.o,%.d,$(OBJS))
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
305
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
306 dist: clobber
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
307 $(PAX) -w -x ustar -s ',.*/\..*,,' -s ',./[^/]*\.tar\.gz,,' \
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
308 -s ',^\.$$,,' -s ',\./,$(DISTNAME)/,' . | \
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
309 $(GZIP) > $(DISTNAME).tar.gz
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
310
d541e748cfd8 Initial revision
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
311 -include $(patsubst %.o,%.d,$(OBJS))