summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorYann Collet <cyan@fb.com>2017-05-10 20:26:04 (GMT)
committerYann Collet <cyan@fb.com>2017-05-10 20:26:04 (GMT)
commitb8575f2d2b1e05c20812215759b29bf2d0f7a708 (patch)
treea026a79e25bd21d158905e92a62ab4096fed8be2 /Makefile
parentfe932c4527aabd1c642b67fddf90e9be8ea380f8 (diff)
downloadlz4-b8575f2d2b1e05c20812215759b29bf2d0f7a708.zip
lz4-b8575f2d2b1e05c20812215759b29bf2d0f7a708.tar.gz
lz4-b8575f2d2b1e05c20812215759b29bf2d0f7a708.tar.bz2
updated Makefile
to automatically build manual files with make all
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile81
1 files changed, 37 insertions, 44 deletions
diff --git a/Makefile b/Makefile
index 1f5165d..24328d5 100644
--- a/Makefile
+++ b/Makefile
@@ -52,36 +52,36 @@ EXT =
endif
-.PHONY: default all lib lz4 clean test versionsTest examples
+.PHONY: default
+default: lib lz4-release
-default:
- @$(MAKE) -C $(LZ4DIR)
- @$(MAKE) -C $(PRGDIR)
- @cp $(PRGDIR)/lz4$(EXT) .
-
-all:
- @$(MAKE) -C $(LZ4DIR) $@
- @$(MAKE) -C $(PRGDIR) $@
- @$(MAKE) -C $(TESTDIR) $@
- @$(MAKE) -C $(EXDIR) $@
+.PHONY: all
+all: default examples manuals
+.PHONY: lib
lib:
@$(MAKE) -C $(LZ4DIR)
-lz4:
+.PHONY: lz4 lz4-release
+lz4 lz4-release: lib
@$(MAKE) -C $(PRGDIR) $@
@cp $(PRGDIR)/lz4$(EXT) .
-lz4-release:
- @$(MAKE) -C $(PRGDIR)
- @cp $(PRGDIR)/lz4$(EXT) .
+.PHONY: examples
+examples: lib lz4-release
+ $(MAKE) -C $(EXDIR) test
+.PHONY: manuals
+manuals:
+ @$(MAKE) -C contrib/gen_manual $@
+
+.PHONY: clean
clean:
+ @$(MAKE) -C $(LZ4DIR) $@ > $(VOID)
@$(MAKE) -C $(PRGDIR) $@ > $(VOID)
@$(MAKE) -C $(TESTDIR) $@ > $(VOID)
- @$(MAKE) -C $(LZ4DIR) $@ > $(VOID)
@$(MAKE) -C $(EXDIR) $@ > $(VOID)
- @$(MAKE) -C examples $@ > $(VOID)
+ @$(MAKE) -C contrib/gen_manual $@
@$(RM) lz4$(EXT)
@echo Cleaning completed
@@ -92,17 +92,31 @@ clean:
ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD NetBSD DragonFly SunOS))
HOST_OS = POSIX
-install:
- @$(MAKE) -C $(LZ4DIR) $@
- @$(MAKE) -C $(PRGDIR) $@
-
-uninstall:
+install uninstall:
@$(MAKE) -C $(LZ4DIR) $@
@$(MAKE) -C $(PRGDIR) $@
travis-install:
$(MAKE) -j1 install PREFIX=~/install_test_dir
+cmake:
+ @cd contrib/cmake_unofficial; cmake $(CMAKE_PARAMS) CMakeLists.txt; $(MAKE)
+
+endif
+
+
+ifneq (,$(filter MSYS%,$(shell uname)))
+HOST_OS = MSYS
+CMAKE_PARAMS = -G"MSYS Makefiles"
+endif
+
+
+#------------------------------------------------------------------------
+#make tests validated only for MSYS, Linux, OSX, kFreeBSD and Hurd targets
+#------------------------------------------------------------------------
+ifneq (,$(filter $(HOST_OS),MSYS POSIX))
+
+.PHONY: test
test:
$(MAKE) -C $(TESTDIR) $@
@@ -135,31 +149,10 @@ platformTest: clean
CFLAGS="-O3 -Werror -static" $(MAKE) -C $(TESTDIR) all
$(MAKE) -C $(TESTDIR) test-platform
+.PHONY: versionsTest
versionsTest: clean
$(MAKE) -C $(TESTDIR) $@
-examples:
- $(MAKE) -C $(LZ4DIR)
- $(MAKE) -C $(PRGDIR) lz4
- $(MAKE) -C examples test
-
-endif
-
-
-ifneq (,$(filter MSYS%,$(shell uname)))
-HOST_OS = MSYS
-CMAKE_PARAMS = -G"MSYS Makefiles"
-endif
-
-
-#------------------------------------------------------------------------
-#make tests validated only for MSYS, Linux, OSX, kFreeBSD and Hurd targets
-#------------------------------------------------------------------------
-ifneq (,$(filter $(HOST_OS),MSYS POSIX))
-
-cmake:
- @cd contrib/cmake_unofficial; cmake $(CMAKE_PARAMS) CMakeLists.txt; $(MAKE)
-
gpptest: clean
g++ -v
CC=g++ $(MAKE) -C $(LZ4DIR) all CFLAGS="-O3 -Wall -Wextra -Wundef -Wshadow -Wcast-align -Werror"