mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-01-30 16:13:51 +00:00
Progress towards building NaCl in with DNA as a total shared library.
Fixed big problem with building of NaCl include files. Some issues remain, working on those now.
This commit is contained in:
parent
f55a6525a2
commit
89e72e35e9
@ -24,6 +24,7 @@ LOCAL_SRC_FILES:= \
|
||||
dna.c \
|
||||
hlrdata.c \
|
||||
peers.c \
|
||||
randombytes.c \
|
||||
simulate.c
|
||||
|
||||
LOCAL_MODULE:= dna
|
||||
@ -38,5 +39,5 @@ LOCAL_CFLAGS += \
|
||||
-DHAVE_STRING_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_SOCKET_H=1 \
|
||||
-DHAVE_SYS_MMAN_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_POLL_H=1 -DHAVE_NETDB_H=1
|
||||
|
||||
include $(BUILD_EXECUTABLE)
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
|
@ -17,9 +17,17 @@ chmod 755 nacl-prepare-sources
|
||||
./nacl-prepare-sources
|
||||
cd nacl-source
|
||||
|
||||
# Now build Android.mk with the extra .c files listed
|
||||
sources=`echo -n *.c`
|
||||
cat ../../../Android-without-nacl.mk | sed -e 's/LOCAL_SRC_FILES:= \\/LOCAL_SRC_FILES:= '"${sources}"' \\/' > ../../../Android.mk
|
||||
ls -1 *.h | grep -v mphlr.h | sed -e 's,^,#include ",' -e 's,$,",' > nacl.h
|
||||
|
||||
ls -1 *.h >../../../nacl-sources.list
|
||||
|
||||
mv *.h ../../../
|
||||
cd ../../../
|
||||
|
||||
echo `ls -1 nacl-source/*/nacl-source/*/*.c` >>nacl-sources.list
|
||||
|
||||
# Now build Android.mk with the extra .c files listed
|
||||
sources=`echo nacl-source/*/nacl-source/*/*.c`
|
||||
echo sed -e 's,LOCAL_SRC_FILES:= \\,LOCAL_SRC_FILES:= '"${sources}"' \\,'
|
||||
cat Android-without-nacl.mk | sed -e 's,LOCAL_SRC_FILES:= \\,LOCAL_SRC_FILES:= '"${sources}"' \\,' > Android.mk
|
||||
|
||||
ls -1 *.c *.h >../../../nacl-sources.list
|
||||
mv *.c *.h ../../../
|
||||
|
@ -69,14 +69,17 @@ do
|
||||
sfiles=`ls "$implementationdir" | grep '\.[sS]$' || :`
|
||||
cppfiles=`ls "$o" | grep '\.cpp$' || :`
|
||||
|
||||
cp -p "$o"/*.c "$work"
|
||||
cp -p "$o"/*.cpp "$work"
|
||||
mkdir -p "${work}/${o}"
|
||||
cp -p "$o"/*.c "$work/${o}"
|
||||
|
||||
cp -pr "$implementationdir"/* "$work"
|
||||
cp -pr "$implementationdir"/* "$work/${o}"
|
||||
|
||||
rm ${work}/${o}/{measure,try}.c
|
||||
|
||||
cp -p MACROS "$work/MACROS"
|
||||
cp -p PROTOTYPES.c "$work/compile/PROTOTYPES.c"
|
||||
cp -p PROTOTYPES.cpp "$work/compile/PROTOTYPES.cpp"
|
||||
cp -p PROTOTYPES.c "$work/PROTOTYPES.c"
|
||||
cp -p PROTOTYPES.cpp "$work/PROTOTYPES.cpp"
|
||||
cp $implementationdir/api.h "$work"
|
||||
|
||||
(
|
||||
cd "$work"
|
||||
@ -97,6 +100,7 @@ do
|
||||
echo ""
|
||||
echo "#endif"
|
||||
) > "$o.h"
|
||||
|
||||
(
|
||||
echo "#ifndef ${op}_H"
|
||||
echo "#define ${op}_H"
|
||||
|
Loading…
x
Reference in New Issue
Block a user