mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-02-13 22:22:32 +00:00
Fix the Apple Xcode 9.3 iOS build
The iOS build now produces two frameworks instead of one: - 'serval_dna' is the C API - 'ServalDNA' is the Swift API (daemon) The top-level modulemap file now produces a C API module called 'serval_dna' (renamed the library to libserval_dna.a) so that the Swift API code can be identical for iOS and non-iOS targets.
This commit is contained in:
parent
14903ca18d
commit
b6873c73dd
@ -1,6 +1,10 @@
|
|||||||
# These public library headers are designed for re-use, and do not depend on
|
# These public library headers are designed for re-use, and do not depend on
|
||||||
# any PUBLIC_HDRS or PRIVATE_HDRS.
|
# any PUBLIC_HDRS or PRIVATE_HDRS.
|
||||||
LIB_HDRS= \
|
LIB_HDRS= \
|
||||||
|
cli.h \
|
||||||
|
log.h \
|
||||||
|
log_output.h \
|
||||||
|
log_output_delegate.h \
|
||||||
lang.h \
|
lang.h \
|
||||||
feature.h \
|
feature.h \
|
||||||
section.h \
|
section.h \
|
||||||
@ -18,20 +22,18 @@ LIB_HDRS= \
|
|||||||
mem.h \
|
mem.h \
|
||||||
os.h \
|
os.h \
|
||||||
strbuf_helpers.h \
|
strbuf_helpers.h \
|
||||||
log.h \
|
|
||||||
log_output.h \
|
|
||||||
debug.h \
|
|
||||||
rotbuf.h \
|
rotbuf.h \
|
||||||
fifo.h \
|
fifo.h \
|
||||||
cli.h \
|
|
||||||
fdqueue.h \
|
fdqueue.h \
|
||||||
http_server.h \
|
http_server.h \
|
||||||
nibble_tree.h
|
nibble_tree.h \
|
||||||
|
limit.h
|
||||||
|
|
||||||
# These headers are specific to Serval DNA, and may depend on LIB_HDRS. They
|
# These headers are specific to Serval DNA, and may depend on LIB_HDRS. They
|
||||||
# are exposed by the iOS framework module, so they are accessible to Swift code
|
# are exposed by the iOS framework module, so they are accessible to Swift code
|
||||||
# in Xcode projects.
|
# in Xcode projects.
|
||||||
PUBLIC_HDRS= \
|
PUBLIC_HDRS= \
|
||||||
|
commandline.h \
|
||||||
constants.h \
|
constants.h \
|
||||||
conf.h \
|
conf.h \
|
||||||
conf_schema.h \
|
conf_schema.h \
|
||||||
@ -41,14 +43,12 @@ PUBLIC_HDRS= \
|
|||||||
rhizome_types.h \
|
rhizome_types.h \
|
||||||
dataformats.h \
|
dataformats.h \
|
||||||
sighandlers.h \
|
sighandlers.h \
|
||||||
commandline.h \
|
|
||||||
crypto.h \
|
crypto.h \
|
||||||
server.h \
|
server.h \
|
||||||
servald_main.h \
|
servald_main.h \
|
||||||
sync_keys.h \
|
sync_keys.h \
|
||||||
keyring.h \
|
keyring.h \
|
||||||
route_link.h \
|
route_link.h \
|
||||||
limit.h \
|
|
||||||
overlay_buffer.h \
|
overlay_buffer.h \
|
||||||
overlay_address.h \
|
overlay_address.h \
|
||||||
overlay_packet.h \
|
overlay_packet.h \
|
||||||
@ -73,6 +73,7 @@ SQLITE3_HDRS = $(SQLITE3_AMALGAMATION)/sqlite3.h
|
|||||||
# headers. They are not exposed by the iOS framework module, so are
|
# headers. They are not exposed by the iOS framework module, so are
|
||||||
# inaccessible to Swift code in Xcode projects.
|
# inaccessible to Swift code in Xcode projects.
|
||||||
PRIVATE_HDRS= \
|
PRIVATE_HDRS= \
|
||||||
|
debug.h \
|
||||||
httpd.h \
|
httpd.h \
|
||||||
msp_common.h \
|
msp_common.h \
|
||||||
overlay_interface.h \
|
overlay_interface.h \
|
||||||
|
182
ios/configure
vendored
182
ios/configure
vendored
@ -89,8 +89,9 @@ fatal() {
|
|||||||
# Parse command-line options.
|
# Parse command-line options.
|
||||||
|
|
||||||
parse_command_line() {
|
parse_command_line() {
|
||||||
library=libservaldaemon.a
|
c_api_library=libservaldaemon.a
|
||||||
swiftmodule=ServalDNA.swiftmodule
|
swift_api_library=libServalDNA.a
|
||||||
|
swift_api_module=ServalDNA.swiftmodule
|
||||||
ios_version=
|
ios_version=
|
||||||
opt_force_configure=false
|
opt_force_configure=false
|
||||||
opt_force_config_status=false
|
opt_force_config_status=false
|
||||||
@ -293,138 +294,189 @@ create_makefile() {
|
|||||||
srcdir=$SERVAL_DNA_DIR_RELATIVE_TO_SCRIPT_DIR
|
srcdir=$SERVAL_DNA_DIR_RELATIVE_TO_SCRIPT_DIR
|
||||||
dstdir=frameworks
|
dstdir=frameworks
|
||||||
targets=${TARGETS[*]}
|
targets=${TARGETS[*]}
|
||||||
|
bundle_id_prefix=org.servalproject.
|
||||||
|
xcconfig=\$(dstdir)/serval-dna.xcconfig
|
||||||
|
|
||||||
fw_name=ServalDNA
|
fw_capi_name=serval_dna
|
||||||
fw_version=A
|
fw_capi_version=A
|
||||||
fw_bundle_id=org.servalproject.serval-dna
|
fw_capi_bundle_id=\$(bundle_id_prefix)\$(fw_capi_name)
|
||||||
fw_bundle_version=1.0
|
fw_capi_bundle_version=1.0
|
||||||
|
fw_capi_dir=\$(dstdir)/\$(fw_capi_name).framework
|
||||||
|
fw_capi_dstdir=\$(fw_capi_dir)/Versions/\$(fw_capi_version)
|
||||||
|
fw_capi_library=\$(fw_capi_dstdir)/\$(fw_capi_name)
|
||||||
|
fw_capi_info_plist=\$(fw_capi_dstdir)/Resources/Info.plist
|
||||||
|
fw_capi_config_headers=\$(targets:%=\$(fw_capi_dstdir)/Headers/%/config.h)
|
||||||
|
fw_capi_serval_headers=\$(addprefix \$(fw_capi_dstdir)/Headers/, \$(LIB_HDRS) \$(PUBLIC_HDRS))
|
||||||
|
fw_capi_sqlite3_headers=\$(addprefix \$(fw_capi_dstdir)/Headers/, \$(notdir \$(SQLITE3_HDRS)))
|
||||||
|
fw_capi_modulemap=\$(fw_capi_dstdir)/Modules/module.modulemap
|
||||||
|
|
||||||
fw_dir=\$(dstdir)/\$(fw_name).framework
|
fw_swiftapi_name=${swift_api_module%.swiftmodule}
|
||||||
fw_dstdir=\$(fw_dir)/Versions/\$(fw_version)
|
fw_swiftapi_version=A
|
||||||
fw_library=\$(fw_dstdir)/\$(fw_name)
|
fw_swiftapi_bundle_id=\$(bundle_id_prefix)\$(fw_swiftapi_name)
|
||||||
fw_swiftmodule=\$(fw_dstdir)/Modules/\$(fw_name).swiftmodule
|
fw_swiftapi_bundle_version=1.0
|
||||||
fw_info_plist=\$(fw_dstdir)/Resources/Info.plist
|
fw_swiftapi_dir=\$(dstdir)/\$(fw_swiftapi_name).framework
|
||||||
fw_config_headers=\$(targets:%=\$(fw_dstdir)/Headers/%/config.h)
|
fw_swiftapi_dstdir=\$(fw_swiftapi_dir)/Versions/\$(fw_swiftapi_version)
|
||||||
fw_serval_headers=\$(addprefix \$(fw_dstdir)/Headers/, \$(LIB_HDRS) \$(PUBLIC_HDRS))
|
fw_swiftapi_module=\$(fw_swiftapi_dstdir)/Modules/$swift_api_module
|
||||||
fw_sqlite3_headers=\$(addprefix \$(fw_dstdir)/Headers/, \$(notdir \$(SQLITE3_HDRS)))
|
fw_swiftapi_library=\$(fw_swiftapi_dstdir)/\$(fw_swiftapi_name)
|
||||||
fw_modulemap=\$(fw_dstdir)/Modules/module.modulemap
|
fw_swiftapi_info_plist=\$(fw_swiftapi_dstdir)/Resources/Info.plist
|
||||||
xcconfig=\$(dstdir)/\$(fw_name).xcconfig
|
|
||||||
|
|
||||||
include \$(srcdir)/headerfiles.mk
|
include \$(srcdir)/headerfiles.mk
|
||||||
|
|
||||||
.PHONY: all \\
|
.PHONY: all \\
|
||||||
clean\
|
clean\
|
||||||
$(foreach_target echo '" \\"' \; \
|
$(foreach_target echo '" \\"' \; \
|
||||||
echo '" install_${target_var}_sodium_headers \\"' \; \
|
|
||||||
echo '" $target_dir/$library \\"' \; \
|
|
||||||
echo '" $target_dir/$swiftmodule \\"' \; \
|
|
||||||
echo -n '" clean-$target"')
|
echo -n '" clean-$target"')
|
||||||
|
|
||||||
all: \$(fw_library) \\
|
all: fw_capi fw_swiftapi \$(xcconfig)
|
||||||
\$(fw_info_plist) \\
|
|
||||||
\$(fw_config_headers) \\
|
|
||||||
\$(fw_serval_headers) \\
|
|
||||||
\$(fw_sqlite3_headers) \\
|
|
||||||
\$(fw_modulemap) \\
|
|
||||||
\$(xcconfig)$(foreach_target echo '" \\"' \; \
|
|
||||||
echo -n '" install_${target_var}_sodium_headers"' \; \
|
|
||||||
echo -n '" \$(fw_swiftmodule)/$arch.swiftmodule"')
|
|
||||||
cd \$(fw_dstdir)/.. && ln -snf \$(fw_version) Current
|
|
||||||
cd \$(fw_dstdir)/../.. && ln -snf Versions/Current/* .
|
|
||||||
|
|
||||||
\$(fw_info_plist): ./info-plist.sh
|
# The C API is in a framework that contains a multi-slice (multi-architecture)
|
||||||
|
# static library file and accompanying header files.
|
||||||
|
|
||||||
|
.PHONY: fw_capi
|
||||||
|
fw_capi: \$(fw_capi_info_plist) \\
|
||||||
|
\$(fw_capi_library) \\
|
||||||
|
\$(fw_capi_config_headers) \\
|
||||||
|
\$(fw_capi_serval_headers) \\
|
||||||
|
\$(fw_capi_sqlite3_headers) \\
|
||||||
|
\$(fw_capi_modulemap)
|
||||||
|
cd \$(fw_capi_dstdir)/.. && ln -snf \$(fw_capi_version) Current
|
||||||
|
cd \$(fw_capi_dstdir)/../.. && ln -snf Versions/Current/* .
|
||||||
|
|
||||||
|
\$(fw_capi_info_plist): ./info-plist.sh
|
||||||
mkdir -p \$(dir \$@)
|
mkdir -p \$(dir \$@)
|
||||||
./info-plist.sh \$(fw_name) \$(fw_bundle_id) \$(fw_bundle_version) >\$@
|
./info-plist.sh \$(fw_capi_name) \$(fw_capi_bundle_id) \$(fw_capi_bundle_version) >\$@
|
||||||
|
|
||||||
\$(fw_library):$(foreach_target echo '" \\"' \; \
|
\$(fw_capi_library):$(foreach_target echo '" \\"' \; \
|
||||||
echo -n '" $target_dir/$library"')
|
echo -n '" $target_dir/$c_api_library"')
|
||||||
mkdir -p \$(dir \$@)
|
mkdir -p \$(dir \$@)
|
||||||
lipo -create -output \$@ \$^
|
lipo -create -output \$@ \$^
|
||||||
|
|
||||||
$(foreach_target echo '"\$(fw_swiftmodule)/$arch.swiftmodule: $target_dir/$swiftmodule"' \; \
|
\$(fw_capi_config_headers): \$(fw_capi_dstdir)/Headers/%: build/%
|
||||||
echo '" mkdir -p \$(dir \$@)"' \; \
|
|
||||||
echo '" cp \$< \$@"' \; \
|
|
||||||
echo)
|
|
||||||
|
|
||||||
\$(fw_config_headers): \$(fw_dstdir)/Headers/%: build/%
|
|
||||||
mkdir -p \$(dir \$@)
|
mkdir -p \$(dir \$@)
|
||||||
cp \$< \$@
|
cp \$< \$@
|
||||||
|
|
||||||
\$(fw_serval_headers): \$(fw_dstdir)/Headers/%: \$(srcdir)/%
|
\$(fw_capi_serval_headers): \$(fw_capi_dstdir)/Headers/%: \$(srcdir)/%
|
||||||
mkdir -p \$(dir \$@)
|
mkdir -p \$(dir \$@)
|
||||||
cp \$< \$@
|
cp \$< \$@
|
||||||
|
|
||||||
\$(fw_sqlite3_headers): \$(fw_dstdir)/Headers/%: \$(srcdir)/\$(SQLITE3_AMALGAMATION)/%
|
\$(fw_capi_sqlite3_headers): \$(fw_capi_dstdir)/Headers/%: \$(srcdir)/\$(SQLITE3_AMALGAMATION)/%
|
||||||
mkdir -p \$(dir \$@)
|
mkdir -p \$(dir \$@)
|
||||||
cp \$< \$@
|
cp \$< \$@
|
||||||
|
|
||||||
\$(fw_modulemap):$(foreach_target echo '" \\"' \; \
|
\$(fw_capi_modulemap):$(foreach_target echo '" \\"' \; \
|
||||||
echo -n '" install_${target_var}_sodium_headers"') \\
|
echo -n '" install_${target_var}_sodium_headers"') \\
|
||||||
\$(srcdir)/headerfiles.mk Makefile
|
\$(srcdir)/headerfiles.mk Makefile
|
||||||
mkdir -p \$(dir \$@)
|
mkdir -p \$(dir \$@)
|
||||||
@{ \\
|
@{ \\
|
||||||
echo '/*' \\
|
echo '/*' \\
|
||||||
echo 'module.modulemap for Serval DNA on Apple iOS' ;\\
|
echo 'module.modulemap for Serval DNA C API on Apple iOS' ;\\
|
||||||
echo 'Copyright 2017 Flinders University' ;\\
|
echo 'Copyright 2017 Flinders University' ;\\
|
||||||
echo 'This file was auto-generated by \$(abspath Makefile)' ;\\
|
echo 'This file was auto-generated by \$(abspath Makefile)' ;\\
|
||||||
echo '\$(shell date)' ;\\
|
echo '\$(shell date)' ;\\
|
||||||
|
echo 'The naming and structure of this file must match ../modules.modulemap' ;\\
|
||||||
echo '*/' ;\\
|
echo '*/' ;\\
|
||||||
echo 'framework module ServalDNA {' ;\\
|
echo 'framework module serval_dna {' ;\\
|
||||||
echo ' requires tls // thread-local storage' ;\\
|
echo ' requires tls // thread-local storage' ;\\
|
||||||
echo ' explicit module Daemon {' ;\\
|
echo ' explicit module lib {' ;\\
|
||||||
echo ' export Sodium' ;\\
|
|
||||||
$(foreach_target echo '" echo '\'' header \"$target/config.h\"'\'' ;\\"')
|
$(foreach_target echo '" echo '\'' header \"$target/config.h\"'\'' ;\\"')
|
||||||
for header in \$(LIB_HDRS) \$(PUBLIC_HDRS) \$(notdir \$(SQLITE3_HDRS)); do \\
|
for header in \$(LIB_HDRS); do \\
|
||||||
echo " header \"\$\$header\"" ;\\
|
echo " header \"\$\$header\"" ;\\
|
||||||
done ; \\
|
done ;\\
|
||||||
echo ' }' ;\\
|
echo ' }' ;\\
|
||||||
echo ' explicit module Sodium {' ;\\
|
echo ' explicit module daemon {' ;\\
|
||||||
|
echo ' export lib' ;\\
|
||||||
|
echo ' export sqlite' ;\\
|
||||||
|
echo ' export sodium' ;\\
|
||||||
|
for header in \$(PUBLIC_HDRS); do \\
|
||||||
|
echo " header \"\$\$header\"" ;\\
|
||||||
|
done ;\\
|
||||||
|
echo ' }' ;\\
|
||||||
|
echo ' explicit module sqlite {' ;\\
|
||||||
|
for header in \$(notdir \$(SQLITE3_HDRS)); do \\
|
||||||
|
echo " header \"\$\$header\"" ;\\
|
||||||
|
done ;\\
|
||||||
|
echo ' }' ;\\
|
||||||
|
echo ' explicit module sodium {' ;\\
|
||||||
$(foreach_target echo '" echo '\'' header \"$target/sodium.h\"'\'' ;\\"' \; \
|
$(foreach_target echo '" echo '\'' header \"$target/sodium.h\"'\'' ;\\"' \; \
|
||||||
echo '" (cd $target_dir/libsodium-dev/include/; find . -type f -print | sed -e '\''s|^\./||'\'' -e '\''s|.*| header \"$target/&\"|'\'' ) ;\\"')
|
echo '" (cd $target_dir/libsodium-dev/include/; find . -type f -print | sed -e '\''s|^\./||'\'' -e '\''s|.*| header \"$target/&\"|'\'' ) ;\\"')
|
||||||
echo ' }' ;\\
|
echo ' }' ;\\
|
||||||
echo '}' ;\\
|
echo '}' ;\\
|
||||||
echo 'module ifaddrs [system] [extern_c] {' ;\\
|
|
||||||
echo ' header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/ifaddrs.h"' ;\\
|
|
||||||
echo ' export *' ;\\
|
|
||||||
echo '}' ;\\
|
|
||||||
echo 'module inttypes [system] [extern_c] {' ;\\
|
echo 'module inttypes [system] [extern_c] {' ;\\
|
||||||
echo ' header "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/clang/include/inttypes.h"' ;\\
|
echo ' header "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/clang/include/inttypes.h"' ;\\
|
||||||
echo ' export *' ;\\
|
echo ' export *' ;\\
|
||||||
echo '}' ;\\
|
echo '}' ;\\
|
||||||
} >\$@
|
} >\$@
|
||||||
|
|
||||||
|
# The Swift API is in a framework that contains one Swift module file per
|
||||||
|
# architecture. and a multi-slice (multi-architecture) static library file.
|
||||||
|
|
||||||
|
.PHONY: fw_swiftapi
|
||||||
|
fw_swiftapi: \$(fw_swiftapi_info_plist) \\
|
||||||
|
\$(fw_swiftapi_library) \\
|
||||||
|
$(foreach_target echo '" \\"' \; \
|
||||||
|
echo -n '" \$(fw_swiftapi_module)/$arch.swiftmodule"')
|
||||||
|
cd \$(fw_swiftapi_dstdir)/.. && ln -snf \$(fw_capi_version) Current
|
||||||
|
cd \$(fw_swiftapi_dstdir)/../.. && ln -snf Versions/Current/* .
|
||||||
|
|
||||||
|
\$(fw_swiftapi_info_plist): ./info-plist.sh
|
||||||
|
mkdir -p \$(dir \$@)
|
||||||
|
./info-plist.sh \$(fw_swiftapi_name) \$(fw_swiftapi_bundle_id) \$(fw_swiftapi_bundle_version) >\$@
|
||||||
|
|
||||||
|
\$(fw_swiftapi_library):$(foreach_target echo '" \\"' \; \
|
||||||
|
echo -n '" $target_dir/$swift_api_library"')
|
||||||
|
mkdir -p \$(dir \$@)
|
||||||
|
lipo -create -output \$@ \$^
|
||||||
|
|
||||||
|
$(foreach_target echo '"\$(fw_swiftapi_module)/$arch.swiftmodule: $target_dir/$swift_api_module"' \; \
|
||||||
|
echo '" mkdir -p \$(dir \$@)"' \; \
|
||||||
|
echo '" cp \$< \$@"' \; \
|
||||||
|
echo)
|
||||||
|
|
||||||
\$(xcconfig): Makefile
|
\$(xcconfig): Makefile
|
||||||
mkdir -p \$(dir \$@)
|
mkdir -p \$(dir \$@)
|
||||||
|
@echo "create \$@"
|
||||||
@{ \\
|
@{ \\
|
||||||
echo '// ServalDNA.xcconfig for Serval DNA on Apple iOS' ;\\
|
echo '// \$(notdir \$@) for Serval DNA on Apple iOS' ;\\
|
||||||
echo '// Copyright 2017 Flinders University' ;\\
|
echo '// Copyright 2018 Flinders University' ;\\
|
||||||
echo '// This file was auto-generated by \$(abspath Makefile)' ;\\
|
echo '// This file was auto-generated by \$(abspath Makefile)' ;\\
|
||||||
echo '// \$(shell date)' ;\\
|
echo '// \$(shell date)' ;\\
|
||||||
echo 'SERVAL_DNA_FRAMEWORK_DIR = \$(abspath \$(fw_dir))' ;\\
|
|
||||||
echo 'FRAMEWORK_SEARCH_PATHS = \$\$(inherited) \$(abspath \$(dstdir))' ;\\
|
echo 'FRAMEWORK_SEARCH_PATHS = \$\$(inherited) \$(abspath \$(dstdir))' ;\\
|
||||||
echo 'GCC_PREPROCESSOR_DEFINITIONS = \$\$(inherited) HAVE_CONFIG_H=1' ;\\
|
echo 'GCC_PREPROCESSOR_DEFINITIONS = \$\$(inherited) HAVE_CONFIG_H=1' ;\\
|
||||||
$(foreach_target echo '" echo '\''HEADER_SEARCH_PATHS[arch=$arch] = \$\$(inherited) \$\$(SERVAL_DNA_FRAMEWORK_DIR)/Headers/$target'\'' ;\\"')
|
$(foreach_target echo '" echo '\''HEADER_SEARCH_PATHS[arch=$arch] = \$\$(inherited) \$(abspath \$(fw_capi_dir))/Headers/$target'\'' ;\\"')
|
||||||
echo 'SWIFT_INCLUDE_PATHS = \$\$(inherited) \$\$(SERVAL_DNA_FRAMEWORK_DIR)/Modules' ;\\
|
echo 'SWIFT_VERSION = 4.1' ;\\
|
||||||
echo 'OTHER_SWIFT_FLAGS = \$\$(inherited) -Xcc -DHAVE_CONFIG_H=1' ;\\
|
echo 'OTHER_SWIFT_FLAGS = \$\$(inherited) -Xcc -DHAVE_CONFIG_H=1' ;\\
|
||||||
} >\$@
|
} >\$@
|
||||||
|
|
||||||
$(foreach_target echo \; \
|
$(foreach_target echo \; \
|
||||||
echo '"install_${target_var}_sodium_headers: $target_dir/$library"' \; \
|
echo '".PHONY: install_${target_var}_sodium_headers"' \; \
|
||||||
echo '" cp -R $target_dir/libsodium-dev/include/ \$(fw_dstdir)/Headers/$target/"')
|
echo '"install_${target_var}_sodium_headers: $target_dir/$c_api_library"' \; \
|
||||||
|
echo '" cp -R $target_dir/libsodium-dev/include/ \$(fw_capi_dstdir)/Headers/$target/"')
|
||||||
|
|
||||||
|
# Recursive make targets.
|
||||||
|
#
|
||||||
# If the source directory is already configured, then its config.h header
|
# If the source directory is already configured, then its config.h header
|
||||||
# file would interfere with these sub-makes, so delete it before invoking
|
# file would interfere with these sub-makes, so delete it before invoking
|
||||||
# each sub-make.
|
# each sub-make.
|
||||||
|
|
||||||
$(foreach_target echo \; \
|
$(foreach_target echo \; \
|
||||||
echo '"$target_dir/$library:"' \; \
|
echo '".PHONY: $target_dir/$c_api_library"' \; \
|
||||||
|
echo '"$target_dir/$c_api_library:"' \; \
|
||||||
echo '" \$(RM) \$(srcdir)/config.h"' \; \
|
echo '" \$(RM) \$(srcdir)/config.h"' \; \
|
||||||
echo '" \$(MAKE) -C $target_dir $library"')
|
echo '" \$(MAKE) -C $target_dir $c_api_library"')
|
||||||
|
|
||||||
$(foreach_target echo \; \
|
$(foreach_target echo \; \
|
||||||
echo '"$target_dir/$swiftmodule:"' \; \
|
echo '".PHONY: $target_dir/$swift_api_library"' \; \
|
||||||
|
echo '"$target_dir/$swift_api_library:"' \; \
|
||||||
echo '" \$(RM) \$(srcdir)/config.h"' \; \
|
echo '" \$(RM) \$(srcdir)/config.h"' \; \
|
||||||
echo '" \$(MAKE) -C $target_dir $swiftmodule"')
|
echo '" \$(MAKE) -C $target_dir $swift_api_library"')
|
||||||
|
|
||||||
|
$(foreach_target echo \; \
|
||||||
|
echo '".PHONY: $target_dir/$swift_api_module"' \; \
|
||||||
|
echo '"$target_dir/$swift_api_module:"' \; \
|
||||||
|
echo '" \$(RM) \$(srcdir)/config.h"' \; \
|
||||||
|
echo '" \$(MAKE) -C $target_dir $swift_api_module"')
|
||||||
|
|
||||||
|
# Clean targets.
|
||||||
|
|
||||||
clean: $(foreach_target echo -n '" clean-$target"')
|
clean: $(foreach_target echo -n '" clean-$target"')
|
||||||
\$(RM) -r \$(dstdir)
|
\$(RM) -r \$(dstdir)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Serval DNA Swift module map
|
Serval DNA Swift module map
|
||||||
Copyright (C) 2016-2017 Flinders University
|
Copyright (C) 2016-2018 Flinders University
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
@ -17,18 +17,19 @@ along with this program; if not, write to the Free Software
|
|||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
module servald {
|
module serval_dna {
|
||||||
|
|
||||||
requires tls // thread-local storage
|
requires tls // thread-local storage
|
||||||
|
|
||||||
module cli {
|
explicit module lib {
|
||||||
header "commandline.h"
|
|
||||||
header "cli.h"
|
header "cli.h"
|
||||||
}
|
|
||||||
|
|
||||||
module log {
|
|
||||||
header "log.h"
|
header "log.h"
|
||||||
header "log_output.h"
|
header "log_output.h"
|
||||||
header "log_output_delegate.h"
|
header "log_output_delegate.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
explicit module daemon {
|
||||||
|
export lib
|
||||||
|
header "commandline.h"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
import servald.cli
|
import serval_dna.lib
|
||||||
|
|
||||||
private extension Data {
|
private extension Data {
|
||||||
var hexUpper: String {
|
var hexUpper: String {
|
||||||
|
@ -18,7 +18,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
import servald.cli
|
import serval_dna.daemon
|
||||||
|
|
||||||
/* A Swift entry point to the Serval DNA daemon command-line entry point, which takes a
|
/* A Swift entry point to the Serval DNA daemon command-line entry point, which takes a
|
||||||
* [String] parameter, converts it into an argv array of C strings, and invokes
|
* [String] parameter, converts it into an argv array of C strings, and invokes
|
||||||
|
@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software
|
|||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import servald.log
|
import serval_dna.lib
|
||||||
|
|
||||||
private func serval_log(level: CInt, format: String, va_list: CVaListPointer) {
|
private func serval_log(level: CInt, format: String, va_list: CVaListPointer) {
|
||||||
format.withCString { CString in
|
format.withCString { CString in
|
||||||
|
@ -18,7 +18,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
import servald.log
|
import serval_dna.lib
|
||||||
|
|
||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user