diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-12-14T00·49+0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-12-14T00·49+0100 |
commit | 8bdff8c1003501bab0dbc63ed6c391ff2f2da4b5 (patch) | |
tree | d36f30676cb75b3146959f06e2565a12bf12633b /mk/libraries.mk | |
parent | 14955c297de82e964ea5bf44f8aaf543d4cae33a (diff) | |
parent | f665c5d9b368cba0ca153323a805844f179e8bee (diff) |
Merge branch 'cygwin-master' of https://github.com/ternaris/nix
Diffstat (limited to 'mk/libraries.mk')
-rw-r--r-- | mk/libraries.mk | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/mk/libraries.mk b/mk/libraries.mk index 766f7ccf70f7..3cd7a53107bd 100644 --- a/mk/libraries.mk +++ b/mk/libraries.mk @@ -3,7 +3,11 @@ libs-list := ifeq ($(OS), Darwin) SO_EXT = dylib else - SO_EXT = so + ifeq (CYGWIN,$(findstring CYGWIN,$(OS))) + SO_EXT = dll + else + SO_EXT = so + endif endif # Build a library with symbolic name $(1). The library is defined by @@ -50,7 +54,11 @@ define build-library $(1)_OBJS := $$(addprefix $(buildprefix), $$(addsuffix .o, $$(basename $$(_srcs)))) _libs := $$(foreach lib, $$($(1)_LIBS), $$($$(lib)_PATH)) - $(1)_INSTALL_DIR ?= $$(libdir) + ifeq (CYGWIN,$(findstring CYGWIN,$(OS))) + $(1)_INSTALL_DIR ?= $$(bindir) + else + $(1)_INSTALL_DIR ?= $$(libdir) + endif $(1)_LDFLAGS_USE := $(1)_LDFLAGS_USE_INSTALLED := @@ -65,7 +73,9 @@ define build-library endif else ifneq ($(OS), Darwin) - $(1)_LDFLAGS += -Wl,-z,defs + ifneq (CYGWIN,$(findstring CYGWIN,$(OS))) + $(1)_LDFLAGS += -Wl,-z,defs + endif endif endif |