summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile27
1 files changed, 13 insertions, 14 deletions
diff --git a/Makefile b/Makefile
index b31ebd0..da485a1 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,12 +57,14 @@ 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
+lz4 : lib
+lz4-release : lib-release
+lz4 lz4-release :
@$(MAKE) -C $(PRGDIR) $@
@cp $(PRGDIR)/lz4$(EXT) .
@@ -95,12 +93,13 @@ clean:
ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD NetBSD DragonFly SunOS))
HOST_OS = POSIX
+.PHONY: install uninstall
install uninstall:
@$(MAKE) -C $(LZ4DIR) $@
@$(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)