-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile.main
More file actions
117 lines (95 loc) · 3.95 KB
/
Makefile.main
File metadata and controls
117 lines (95 loc) · 3.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# -*- makefile-bsdmake -*-
#
# Makefile.internal - input for BSD Make
#
# Copyright (C) 2025 Greg A. Woods - This work is licensed under the Creative
# Commons Attribution-ShareAlike 4.0 International License. To view a copy of
# the license, visit <URL:http://creativecommons.org/licenses/by-sa/4.0/>, or
# send a letter to: Creative Commons, PO Box 1866, Mountain View, CA 94042, USA
#
# This file should be usable as the main Makefile in a BSD source tree.
# adjust these as necessary
PATH_SYSCONFDIR ?= /etc # location of configuration files
PATH_FINGER ?= /usr/bin/finger # location of the finger(1) program
# You shouldn't have to change anything below here.
PACKAGE_NAME = fingerd
PACKAGE_MAJOR = 2
PACKAGE_MINOR = 0
PACKAGE_MICRO = 0
PACKAGE_VERSION = ${PACKAGE_MAJOR}.${PACKAGE_MINOR}.${PACKAGE_MICRO}
_PACKAGE_NAME = "${PACKAGE_NAME}"
CPPFLAGS += -DPACKAGE_NAME=${_PACKAGE_NAME:Q}
_PACKAGE_VERSION = "${PACKAGE_VERSION}"
CPPFLAGS += -DPACKAGE_VERSION=${_PACKAGE_VERSION:Q}
_PATH_FINGER = "${PATH_FINGER}"
CPPFLAGS += -D_PATH_FINGER=${_PATH_FINGER:Q}
_PATH_SYSCONFDIR = "${PATH_SYSCONFDIR}"
CPPFLAGS += -D_PATH_SYSCONFDIR=${_PATH_SYSCONFDIR:Q}
# Fingerd only supports POSIX IEEE Std 1003.1-2001, IEEE Std 1003.2-1992, and it
# should still be C89 compatible.
#
# Fingerd requires a 4.4BSD compatible syslog(3) [with openlog(3)]; as well as
# libwrap [XXX currently we are using the old compatibility function rfc931()
# from libwrap, but may eventually use ident_lookup(3) from libident instead]
#
# However N.B.: actually the code in here is still partly pre-c89, but most
# compilers begrudgingly accept it!
#
CSTD= c89
# XXX also use ident_lookup(), from libident?
#
CPPFLAGS += -DHAVE_LIBWRAP
LDADD += -lwrap
DPADD += ${LIBWRAP}
PROG = fingerd
SRCS = fingerd.c access.c misc.c version.c
MAN = fingerd.8
DOCS = AUTHORS COPYING NEWS README THANKS ToDo
# XXX these should also be put in ${PREFIX}/share/examples/${PACKAGE_NAME} for packages
#
FILES= samples/fingerd.acl \
samples/fingerd.motd \
samples/fingerd.users
version.o: Makefile
fingerd.o: Makefile
# note the care taken to not change the target unless it is really different
# might cause the command to always run (e.g. if Makefile is newer than
# fingerd.8). If this bothers you then run "make -t fingerd.8" to force the
# target file to be up to date.
#
fingerd.8: fingerd.8.in Makefile
sed -e 's|@PATH_FINGER@|${PATH_FINGER}|' \
-e 's|@PATH_SYSCONFDIR@|${PATH_SYSCONFDIR}|' \
-e 's|@PACKAGE_NAME@|${PACKAGE_NAME}|' \
-e 's|@PACKAGE_VERSION@|${PACKAGE_VERSION}|' \
< ${.CURDIR}/fingerd.8.in > ${.TARGET}.tmp && \
cmp -s ${.TARGET}.tmp ${.TARGET} || mv ${.TARGET}.tmp ${.TARGET}
CLEANFILES += fingerd.8
docs: .PHONY ${DOCS} ${MAN}
# N.B.: ATTENTION SYSTEM INTEGRATORS:
#
# In NetBSD the installation of configuration files is done at "make
# distribution" time (which is part of "make release" but also allowed
# separately). This step is optimised so that it doesn't have to descend
# recursively through every source directory and Makefile in the project, but as
# a result that means there must be a hook in src/etc/Makefile. It could also
# be done with <bsd.files.mk>, which is then triggered with a "configinstall"
# target, but again that still needs the hook in src/etc/Makefile!
#
# So, to avoid further portability complications with also including
# <bsd.files.mk> we'll just provide a "distribution" target here and any systems
# integrators will have to ensure it gets called at the right time in their
# release process.
#
distribution: # install sample configuration files
distribution: .PHONY
.for _F in ${FILES:O:u}
${INSTALL} -c -o root -g wheel -m 644 ${.CURDIR}/${_F} ${DESTDIR}/etc
.endfor
.include <bsd.prog.mk>
#
# Local Variables:
# eval: (make-local-variable 'compile-command)
# compile-command: (concat "BUILD_DIR=build-$(uname -s)-$(uname -p); mkdir -p ${BUILD_DIR}; MAKEOBJDIRPREFIX=$(pwd -P)/${BUILD_DIR} " (default-value 'compile-command) " -j 8 LDSTATIC=-static obj depend all")
# End:
#