Commit d8a64b15 authored by Mike Hibler's avatar Mike Hibler

Fixes for static build.

parent 3a1dc2a9
#
# Copyright (c) 2000-2011 University of Utah and the Flux Group.
# Copyright (c) 2000-2014 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -49,7 +49,28 @@ PTHREADCFLAGS = -D_THREAD_SAFE -pthread
LINUXOPTS = -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE \
-D_XOPEN_SOURCE=500 -D_BSD_SOURCE=1
CFLAGS = -Wall -O2 -g -static -I. $(PTHREADCFLAGS) $(LINUXOPTS)
#
# STATIC = yes|no|fail
#
# NOTE: with some newer Linux distros (at least Ubuntu14) we cannot build
# static with libcrypto as that library references the dynamic linker.
# So either choose not to set STATIC for dynamic binaries, or set
# STATIC=fail, in which case the crypto-requiring features are disabled.
#
STATIC = yes
ifeq ($(STATIC),yes)
LINUXOPTS += -static
endif
ifeq ($(STATIC),fail)
LINUXOPTS += -static
WITH_CRYPTO = 0
WITH_SIGNING = 0
WITH_HASH = 0
endif
CFLAGS = -Wall -O2 -g -I. $(PTHREADCFLAGS) $(LINUXOPTS)
LIBS = -lz $(PTHREADLIBS)
UNZIPCFLAGS = $(CFLAGS) -Wall
UNZIPLIBS = $(LIBS)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment