-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.internal
107 lines (85 loc) · 3.59 KB
/
Makefile.internal
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
# -*- makefile-bsdmake -*-
#
# Makefile.internal - input for pmake
#
# 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
#
# adjust these as necessary
PATH_SYSCONFDIR ?= /etc # location of configuration files
PATH_FINGER ?= /usr/bin/finger # location of the finger(1) program
BINDIR = /libexec # install location (prefixed with DESTDIR)
# We only support POSIX IEEE Std 1003.1-2001, IEEE Std 1003.2-1992, and C99
#
# And we require a 4.4BSD compatible syslog(3) [with openlog(3)]; as well as
# libident [XXX currently using the old compatibility function rfc931() from
# libwrap, but eventually will use ident_lookup(3)?]
# You shouldn't have to change anything below here.
PACKAGE_NAME = fingerd
PACKAGE_VERSION = 2.0
# N.B.: actually the code in here is still partly pre-c86!
#
CSTD= c89
_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}
# Note: If your platform does have libwrap (and tcpd.h), but they're not in in
# a system directory searched by default then you can pass appropriate -I and -L
# flags by setting CPPFLAGS and LDFLAGS in the environment.
#
CPPFLAGS ?= # Additional preprocessor flags, e.g. -I/usr/local/include
LDFLAGS ?= # Additional linker flags, e.g. -I/usr/local/lib
#
# N.B.: You CANNOT set make variables on the command line if they must be
# adjusted within a Makefile -- they can only be set in the environment!
# Variables set on the command line are effectively always set last, after all
# Makefiles have been read and processed.
#
# XXX change to use ident_lookup(), and do some dance to find 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
#
FFILES= ${.CURDIR}/samples/fingerd.acl \
${.CURDIR}/samples/fingerd.motd \
${.CURDIR}/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}
distribution: # install sample configuration files
distribution: .PHONY
cd ${.CURDIR}/samples; \
${INSTALL} -c -o root -g wheel -m 644 ${FFILES} ${DESTDIR}/etc
.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 dependall")
# End:
#