Skip to content

Commit

Permalink
Minor, build target updates
Browse files Browse the repository at this point in the history
  • Loading branch information
joseph-henry committed Dec 19, 2016
1 parent 0a2bdc4 commit b576a1b
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 26 deletions.
12 changes: 6 additions & 6 deletions Jenkinsfile
Expand Up @@ -106,14 +106,14 @@ parallel 'centos7': {


// ------------------------------------------------------------------------------
// ---------------------------- shared library (Linux) --------------------------
// ---------------------------- static library (Linux) --------------------------
// ------------------------------------------------------------------------------


try {
checkout scm
stage('macOS shared lib') {
sh 'make linux_shared_lib SDK_PICOTCP=1 SDK_IPV4=1'
sh 'make linux_static_lib SDK_PICOTCP=1 SDK_IPV4=1'
}
}
catch (err) {
Expand All @@ -125,7 +125,7 @@ parallel 'centos7': {
try {
checkout scm
stage('macOS shared lib') {
sh 'make linux_shared_lib SDK_PICOTCP=1 SDK_IPV6=1'
sh 'make linux_static_lib SDK_PICOTCP=1 SDK_IPV6=1'
}
}
catch (err) {
Expand Down Expand Up @@ -315,14 +315,14 @@ parallel 'centos7': {
throw err
}
// ------------------------------------------------------------------------------
// ----------------------------- shared library (macOS) -------------------------
// ----------------------------- static library (macOS) -------------------------
// ------------------------------------------------------------------------------


try {
checkout scm
stage('macOS shared lib') {
sh 'make osx_shared_lib SDK_PICOTCP=1 SDK_IPV4=1'
sh 'make osx_static_lib SDK_PICOTCP=1 SDK_IPV4=1'
}
}
catch (err) {
Expand All @@ -334,7 +334,7 @@ parallel 'centos7': {
try {
checkout scm
stage('macOS shared lib') {
sh 'make osx_shared_lib SDK_PICOTCP=1 SDK_IPV6=1'
sh 'make osx_static_lib SDK_PICOTCP=1 SDK_IPV6=1'
}
}
catch (err) {
Expand Down
12 changes: 6 additions & 6 deletions make-linux.mk
Expand Up @@ -187,18 +187,18 @@ one: $(OBJS) $(ZT1)/service/OneService.o $(ZT1)/one.o $(ZT1)/osdep/LinuxEthernet
$(STRIP) $(ONE_SERVICE)
cp $(ONE_SERVICE) $(INT)/docker/docker_demo/$(ONE_SERVICE_NAME)

# ---------------------------------------
# --------------- Intercept -------------
# ---------------------------------------
# ---------------------------------------
# --------------- Intercept -------------
# ---------------------------------------

# Build only the intercept library
linux_intercept:
# Use gcc not clang to build standalone intercept library since gcc is typically used for libc and we want to ensure maximal ABI compatibility
gcc $(DEFS) $(INCLUDES) -g -O2 -Wall -std=c99 -fPIC -DVERBOSE -D_GNU_SOURCE -DSDK_INTERCEPT -nostdlib -nostdlib -shared -o $(SDK_INTERCEPT) $(SDK_INTERCEPT_C_FILES) -ldl

# ---------------------------------------
# ----- Service Library Combinations ----
# ---------------------------------------
# ---------------------------------------
# ----- Service Library Combinations ----
# ---------------------------------------

# Build only the SDK service
ifeq ($(SDK_LWIP),1)
Expand Down
32 changes: 19 additions & 13 deletions make-mac.mk
Expand Up @@ -184,11 +184,11 @@ one: $(OBJS) $(ZT1)/service/OneService.o $(ZT1)/one.o $(ZT1)/osdep/OSXEthernetTa
ios: ios_app_framework ios_unity3d_bundle

# Build all OSX targets
osx: osx_app_framework osx_unity3d_bundle osx_shared_lib osx_sdk_service osx_intercept
osx: osx_app_framework osx_unity3d_bundle osx_sdk_service osx_intercept

# ---------------------------------------
# ----------- App Frameworks ------------
# ---------------------------------------
# ---------------------------------------
# ----------- App Frameworks ------------
# ---------------------------------------

# TODO: CHECK if XCODE TOOLS are installed
# Build frameworks for application development
Expand All @@ -202,9 +202,9 @@ ios_app_framework:
cd $(INT)/apple/ZeroTierSDK_Apple; xcodebuild -configuration Debug -scheme ZeroTierSDK_iOS build SYMROOT="../../../$(BUILD)/ios_app_framework"
cp docs/ios.md $(BUILD)/ios_app_framework/README.md

# ---------------------------------------
# ------------ Unity Bundles ------------
# ---------------------------------------
# ---------------------------------------
# ------------ Unity Bundles ------------
# ---------------------------------------

# Build bundles for Unity integrations
osx_unity3d_bundle:
Expand All @@ -219,17 +219,17 @@ ios_unity3d_bundle:
cd $(INT)/apple/ZeroTierSDK_Apple; xcodebuild -configuration Debug -scheme ZeroTierSDK_Unity3D_iOS build SYMROOT="../../../$(BUILD)/ios_unity3d_bundle"
cp docs/ios_unity3d.md $(BUILD)/ios_unity3d_bundle/README.md

# ---------------------------------------
# --------------- Intercept -------------
# ---------------------------------------
# ---------------------------------------
# --------------- Intercept -------------
# ---------------------------------------

osx_intercept:
# Use gcc not clang to build standalone intercept library since gcc is typically used for libc and we want to ensure maximal ABI compatibility
gcc $(DEFS) $(INCLUDES) -g -O2 -Wall -std=c99 -fPIC -DVERBOSE -D_GNU_SOURCE -DSDK_INTERCEPT -nostdlib -nostdlib -shared -o $(SDK_INTERCEPT) $(SDK_INTERCEPT_C_FILES) -ldl

# ---------------------------------------
# ----- Service Library Combinations ----
# ---------------------------------------
# ---------------------------------------
# ----- Service Library Combinations ----
# ---------------------------------------

# Build only the SDK service
ifeq ($(SDK_LWIP),1)
Expand All @@ -245,9 +245,15 @@ endif
# Build both intercept library and SDK service (separate)
osx_service_and_intercept: osx_intercept osx_sdk_service

ifeq ($(SDK_LWIP),1)
osx_static_lib: lwip $(OBJS)
$(CXX) $(CXXFLAGS) $(STACK_FLAGS) $(DEFS) $(INCLUDES) $(ZTFLAGS) -DSDK_SERVICE -DSDK -DSDK_BUNDLED $(LWIP_DRIVER_FILES) $(SDK_INTERCEPT_C_FILES) $(SDK_SERVICE_CPP_FILES) src/service.cpp -c
libtool -static -o build/libzt.a lwip.o proxy.o tap.o one.o OneService.o service.o sockets.o rpc.o intercept.o OneService.o $(OBJS)
else
osx_static_lib: pico $(OBJS)
$(CXX) $(CXXFLAGS) $(STACK_FLAGS) $(DEFS) $(INCLUDES) $(ZTFLAGS) -DSDK_SERVICE -DSDK -DSDK_BUNDLED $(PICO_DRIVER_FILES) $(SDK_INTERCEPT_C_FILES) $(SDK_SERVICE_CPP_FILES) src/service.cpp -c
libtool -static -o build/libzt.a picotcp.o proxy.o tap.o one.o OneService.o service.o sockets.o rpc.o intercept.o OneService.o $(OBJS)
endif

# Builds zts_* library tests
osx_static_lib_tests:
Expand Down
2 changes: 1 addition & 1 deletion src/stack_drivers/lwip/lwip.cpp
Expand Up @@ -107,7 +107,7 @@ namespace ZeroTier

#if defined(LWIP_IPV6)
#define DISCOVERY_INTERVAL 1000
#elif
#elif defined(LWIP_IPV4)
#define DISCOVERY_INTERVAL ARP_TMR_INTERVAL
#endif

Expand Down

0 comments on commit b576a1b

Please sign in to comment.