2019-05-06 19:41:52 +00:00
|
|
|
# Copyright (c) 2019 William Pitcock <nenolod@dereferenced.org>
|
|
|
|
#
|
|
|
|
# Permission to use, copy, modify, and/or distribute this software for any
|
|
|
|
# purpose with or without fee is hereby granted, provided that the above
|
|
|
|
# copyright notice and this permission notice appear in all copies.
|
|
|
|
#
|
|
|
|
# This software is provided 'as is' and without any warranty, express or
|
|
|
|
# implied. In no event shall the authors be liable for any damages arising
|
|
|
|
# from the use of this software.
|
|
|
|
|
|
|
|
# pkgconf-lite is a staticly-linked version of pkgconf that does not include
|
|
|
|
# all features, notably it does not include cross-compile support and MSVC
|
|
|
|
# support. It does not include the libpkgconf library.
|
|
|
|
|
|
|
|
SRCS = \
|
|
|
|
libpkgconf/argvsplit.c \
|
|
|
|
libpkgconf/audit.c \
|
|
|
|
libpkgconf/bsdstubs.c \
|
|
|
|
libpkgconf/cache.c \
|
|
|
|
libpkgconf/client.c \
|
|
|
|
libpkgconf/dependency.c \
|
|
|
|
libpkgconf/fileio.c \
|
|
|
|
libpkgconf/fragment.c \
|
|
|
|
libpkgconf/parser.c \
|
|
|
|
libpkgconf/path.c \
|
|
|
|
libpkgconf/personality.c \
|
|
|
|
libpkgconf/pkg.c \
|
|
|
|
libpkgconf/queue.c \
|
|
|
|
libpkgconf/tuple.c \
|
|
|
|
cli/getopt_long.c \
|
2019-05-06 20:13:17 +00:00
|
|
|
cli/main.c
|
2019-05-06 19:41:52 +00:00
|
|
|
OBJS = ${SRCS:.c=.o}
|
2019-05-06 20:13:17 +00:00
|
|
|
CFLAGS = ${STATIC} -DPKGCONF_LITE -I. -Ilibpkgconf -Icli -DSYSTEM_LIBDIR=\"${SYSTEM_LIBDIR}\" -DSYSTEM_INCLUDEDIR=\"${SYSTEM_INCLUDEDIR}\" -DPKG_DEFAULT_PATH=\"${PKG_DEFAULT_PATH}\"
|
2019-05-06 19:41:52 +00:00
|
|
|
STATIC =
|
2019-05-06 20:22:11 +00:00
|
|
|
STRIP = strip
|
2019-05-06 19:41:52 +00:00
|
|
|
|
|
|
|
all: pkgconf-lite
|
|
|
|
|
|
|
|
libpkgconf/config.h:
|
|
|
|
@echo '#define PACKAGE_NAME "pkgconf-lite"' >> $@
|
|
|
|
@echo '#define PACKAGE_BUGREPORT "https://git.dereferenced.org/pkgconf/pkgconf/issues/new"' >> $@
|
|
|
|
@echo '#define PACKAGE_VERSION "1.6.1"' >> $@
|
|
|
|
@echo '#define PACKAGE PACKAGE_NAME " " PACKAGE_VERSION' >> $@
|
|
|
|
@echo '#define HAVE_STRLCPY' >> $@
|
|
|
|
@echo '#define HAVE_STRLCAT' >> $@
|
|
|
|
@echo '#define HAVE_STRNDUP' >> $@
|
|
|
|
|
|
|
|
pkgconf-lite: preflight libpkgconf/config.h ${OBJS}
|
|
|
|
${CC} ${STATIC} -o $@ ${OBJS}
|
2019-05-06 20:22:11 +00:00
|
|
|
${STRIP} $@
|
2019-05-06 19:41:52 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f libpkgconf/config.h
|
|
|
|
rm -f ${OBJS}
|
|
|
|
rm -f pkgconf-lite
|
|
|
|
|
2019-05-06 20:13:17 +00:00
|
|
|
preflight: preflight-system-libdir preflight-system-includedir preflight-pkg-default-path
|
2019-05-06 19:41:52 +00:00
|
|
|
|
|
|
|
preflight-system-libdir:
|
|
|
|
@if test -z "${SYSTEM_LIBDIR}"; then \
|
|
|
|
echo "SYSTEM_LIBDIR not set."; \
|
|
|
|
exit 1; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
preflight-system-includedir:
|
|
|
|
@if test -z "${SYSTEM_INCLUDEDIR}"; then \
|
|
|
|
echo "SYSTEM_INCLUDEDIR not set."; \
|
|
|
|
exit 1; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
preflight-pkg-default-path:
|
|
|
|
@if test -z "${PKG_DEFAULT_PATH}"; then \
|
|
|
|
echo "PKG_DEFAULT_PATH not set."; \
|
|
|
|
exit 1; \
|
|
|
|
fi
|
|
|
|
|
2019-05-06 20:13:17 +00:00
|
|
|
.PHONY: preflight preflight-system-libdir preflight-system-includedir preflight-pkg-default-path clean
|