blob: a792b1ec43c1cccea790351e32d40c825df10add (
plain)
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
|
# $NetBSD: Makefile.in,v 1.22 2012/03/01 20:13:43 jklos Exp $
srcdir= @srcdir@
prefix= @prefix@
exec_prefix= @exec_prefix@
sbindir= @sbindir@
mandir= @mandir@
datarootdir= @datarootdir@
man1dir= $(mandir)/man1
cat1dir= $(mandir)/cat1
man8dir= $(mandir)/man8
cat8dir= $(mandir)/cat8
BOOTSTRAP= @bootstrap@
SSL_SUPPORT= @ssl_support@
CC= @CC@
CCLD= $(CC)
DEFS= @DEFS@
CFLAGS= @CFLAGS@
LDFLAGS= @LDFLAGS@ -L../lib
INSTALL= @INSTALL@
PROG= pkg_admin
SCRIPTS= audit-packages download-vulnerability-list
.if empty(BOOTSTRAP)
LIBS= -linstall -lfetch
.if !empty(SSL_SUPPORT)
LIBS+= -lcrypto
CFLAGS+= -DHAVE_SSL
.endif
LIBS+= @LIBS@
OBJS= audit.o check.o main.o
CPPFLAGS= @CPPFLAGS@ -I. -I$(srcdir) -I../lib
.else
LIBS= -linstall @LIBS@
OBJS= check.o main.o
CPPFLAGS= @CPPFLAGS@ -I. -I$(srcdir) -I../lib -DBOOTSTRAP
.endif
all: $(PROG) $(SCRIPTS)
.c.o:
$(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c $<
$(PROG): $(OBJS)
$(CCLD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
clean:
rm -f $(OBJS) $(PROG)
install:
$(INSTALL) -m 755 -d ${DESTDIR}$(sbindir)
$(INSTALL) -m 755 -d ${DESTDIR}$(man1dir)
$(INSTALL) -m 755 -d ${DESTDIR}$(man8dir)
$(INSTALL) $(PROG) ${DESTDIR}$(sbindir)/$(PROG)
$(INSTALL) -m 555 $(SCRIPTS) ${DESTDIR}$(sbindir)
$(INSTALL) -m 444 $(PROG).1 ${DESTDIR}$(man1dir)/$(PROG).1
$(INSTALL) -m 444 audit-packages.8 ${DESTDIR}$(man8dir)/
$(INSTALL) -m 444 download-vulnerability-list.8 ${DESTDIR}$(man8dir)/
.if !(MANINSTALL:Mcatinstall="")
$(INSTALL) -m 755 -d ${DESTDIR}$(cat1dir)
$(INSTALL) -m 755 -d ${DESTDIR}$(cat8dir)
$(INSTALL) -m 444 $(PROG).cat ${DESTDIR}$(cat1dir)/$(PROG).0
$(INSTALL) -m 444 audit-packages.cat ${DESTDIR}$(cat8dir)/audit-packages.0
$(INSTALL) -m 444 download-vulnerability-list.cat ${DESTDIR}$(cat8dir)/download-vulnerability-list.0
.endif
audit-packages: audit-packages.sh.in
sed -e 's|@PKG_ADMIN@|${sbindir}/pkg_admin|' \
${.CURDIR}/audit-packages.sh.in > $@
download-vulnerability-list: download-vulnerability-list.sh.in
sed -e 's|@PKG_ADMIN@|${sbindir}/pkg_admin|' \
${.CURDIR}/download-vulnerability-list.sh.in > $@
|