mirror of
https://github.com/NixOS/nix
synced 2025-07-08 06:53:54 +02:00
Merge branch 'cygwin-master' of https://github.com/ternaris/nix
This commit is contained in:
commit
8bdff8c100
8 changed files with 31 additions and 5 deletions
|
@ -52,8 +52,13 @@ endif
|
|||
BUILD_SHARED_LIBS ?= 1
|
||||
|
||||
ifeq ($(BUILD_SHARED_LIBS), 1)
|
||||
GLOBAL_CFLAGS += -fPIC
|
||||
GLOBAL_CXXFLAGS += -fPIC
|
||||
ifeq (CYGWIN,$(findstring CYGWIN,$(OS)))
|
||||
GLOBAL_CFLAGS += -U__STRICT_ANSI__
|
||||
GLOBAL_CXXFLAGS += -U__STRICT_ANSI__
|
||||
else
|
||||
GLOBAL_CFLAGS += -fPIC
|
||||
GLOBAL_CXXFLAGS += -fPIC
|
||||
endif
|
||||
ifneq ($(OS), Darwin)
|
||||
ifneq ($(OS), SunOS)
|
||||
GLOBAL_LDFLAGS += -Wl,--no-copy-dt-needed-entries
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue