Merge branch 'cygwin-master' of https://github.com/ternaris/nix
This commit is contained in:
commit
8bdff8c100
|
@ -52,8 +52,13 @@ endif
|
||||||
BUILD_SHARED_LIBS ?= 1
|
BUILD_SHARED_LIBS ?= 1
|
||||||
|
|
||||||
ifeq ($(BUILD_SHARED_LIBS), 1)
|
ifeq ($(BUILD_SHARED_LIBS), 1)
|
||||||
|
ifeq (CYGWIN,$(findstring CYGWIN,$(OS)))
|
||||||
|
GLOBAL_CFLAGS += -U__STRICT_ANSI__
|
||||||
|
GLOBAL_CXXFLAGS += -U__STRICT_ANSI__
|
||||||
|
else
|
||||||
GLOBAL_CFLAGS += -fPIC
|
GLOBAL_CFLAGS += -fPIC
|
||||||
GLOBAL_CXXFLAGS += -fPIC
|
GLOBAL_CXXFLAGS += -fPIC
|
||||||
|
endif
|
||||||
ifneq ($(OS), Darwin)
|
ifneq ($(OS), Darwin)
|
||||||
ifneq ($(OS), SunOS)
|
ifneq ($(OS), SunOS)
|
||||||
GLOBAL_LDFLAGS += -Wl,--no-copy-dt-needed-entries
|
GLOBAL_LDFLAGS += -Wl,--no-copy-dt-needed-entries
|
||||||
|
|
|
@ -2,9 +2,13 @@ libs-list :=
|
||||||
|
|
||||||
ifeq ($(OS), Darwin)
|
ifeq ($(OS), Darwin)
|
||||||
SO_EXT = dylib
|
SO_EXT = dylib
|
||||||
|
else
|
||||||
|
ifeq (CYGWIN,$(findstring CYGWIN,$(OS)))
|
||||||
|
SO_EXT = dll
|
||||||
else
|
else
|
||||||
SO_EXT = so
|
SO_EXT = so
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
# Build a library with symbolic name $(1). The library is defined by
|
# Build a library with symbolic name $(1). The library is defined by
|
||||||
# various variables prefixed by ‘$(1)_’:
|
# various variables prefixed by ‘$(1)_’:
|
||||||
|
@ -50,7 +54,11 @@ define build-library
|
||||||
$(1)_OBJS := $$(addprefix $(buildprefix), $$(addsuffix .o, $$(basename $$(_srcs))))
|
$(1)_OBJS := $$(addprefix $(buildprefix), $$(addsuffix .o, $$(basename $$(_srcs))))
|
||||||
_libs := $$(foreach lib, $$($(1)_LIBS), $$($$(lib)_PATH))
|
_libs := $$(foreach lib, $$($(1)_LIBS), $$($$(lib)_PATH))
|
||||||
|
|
||||||
|
ifeq (CYGWIN,$(findstring CYGWIN,$(OS)))
|
||||||
|
$(1)_INSTALL_DIR ?= $$(bindir)
|
||||||
|
else
|
||||||
$(1)_INSTALL_DIR ?= $$(libdir)
|
$(1)_INSTALL_DIR ?= $$(libdir)
|
||||||
|
endif
|
||||||
|
|
||||||
$(1)_LDFLAGS_USE :=
|
$(1)_LDFLAGS_USE :=
|
||||||
$(1)_LDFLAGS_USE_INSTALLED :=
|
$(1)_LDFLAGS_USE_INSTALLED :=
|
||||||
|
@ -65,9 +73,11 @@ define build-library
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
ifneq ($(OS), Darwin)
|
ifneq ($(OS), Darwin)
|
||||||
|
ifneq (CYGWIN,$(findstring CYGWIN,$(OS)))
|
||||||
$(1)_LDFLAGS += -Wl,-z,defs
|
$(1)_LDFLAGS += -Wl,-z,defs
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(OS), Darwin)
|
ifneq ($(OS), Darwin)
|
||||||
$(1)_LDFLAGS += -Wl,-soname=$$($(1)_NAME).$(SO_EXT)
|
$(1)_LDFLAGS += -Wl,-soname=$$($(1)_NAME).$(SO_EXT)
|
||||||
|
|
|
@ -29,6 +29,12 @@ ifeq ($(perlbindings), yes)
|
||||||
-I$(shell $(perl) -e 'use Config; print $$Config{archlibexp};')/CORE \
|
-I$(shell $(perl) -e 'use Config; print $$Config{archlibexp};')/CORE \
|
||||||
-D_FILE_OFFSET_BITS=64 -Wno-unused-variable -Wno-literal-suffix -Wno-reserved-user-defined-literal
|
-D_FILE_OFFSET_BITS=64 -Wno-unused-variable -Wno-literal-suffix -Wno-reserved-user-defined-literal
|
||||||
|
|
||||||
|
ifeq (CYGWIN,$(findstring CYGWIN,$(OS)))
|
||||||
|
archlib = $(shell perl -E 'use Config; print $$Config{archlib};')
|
||||||
|
libperl = $(shell perl -E 'use Config; print $$Config{libperl};')
|
||||||
|
Store_LDFLAGS = $(shell find ${archlib} -name ${libperl})
|
||||||
|
endif
|
||||||
|
|
||||||
Store_ALLOW_UNDEFINED = 1
|
Store_ALLOW_UNDEFINED = 1
|
||||||
|
|
||||||
Store_FORCE_INSTALL = 1
|
Store_FORCE_INSTALL = 1
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include "store-api.hh"
|
#include "store-api.hh"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
using namespace nix;
|
using namespace nix;
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
#include "local-store.hh"
|
#include "local-store.hh"
|
||||||
#include "globals.hh"
|
#include "globals.hh"
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <sys/un.h>
|
#include <sys/un.h>
|
||||||
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
#include <poll.h>
|
#include <poll.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
Loading…
Reference in a new issue