Makefile.in: support out-of-source build

pull/48/head
Marcin Wojdyr 2013-06-29 17:18:07 +01:00
parent 6db657c5ec
commit a56d5c52db
1 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,7 @@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
srcdir = @srcdir@
libdir = @libdir@
datarootdir = @datarootdir@
datadir = @datadir@
@ -30,7 +31,7 @@ install:
mkdir -p $(DESTDIR)$(bindir)
install -c -m755 $(PROG) $(DESTDIR)$(bindir)/$(PROG)
mkdir -p $(DESTDIR)$(datarootdir)/aclocal
install -c -m644 pkg.m4 $(DESTDIR)$(datarootdir)/aclocal/pkg.m4
install -c -m644 $(srcdir)/pkg.m4 $(DESTDIR)$(datarootdir)/aclocal/pkg.m4
check: $(PROG)
$(SHELL) tests/run.sh ./$(PROG)
@ -38,6 +39,9 @@ check: $(PROG)
valgrind-check: $(PROG)
$(SHELL) tests/run.sh 'valgrind --leak-check=full --show-reachable=yes ./$(PROG)'
%.o: $(srcdir)/%.c
$(CC) -c $(CFLAGS) -I. $(CPPFLAGS) $< -o $@
$(PROG): $(OBJS)
${CC} ${LDFLAGS} -o $@ $(OBJS)