ldnssec-utils/Makefile

64 lines
1.4 KiB
Makefile
Raw Normal View History

2021-12-10 23:41:31 +01:00
# ldnssec-utils
#
# Written in 2021 by Lucas
#
# To the extent possible under law, the author(s) have dedicated all
# copyright and related and neighboring rights to this software to the
# public domain worldwide. This software is distributed without any
# warranty.
#
# You should have received a copy of the CC0 Public Domain Dedication
# along with this software. If not, see
# <http://creativecommons.org/publicdomain/zero/1.0/>.
.POSIX:
.SUFFIXES:
.SUFFIXES: .o .c
P = ldnssec-utils
V = 0.0
2021-12-14 17:35:48 +01:00
MANPREFIX = ${PREFIX}/man
2021-12-10 23:41:31 +01:00
LIBHDR = util.h
LIBOBJ = util.o
BIN = ldnssec-keygen ldnssec-sign-dnskey
2021-12-14 17:35:48 +01:00
MAN1 = ldnssec-keygen.1
2021-12-14 21:03:59 +01:00
OBJ = ${BIN:=.o} ${LIBOBJ}
2021-12-10 23:41:31 +01:00
SRC = ${OBJ:.o=.c}
DIST = COPYING Makefile ${LIBHDR} ${SRC}
LDNS_INCS = -I/usr/local/include
LDNS_LIBS = -L/usr/local/lib -lldns
.o:
${CC} ${LDFLAGS} -o $@ $@.o ${LIBOBJ} ${LDNS_LIBS}
.c.o:
${CC} ${CFLAGS} ${LDNS_INCS} -c $<
2021-12-14 21:03:59 +01:00
all: ${BIN}
2021-12-10 23:41:31 +01:00
clean:
2021-12-14 21:03:59 +01:00
rm -f ${BIN} ${OBJ} ${P}-${V}.tgz
2021-12-10 23:41:31 +01:00
dist: clean
pax -ws ',^,${P}-${V}/,' ${DIST} | gzip >${P}-${V}.tgz
install: all
mkdir -p ${PREFIX}/bin
cp -f ${BIN} ${PREFIX}/bin
cd ${PREFIX}/bin && chmod 555 ${BIN}
2021-12-14 17:35:48 +01:00
mkdir -p ${MANPREFIX}/man1
cp -f ${MAN1} ${MANPREFIX}/man1
cd ${MANPREFIX}/man1 && chmod 444 ${MAN1}
2021-12-10 23:41:31 +01:00
uninstall:
cd ${PREFIX}/bin && rm -f ${BIN}
2021-12-14 17:35:48 +01:00
cd ${MANPREFIX}/man1 && rm -f ${MAN1}
2021-12-10 23:41:31 +01:00
util.o: util.h
ldnssec-keygen: ldnssec-keygen.o ${LIBOBJ}
ldnssec-sign-dnskey: ldnssec-sign-dnskey.o ${LIBOBJ}