diff options
author | JPeterMugaas <jpmugaas@suddenlink.net> | 2019-04-23 11:44:00 (GMT) |
---|---|---|
committer | JPeterMugaas <jpmugaas@suddenlink.net> | 2019-04-23 11:44:00 (GMT) |
commit | 7136489d336fd2e584eb13cb858983caac5ad2e8 (patch) | |
tree | fe7d22f46d7345bf1316a91c2eedad4765f997f1 /Makefile.inc | |
parent | 229b016f507cdc0db300c22ac4ec8bab7cd0874f (diff) | |
download | lz4-7136489d336fd2e584eb13cb858983caac5ad2e8.zip lz4-7136489d336fd2e584eb13cb858983caac5ad2e8.tar.gz lz4-7136489d336fd2e584eb13cb858983caac5ad2e8.tar.bz2 |
More build imrpvements
Moved a few other tests to Makefiles.inc. Other things might need to go there.
Made a test for symlink appropriateness. Windows can NOT handle them the same way Unix-like operating systems do (if at all). This is mostly the same as the Visual C projects.
embed version info into .dll and .exes that are redistributed.
Diffstat (limited to 'Makefile.inc')
-rw-r--r-- | Makefile.inc | 50 |
1 files changed, 39 insertions, 11 deletions
diff --git a/Makefile.inc b/Makefile.inc index c09ba62..2d64405 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -1,3 +1,9 @@ +ifeq ($(V), 1) +Q = +else +Q = @ +endif + TARGET_OS ?= $(shell uname) ifeq ($(TARGET_OS),) TARGET_OS ?= $(OS) @@ -31,24 +37,17 @@ endif ifeq ($(WINBASED),yes) EXT = .exe +WINDRES = windres endif #determine if dev/nul based on host environment -ifneq (,$(filter MINGW%,$(shell uname))) +ifneq (,$(filter MINGW% MSYS% CYGWIN%,$(shell uname))) VOID := /dev/null else - ifneq (,$(filter MSYS%,$(shell uname))) -VOID := /dev/null - else - ifneq (,$(filter CYGWIN%,$(shell uname))) -VOID := /dev/null - else - ifneq (,$(filter Windows%,$(OS))) + ifneq (,$(filter Windows%,$(OS))) VOID := nul - else + else VOID := /dev/null - endif - endif endif endif @@ -57,3 +56,32 @@ POSIX_ENV = Yes else POSIX_ENV = No endif + +# Avoid symlinks when targetting Windows or building on a Windows host +ifeq ($(WINBASED),yes) +LN_S = cp -p +LN_SF = cp -p +else + ifneq (,$(filter MINGW% MSYS% CYGWIN%,$(shell uname))) +LN_S = cp -p +LN_SF = cp -p + else + ifneq (,$(filter Windows%,$(OS))) +LN_S = cp -p +LN_SF = cp -p + else +LN_S = ln -s +LN_SF = ln -sf + endif + endif +endif + +ifneq (,$(filter $(shell uname),SunOS)) +INSTALL ?= ginstall +else +INSTALL ?= install +endif + +INSTALL_PROGRAM ?= $(INSTALL) -m 755 +INSTALL_DATA ?= $(INSTALL) -m 644 +INSTALL_DIR ?= $(INSTALL) -d -m 755 |