makefile tweaks for linux/osx
This commit is contained in:
@@ -1,22 +1,11 @@
|
|||||||
#
|
#
|
||||||
# Makefile for ZeroTier One on Linux
|
# Makefile for ZeroTier SDK on Linux
|
||||||
#
|
|
||||||
# This is confirmed to work on distributions newer than CentOS 6 (the
|
|
||||||
# one used for reference builds) and on 32 and 64 bit x86 and ARM
|
|
||||||
# machines. It should also work on other 'normal' machines and recent
|
|
||||||
# distributions. Editing might be required for tiny devices or weird
|
|
||||||
# distros.
|
|
||||||
#
|
#
|
||||||
# Targets
|
# Targets
|
||||||
# one: zerotier-one and symlinks (cli and idtool)
|
# all: build every target possible on host system, plus tests
|
||||||
# doc: builds manpages, requires rst2man somewhere in PATH
|
# check: reports OK/FAIL of built targets
|
||||||
# all: builds 'one'
|
# tests: build only test applications for host system
|
||||||
# selftest: zerotier-selftest
|
|
||||||
# debug: builds 'one' and 'selftest' with tracing and debug flags
|
|
||||||
# installer: builds installers and packages (RPM/DEB/etc.) if possible
|
|
||||||
# official: cleans and then builds 'one', 'installer', and 'doc'
|
|
||||||
# clean: removes all built files, objects, other trash
|
# clean: removes all built files, objects, other trash
|
||||||
#
|
|
||||||
|
|
||||||
GENERATED_FILES :=
|
GENERATED_FILES :=
|
||||||
DOC_DIR = doc
|
DOC_DIR = doc
|
||||||
@@ -57,22 +46,17 @@ else
|
|||||||
STRIP+=--strip-all
|
STRIP+=--strip-all
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Debug output for ZeroTier service
|
||||||
ifeq ($(ZT_TRACE),1)
|
ifeq ($(ZT_TRACE),1)
|
||||||
DEFS+=-DZT_TRACE
|
DEFS+=-DZT_TRACE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Debug output for Network Containers
|
# Debug output for the SDK
|
||||||
# Specific levels can be controlled in netcon/common.inc.c
|
# Specific levels can be controlled in src/SDK_Debug.h
|
||||||
ifeq ($(SDK_DEBUG),1)
|
ifeq ($(SDK_DEBUG),1)
|
||||||
DEFS+=-DSDK_DEBUG -g
|
DEFS+=-DSDK_DEBUG -g
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Uncomment for gprof profile build
|
|
||||||
#CFLAGS=-Wall -g -pg -pthread $(INCLUDES) $(DEFS)
|
|
||||||
#CXXFLAGS=-Wall -g -pg -pthread $(INCLUDES) $(DEFS)
|
|
||||||
#LDFLAGS=
|
|
||||||
#STRIP=echo
|
|
||||||
|
|
||||||
all: shared_lib check
|
all: shared_lib check
|
||||||
|
|
||||||
remove_only_intermediates:
|
remove_only_intermediates:
|
||||||
|
|||||||
25
make-mac.mk
25
make-mac.mk
@@ -1,3 +1,12 @@
|
|||||||
|
#
|
||||||
|
# Makefile for ZeroTier SDK on OSX
|
||||||
|
#
|
||||||
|
# Targets
|
||||||
|
# all: build every target possible on host system, plus tests
|
||||||
|
# check: reports OK/FAIL of built targets
|
||||||
|
# tests: build only test applications for host system
|
||||||
|
# clean: removes all built files, objects, other trash
|
||||||
|
|
||||||
ifeq ($(origin CC),default)
|
ifeq ($(origin CC),default)
|
||||||
CC=$(shell if [ -e /usr/bin/clang ]; then echo clang; else echo gcc; fi)
|
CC=$(shell if [ -e /usr/bin/clang ]; then echo clang; else echo gcc; fi)
|
||||||
endif
|
endif
|
||||||
@@ -18,17 +27,7 @@ PRODUCTSIGN=echo
|
|||||||
CODESIGN_APP_CERT=
|
CODESIGN_APP_CERT=
|
||||||
CODESIGN_INSTALLER_CERT=
|
CODESIGN_INSTALLER_CERT=
|
||||||
|
|
||||||
# For internal use only -- signs everything with ZeroTier's developer cert
|
# Debug output for ZeroTier service
|
||||||
ifeq ($(ZT_OFFICIAL_RELEASE),1)
|
|
||||||
DEFS+=-DZT_OFFICIAL_RELEASE -DZT_AUTO_UPDATE
|
|
||||||
ZT_USE_MINIUPNPC=1
|
|
||||||
CODESIGN=codesign
|
|
||||||
PRODUCTSIGN=productsign
|
|
||||||
CODESIGN_APP_CERT="Developer ID Application: ZeroTier Networks LLC (8ZD9JUCZ4V)"
|
|
||||||
CODESIGN_INSTALLER_CERT="Developer ID Installer: ZeroTier Networks LLC (8ZD9JUCZ4V)"
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Debug mode -- dump trace output, build binary with -g
|
|
||||||
ifeq ($(ZT_DEBUG),1)
|
ifeq ($(ZT_DEBUG),1)
|
||||||
DEFS+=-DZT_TRACE
|
DEFS+=-DZT_TRACE
|
||||||
CFLAGS+=-Wall -g -pthread $(INCLUDES) $(DEFS)
|
CFLAGS+=-Wall -g -pthread $(INCLUDES) $(DEFS)
|
||||||
@@ -42,8 +41,8 @@ else
|
|||||||
STRIP=strip
|
STRIP=strip
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Debug output for SDK
|
# Debug output for the SDK
|
||||||
# Specific levels can be controlled in src/debug.h
|
# Specific levels can be controlled in src/SDK_Debug.h
|
||||||
ifeq ($(SDK_DEBUG),1)
|
ifeq ($(SDK_DEBUG),1)
|
||||||
DEFS+=-DSDK_DEBUG -g
|
DEFS+=-DSDK_DEBUG -g
|
||||||
endif
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user