Teach Makefile how to shadow-build

Allows running make -f /path/to/Makefile to keep the build
artifacts out of the source directory.
This commit is contained in:
Tor Arne Vestbø
2018-08-03 01:22:33 +02:00
parent 49f8f323d5
commit fe4d1c6067

View File

@@ -1,5 +1,9 @@
TARGET = sparsebundlefs
# Note: Doesn't work for paths with spaces in them
SRC_DIR=$(dir $(abspath $(lastword $(MAKEFILE_LIST))))
vpath %.cpp $(SRC_DIR)
PKG_CONFIG = pkg-config
override CFLAGS += -std=c++11 -Wall -pedantic -O2 -g