Makefile: allow BUILDDIR to be a relative path

This commit is contained in:
Ole André Vadla Ravnås
2014-04-30 00:06:41 +02:00
parent 544ba8bf0b
commit 7a7343945d
2 changed files with 3 additions and 3 deletions

View File

@ -35,7 +35,7 @@ ifndef BUILDDIR
BLDIR = .
OBJDIR = .
else
BLDIR = $(BUILDDIR)
BLDIR = $(abspath $(BUILDDIR))
OBJDIR = $(BLDIR)/obj
endif
INCDIR = $(DESTDIR)$(PREFIX)/include
@ -254,7 +254,7 @@ PKGCFGF = $(BLDIR)/$(LIBNAME).pc
.PHONY: all clean install uninstall dist
all: $(LIBRARY) $(ARCHIVE) $(PKGCFGF)
$(MAKE) -C tests
$(MAKE) -C tests BUILDDIR=$(BLDIR)
$(INSTALL_DATA) $(BLDIR)/lib$(LIBNAME).$(EXT) $(BLDIR)/tests/
$(LIBRARY): $(LIBOBJ)