Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[feature] build: support for optional libraries, enabled libnattraver…

…sal if dependencies available
  • Loading branch information...
commit 8a40e70765262f0f5ace64888248d817142294a0 1 parent 461365b
Louis Gesbert authored
View
8 Makefile
@@ -11,13 +11,17 @@ include config.make
INSTALL ?= cp -u -L
+OPAOPT += "--rebuild"
+
+ifneq ($(HAS_CAMLIDL)$(HAS_LIBNATPMP)$(HAS_MINIUPNPC),111)
+export DISABLED_LIBS = libnattraversal
+endif
+
.PHONY: default
default: all
include build/Makefile.bld
-OPAOPT += "--rebuild"
-
export
##
View
2  build/Makefile.bld
@@ -103,6 +103,8 @@ $(BUILD_DIR)/build_libs.make: $(BUILD_LIBS)
}' \
$(^F) > $@
+ALL_LIBS := $(filter-out $(DISABLED_LIBS),$(ALL_LIBS))
+
target-libs = $(addsuffix .cmxa,$(1))
.PHONY: libs
View
6 build/gen_myocamlbuild.sh
@@ -97,8 +97,10 @@ mkdir -p $BUILD_DIR
for i in $BUILD_LIBS; do
if [ -e "$i" ]; then
echo "#1 \"$i\""
- awk '/^external/ { print "mlstate_lib ~dir:\"lib/opa/static\" \""$2"\";" }
- /^internal/ { print "internal_lib", $3 ? "~dir:\""$3"\"" : "", "\""$2"\";" }' $i
+ awk 'BEGIN { split (ENVIRON["DISABLED_LIBS"],a); for (i in a) disabled[a[i]] = 1 }
+ /^external/ { print "mlstate_lib ~dir:\"lib/opa/static\" \""$2"\";" }
+ /^internal/ && ! ($2 in disabled) \
+ { print "internal_lib", $3 ? "~dir:\""$3"\"" : "", "\""$2"\";" }' $i
fi
done
for i in $BUILD_RULES; do
View
1  build_libs
@@ -44,6 +44,7 @@ internal opapasses passes
internal appruntime
internal libsecurity
internal libnet
+internal libnattraversal libnet/nattraversal
internal libirc
internal libtools
internal protocols
Please sign in to comment.
Something went wrong with that request. Please try again.