summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorYann Collet <cyan@fb.com>2017-08-14 22:13:23 (GMT)
committerYann Collet <cyan@fb.com>2017-08-14 22:13:23 (GMT)
commitaea7d521aed2506270a14d8e901ea657d6a1faf4 (patch)
treed1a8b349374df28713f574862adc8b6182557c0e /Makefile
parent228e26ee63818c22ea9c4aff0eb47d82306d44e5 (diff)
downloadlz4-aea7d521aed2506270a14d8e901ea657d6a1faf4.zip
lz4-aea7d521aed2506270a14d8e901ea657d6a1faf4.tar.gz
lz4-aea7d521aed2506270a14d8e901ea657d6a1faf4.tar.bz2
better respect GNU standard Makefile conventions
supports lowercase directory variables add an "Installation" section in README.md added an INSTALL file
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 9 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index b31ebd0..972d0b2 100644
--- a/Makefile
+++ b/Makefile
@@ -32,12 +32,6 @@
# - LZ4 forum froup : https://groups.google.com/forum/#!forum/lz4c
# ################################################################
-DESTDIR ?=
-PREFIX ?= /usr/local
-VOID := /dev/null
-
-LIBDIR ?= $(PREFIX)/lib
-INCLUDEDIR=$(PREFIX)/include
LZ4DIR = lib
PRGDIR = programs
TESTDIR = tests
@@ -46,14 +40,16 @@ EXDIR = examples
# Define nul output
ifneq (,$(filter Windows%,$(OS)))
-EXT = .exe
+EXT = .exe
+VOID = nul
else
-EXT =
+EXT =
+VOID = /dev/null
endif
.PHONY: default
-default: lib lz4-release
+default: lib-release lz4-release
.PHONY: all
all: allmost manuals
@@ -61,9 +57,9 @@ all: allmost manuals
.PHONY: allmost
allmost: lib lz4 examples
-.PHONY: lib
-lib:
- @$(MAKE) -C $(LZ4DIR)
+.PHONY: lib lib-release
+lib lib-release:
+ @$(MAKE) -C $(LZ4DIR) $@
.PHONY: lz4 lz4-release
lz4 lz4-release: lib
@@ -100,7 +96,7 @@ install uninstall:
@$(MAKE) -C $(PRGDIR) $@
travis-install:
- $(MAKE) -j1 install PREFIX=~/install_test_dir
+ $(MAKE) -j1 install DESTDIR=~/install_test_dir
cmake:
@cd contrib/cmake_unofficial; cmake $(CMAKE_PARAMS) CMakeLists.txt; $(MAKE)