2012-07-24 20:24:52 +00:00
|
|
|
prefix = @prefix@
|
|
|
|
exec_prefix = @exec_prefix@
|
|
|
|
bindir = @bindir@
|
|
|
|
libdir = @libdir@
|
|
|
|
datarootdir = @datarootdir@
|
|
|
|
datadir = @datadir@
|
|
|
|
includedir = @includedir@
|
|
|
|
system_includedir = @SYSTEM_INCLUDEDIR@
|
|
|
|
system_libdir = @SYSTEM_LIBDIR@
|
|
|
|
pkgconfigdir = @PKGCONFIGDIR@
|
|
|
|
|
|
|
|
CC = @CC@
|
|
|
|
PROG = pkgconf@EXEEXT@
|
|
|
|
SRCS = main.c pkg.c bsdstubs.c getopt_long.c fragment.c argvsplit.c fileio.c tuple.c dependency.c
|
|
|
|
OBJS = ${SRCS:.c=.o}
|
|
|
|
CFLAGS = @CFLAGS@
|
|
|
|
LDFLAGS = @LDFLAGS@
|
|
|
|
CFLAGS += -DLIBDIR=\"${libdir}\" -DINCLUDEDIR=\"${includedir}\" -DPKG_DEFAULT_PATH=\"${pkgconfigdir}\" -DSYSTEM_INCLUDEDIR=\"${system_includedir}\" -DSYSTEM_LIBDIR=\"${system_libdir}\" -Wall -Wextra -Wformat=2 -std=gnu99 -D_FORTIFY_SOURCE=2
|
2011-07-25 02:03:17 +00:00
|
|
|
|
2012-07-23 19:49:22 +00:00
|
|
|
all: build
|
|
|
|
build: ${PROG}
|
2011-07-25 02:03:17 +00:00
|
|
|
|
2012-07-23 19:49:22 +00:00
|
|
|
clean:
|
|
|
|
rm *.o
|
|
|
|
rm $(PROG)
|
2011-07-25 05:06:37 +00:00
|
|
|
|
2012-07-23 19:49:22 +00:00
|
|
|
install:
|
|
|
|
mkdir -p $(DESTDIR)/$(bindir)
|
|
|
|
install -c -m755 $(PROG) $(DESTDIR)/$(bindir)/$(PROG)
|
2012-04-30 05:43:46 +00:00
|
|
|
mkdir -p $(DESTDIR)/$(datarootdir)/aclocal
|
|
|
|
install -c -m644 pkg.m4 $(DESTDIR)/$(datarootdir)/aclocal/pkg.m4
|
|
|
|
|
2012-05-03 06:50:57 +00:00
|
|
|
check: $(PROG)
|
|
|
|
$(SHELL) tests/run.sh ./$(PROG)
|
|
|
|
|
2012-05-07 02:18:03 +00:00
|
|
|
valgrind-check: $(PROG)
|
|
|
|
$(SHELL) tests/run.sh 'valgrind --leak-check=full --show-reachable=yes ./$(PROG)'
|
|
|
|
|
2012-07-23 19:49:22 +00:00
|
|
|
$(PROG): $(OBJS)
|
2012-07-24 06:10:35 +00:00
|
|
|
${CC} ${LDFLAGS} -o $@ $(OBJS)
|
2012-07-23 19:49:22 +00:00
|
|
|
|
|
|
|
.c.o:
|
|
|
|
${CC} ${CFLAGS} -c $< -o $@
|