Update build scripts

Optimize codes.
This commit is contained in:
Tindy X committed 2020-07-06 17:57:07 +08:00
1 parent 1f0b0b1ba8
commit 24550625ee
4 files changed
+36 -11

No files matched your search

+2 -2
View File
@@ -15,14 +15,14 @@ RUN apk add --no-cache --virtual .build-tools git g++ build-base linux-headers c
cc -c -O3 -o duk_module_node.o -I. ../extras/module-node/duk_module_node.c && \
ar cr libduktape.a duktape.o && \
ar cr libduktape_module.a duk_module_node.o && \
install -m0644 *.a /usr/lib && \
install -m0644 ./*.a /usr/lib && \
install -m0644 duk*.h /usr/include && \
install -m0644 ../extras/module-node/duk_module_node.h /usr/include && \
cd ../../../.. && \
rm -rf duktape /usr/lib/python2.7 && \
git clone https://github.com/tindy2013/subconverter --depth=1 && \
cd subconverter && \
cmake . && \
cmake -DCMAKE_BUILD_TYPE=Release . && \
make -j4 && \
mv subconverter base/ && \
mv base ../ && \
+1 -1
View File
@@ -33,7 +33,7 @@ install -m0644 ../extras/module-node/duk_module_node.h /usr/include
cd ../../../..
export PKG_CONFIG_PATH=/usr/lib64/pkgconfig
cmake .
cmake -DCMAKE_BUILD_TYPE=Release .
make -j2
rm subconverter
g++ -o base/subconverter $(find CMakeFiles/subconverter.dir/src/ -name "*.o") -static -lpcre2-8 -levent -lyaml-cpp -L/usr/lib64 -lcurl -lmbedtls -lmbedcrypto -lmbedx509 -lz -lduktape -lduktape_module -O3 -s
+1 -4
View File
@@ -32,14 +32,11 @@ install -m0644 ./duk*.h /usr/local/include
install -m0644 ../extras/module-node/duk_module_node.h /usr/local/include
cd ../../../..
cp curl/lib/libcurl.a .
cp yaml-cpp/libyaml-cpp.a .
cp duktape/dist/source/src/*.a .
cp /usr/local/lib/libevent.a .
cp /usr/local/opt/zlib/lib/libz.a .
cp /usr/local/lib/libpcre2-8.a .
cmake .
cmake -DCMAKE_BUILD_TYPE=Release .
make -j8
rm subconverter
c++ -Xlinker -unexported_symbol -Xlinker "*" -o base/subconverter -framework CoreFoundation -framework Security $(find CMakeFiles/subconverter.dir/src/ -name "*.o") $(find . -name "*.a") -O3