Merge pull request #48 from wojdyr/master

support out-of-source build
pull/50/head
William Pitcock 2013-07-17 18:18:53 -07:00
commit fe8186aa8f
1 changed files with 5 additions and 1 deletions

View File

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