mirror of
https://github.com/urbit/shrub.git
synced 2024-11-24 04:58:08 +03:00
Add build support for the Nix package manager
Added build support for the Nix package manager: https://nixos.org/nix supersedes #757, forward-ported and ifdef change applied
This commit is contained in:
parent
7b926e017f
commit
280dc4b064
10
Makefile
10
Makefile
@ -33,6 +33,13 @@ ENDIAN=little
|
||||
#
|
||||
BIN=bin
|
||||
|
||||
# Only include/link with this if it exists.
|
||||
# For the Nix package manager
|
||||
ifdef NIX_PROFILE
|
||||
NIXINC=-I$(NIX_PROFILE)/include
|
||||
NIXLIB=-L$(NIX_PROFILE)/lib
|
||||
endif
|
||||
|
||||
# Only include/link with this if it exists.
|
||||
# (Mac OS X El Capitan clean install does not have /opt)
|
||||
ifneq (,$(wildcard /opt/local/.))
|
||||
@ -69,7 +76,7 @@ CC=cc
|
||||
LN=ln -f
|
||||
CXX=c++
|
||||
CXXFLAGS=$(CFLAGS)
|
||||
CLD=$(CXX) $(CFLAGS) -L/usr/local/lib $(OPTLOCALLFLAGS) $(OPENSSLLFLAGS)
|
||||
CLD=$(CXX) $(CFLAGS) -L/usr/local/lib $(NIXLIB) $(OPTLOCALLFLAGS) $(OPENSSLLFLAGS)
|
||||
|
||||
ifeq ($(OS),osx)
|
||||
CLDOSFLAGS=-bind_at_load
|
||||
@ -106,6 +113,7 @@ endif
|
||||
CFLAGS+= $(COSFLAGS) -ffast-math \
|
||||
-funsigned-char \
|
||||
-I/usr/local/include \
|
||||
$(NIXINC) \
|
||||
$(OPTLOCALIFLAGS) \
|
||||
$(OPENSSLIFLAGS) \
|
||||
$(CURLINC) \
|
||||
|
Loading…
Reference in New Issue
Block a user