Updated C core and cli build and scripts.
This commit is contained in:
parent
8ca8ef7aab
commit
ee0ca569f5
12
.gitignore
vendored
12
.gitignore
vendored
@ -37,14 +37,14 @@ target
|
||||
dependency-reduced-pom.xml
|
||||
|
||||
# C
|
||||
desktop/cli/c/*.o
|
||||
desktop/cli/c/mpw-*.tar.gz
|
||||
desktop/cli/c/mpw
|
||||
desktop/cli/c/mpw-bench
|
||||
desktop/cli/c/mpw-tests
|
||||
desktop/cli/c/VERSION
|
||||
core/c/*.o
|
||||
core/c/lib/*/.unpacked
|
||||
core/c/lib/*/.patched
|
||||
core/c/lib/*/src
|
||||
core/c/lib/include
|
||||
platform-independent/cli-c/cli/*.o
|
||||
platform-independent/cli-c/mpw-*.tar.gz
|
||||
platform-independent/cli-c/mpw
|
||||
platform-independent/cli-c/mpw-bench
|
||||
platform-independent/cli-c/mpw-tests
|
||||
platform-independent/cli-c/VERSION
|
||||
|
@ -217,26 +217,28 @@ mpw() {
|
||||
echo
|
||||
echo "Building target: $target..."
|
||||
local CFLAGS=(
|
||||
# include paths
|
||||
# library paths
|
||||
-I"lib/include"
|
||||
# mpw paths
|
||||
-I"core" -I"cli"
|
||||
)
|
||||
local LDFLAGS=(
|
||||
# scrypt
|
||||
"lib/scrypt/src/libcperciva/"*/*.o
|
||||
"lib/scrypt/src/lib/crypto/"*.o
|
||||
# library paths
|
||||
-L"." -L"lib/scrypt/src"
|
||||
-L"lib/scrypt/src"
|
||||
# link libraries
|
||||
-l"crypto"
|
||||
)
|
||||
# optional features
|
||||
(( mpw_color )) && CFLAGS+=( -DCOLOR ) LDFLAGS+=( -l"curses" )
|
||||
|
||||
cc "${CFLAGS[@]}" "$@" -c mpw-algorithm.c -o mpw-algorithm.o
|
||||
cc "${CFLAGS[@]}" "$@" -c mpw-types.c -o mpw-types.o
|
||||
cc "${CFLAGS[@]}" "$@" -c mpw-util.c -o mpw-util.o
|
||||
cc "${CFLAGS[@]}" "$@" "mpw-algorithm.o" "mpw-types.o" "mpw-util.o" \
|
||||
"${LDFLAGS[@]}" "mpw-cli.c" -o "mpw"
|
||||
cc "${CFLAGS[@]}" "$@" -c core/mpw-algorithm.c -o core/mpw-algorithm.o
|
||||
cc "${CFLAGS[@]}" "$@" -c core/mpw-types.c -o core/mpw-types.o
|
||||
cc "${CFLAGS[@]}" "$@" -c core/mpw-util.c -o core/mpw-util.o
|
||||
cc "${CFLAGS[@]}" "$@" "core/mpw-algorithm.o" "core/mpw-types.o" "core/mpw-util.o" \
|
||||
"${LDFLAGS[@]}" "cli/mpw-cli.c" -o "mpw"
|
||||
echo "done! Now run ./install or use ./mpw"
|
||||
}
|
||||
|
||||
@ -249,8 +251,10 @@ mpw-bench() {
|
||||
echo
|
||||
echo "Building target: $target..."
|
||||
local CFLAGS=(
|
||||
# include paths
|
||||
# library paths
|
||||
-I"lib/include"
|
||||
# mpw paths
|
||||
-I"core" -I"cli"
|
||||
)
|
||||
local LDFLAGS=(
|
||||
# scrypt
|
||||
@ -262,17 +266,17 @@ mpw-bench() {
|
||||
"lib/bcrypt/src/wrapper.o"
|
||||
"lib/bcrypt/src/x86.o"
|
||||
# library paths
|
||||
-L"." -L"lib/scrypt/src"
|
||||
-L"lib/scrypt/src"
|
||||
-L"lib/bcrypt/src"
|
||||
# link libraries
|
||||
-l"crypto"
|
||||
)
|
||||
|
||||
cc "${CFLAGS[@]}" "$@" -c mpw-algorithm.c -o mpw-algorithm.o
|
||||
cc "${CFLAGS[@]}" "$@" -c mpw-types.c -o mpw-types.o
|
||||
cc "${CFLAGS[@]}" "$@" -c mpw-util.c -o mpw-util.o
|
||||
cc "${CFLAGS[@]}" "$@" "mpw-algorithm.o" "mpw-types.o" "mpw-util.o" \
|
||||
"${LDFLAGS[@]}" "mpw-bench.c" -o "mpw-bench"
|
||||
cc "${CFLAGS[@]}" "$@" -c core/mpw-algorithm.c -o core/mpw-algorithm.o
|
||||
cc "${CFLAGS[@]}" "$@" -c core/mpw-types.c -o core/mpw-types.o
|
||||
cc "${CFLAGS[@]}" "$@" -c core/mpw-util.c -o core/mpw-util.o
|
||||
cc "${CFLAGS[@]}" "$@" "core/mpw-algorithm.o" "core/mpw-types.o" "core/mpw-util.o" \
|
||||
"${LDFLAGS[@]}" "cli/mpw-bench.c" -o "mpw-bench"
|
||||
echo "done! Now use ./mpw-bench"
|
||||
}
|
||||
|
||||
@ -284,27 +288,29 @@ mpw-tests() {
|
||||
echo
|
||||
echo "Building target: $target..."
|
||||
local CFLAGS=(
|
||||
# include paths
|
||||
# library paths
|
||||
-I"lib/include"
|
||||
-I"/usr/include/libxml2"
|
||||
-I"/usr/local/include/libxml2"
|
||||
# mpw paths
|
||||
-I"core" -I"cli"
|
||||
)
|
||||
local LDFLAGS=(
|
||||
# scrypt
|
||||
"lib/scrypt/src/libcperciva/"*/*.o
|
||||
"lib/scrypt/src/lib/crypto/"*.o
|
||||
# library paths
|
||||
-L"." -L"lib/scrypt/src"
|
||||
-L"lib/scrypt/src"
|
||||
# link libraries
|
||||
-l"crypto" -l"xml2"
|
||||
)
|
||||
|
||||
cc "${CFLAGS[@]}" "$@" -c mpw-algorithm.c -o mpw-algorithm.o
|
||||
cc "${CFLAGS[@]}" "$@" -c mpw-types.c -o mpw-types.o
|
||||
cc "${CFLAGS[@]}" "$@" -c mpw-util.c -o mpw-util.o
|
||||
cc "${CFLAGS[@]}" "$@" -c mpw-tests-util.c -o mpw-tests-util.o
|
||||
cc "${CFLAGS[@]}" "$@" "mpw-algorithm.o" "mpw-types.o" "mpw-util.o" "mpw-tests-util.o" \
|
||||
"${LDFLAGS[@]}" "mpw-tests.c" -o "mpw-tests"
|
||||
cc "${CFLAGS[@]}" "$@" -c core/mpw-algorithm.c -o core/mpw-algorithm.o
|
||||
cc "${CFLAGS[@]}" "$@" -c core/mpw-types.c -o core/mpw-types.o
|
||||
cc "${CFLAGS[@]}" "$@" -c core/mpw-util.c -o core/mpw-util.o
|
||||
cc "${CFLAGS[@]}" "$@" -c cli/mpw-tests-util.c -o cli/mpw-tests-util.o
|
||||
cc "${CFLAGS[@]}" "$@" "core/mpw-algorithm.o" "core/mpw-types.o" "core/mpw-util.o" \
|
||||
"${LDFLAGS[@]}" "cli/mpw-tests-util.o" "cli/mpw-tests.c" -o "mpw-tests"
|
||||
echo "done! Now use ./mpw-tests"
|
||||
}
|
||||
|
||||
|
@ -5,4 +5,4 @@ set -e
|
||||
cd "${BASH_SOURCE%/*}"
|
||||
|
||||
rm -vfr lib/*/{.unpacked,.patched,src} lib/include
|
||||
rm -vfr *.o *.dSYM mpw mpw-bench mpw-tests
|
||||
rm -vfr {core,cli}{*.o,*.dSYM} mpw mpw-bench mpw-tests
|
||||
|
1
platform-independent/cli-c/core
Symbolic link
1
platform-independent/cli-c/core
Symbolic link
@ -0,0 +1 @@
|
||||
../../core/c
|
1
platform-independent/cli-c/lib
Symbolic link
1
platform-independent/cli-c/lib
Symbolic link
@ -0,0 +1 @@
|
||||
core/lib
|
1
platform-independent/cli-c/mpw_tests.xml
Symbolic link
1
platform-independent/cli-c/mpw_tests.xml
Symbolic link
@ -0,0 +1 @@
|
||||
../../core/java/tests/src/main/resources/mpw_tests.xml
|
Loading…
Reference in New Issue
Block a user