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
|
dependency-reduced-pom.xml
|
||||||
|
|
||||||
# C
|
# 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/*.o
|
||||||
core/c/lib/*/.unpacked
|
core/c/lib/*/.unpacked
|
||||||
core/c/lib/*/.patched
|
core/c/lib/*/.patched
|
||||||
core/c/lib/*/src
|
core/c/lib/*/src
|
||||||
core/c/lib/include
|
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
|
||||||
echo "Building target: $target..."
|
echo "Building target: $target..."
|
||||||
local CFLAGS=(
|
local CFLAGS=(
|
||||||
# include paths
|
# library paths
|
||||||
-I"lib/include"
|
-I"lib/include"
|
||||||
|
# mpw paths
|
||||||
|
-I"core" -I"cli"
|
||||||
)
|
)
|
||||||
local LDFLAGS=(
|
local LDFLAGS=(
|
||||||
# scrypt
|
# scrypt
|
||||||
"lib/scrypt/src/libcperciva/"*/*.o
|
"lib/scrypt/src/libcperciva/"*/*.o
|
||||||
"lib/scrypt/src/lib/crypto/"*.o
|
"lib/scrypt/src/lib/crypto/"*.o
|
||||||
# library paths
|
# library paths
|
||||||
-L"." -L"lib/scrypt/src"
|
-L"lib/scrypt/src"
|
||||||
# link libraries
|
# link libraries
|
||||||
-l"crypto"
|
-l"crypto"
|
||||||
)
|
)
|
||||||
# optional features
|
# optional features
|
||||||
(( mpw_color )) && CFLAGS+=( -DCOLOR ) LDFLAGS+=( -l"curses" )
|
(( mpw_color )) && CFLAGS+=( -DCOLOR ) LDFLAGS+=( -l"curses" )
|
||||||
|
|
||||||
cc "${CFLAGS[@]}" "$@" -c mpw-algorithm.c -o mpw-algorithm.o
|
cc "${CFLAGS[@]}" "$@" -c core/mpw-algorithm.c -o core/mpw-algorithm.o
|
||||||
cc "${CFLAGS[@]}" "$@" -c mpw-types.c -o mpw-types.o
|
cc "${CFLAGS[@]}" "$@" -c core/mpw-types.c -o core/mpw-types.o
|
||||||
cc "${CFLAGS[@]}" "$@" -c mpw-util.c -o mpw-util.o
|
cc "${CFLAGS[@]}" "$@" -c core/mpw-util.c -o core/mpw-util.o
|
||||||
cc "${CFLAGS[@]}" "$@" "mpw-algorithm.o" "mpw-types.o" "mpw-util.o" \
|
cc "${CFLAGS[@]}" "$@" "core/mpw-algorithm.o" "core/mpw-types.o" "core/mpw-util.o" \
|
||||||
"${LDFLAGS[@]}" "mpw-cli.c" -o "mpw"
|
"${LDFLAGS[@]}" "cli/mpw-cli.c" -o "mpw"
|
||||||
echo "done! Now run ./install or use ./mpw"
|
echo "done! Now run ./install or use ./mpw"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -249,8 +251,10 @@ mpw-bench() {
|
|||||||
echo
|
echo
|
||||||
echo "Building target: $target..."
|
echo "Building target: $target..."
|
||||||
local CFLAGS=(
|
local CFLAGS=(
|
||||||
# include paths
|
# library paths
|
||||||
-I"lib/include"
|
-I"lib/include"
|
||||||
|
# mpw paths
|
||||||
|
-I"core" -I"cli"
|
||||||
)
|
)
|
||||||
local LDFLAGS=(
|
local LDFLAGS=(
|
||||||
# scrypt
|
# scrypt
|
||||||
@ -262,17 +266,17 @@ mpw-bench() {
|
|||||||
"lib/bcrypt/src/wrapper.o"
|
"lib/bcrypt/src/wrapper.o"
|
||||||
"lib/bcrypt/src/x86.o"
|
"lib/bcrypt/src/x86.o"
|
||||||
# library paths
|
# library paths
|
||||||
-L"." -L"lib/scrypt/src"
|
-L"lib/scrypt/src"
|
||||||
-L"lib/bcrypt/src"
|
-L"lib/bcrypt/src"
|
||||||
# link libraries
|
# link libraries
|
||||||
-l"crypto"
|
-l"crypto"
|
||||||
)
|
)
|
||||||
|
|
||||||
cc "${CFLAGS[@]}" "$@" -c mpw-algorithm.c -o mpw-algorithm.o
|
cc "${CFLAGS[@]}" "$@" -c core/mpw-algorithm.c -o core/mpw-algorithm.o
|
||||||
cc "${CFLAGS[@]}" "$@" -c mpw-types.c -o mpw-types.o
|
cc "${CFLAGS[@]}" "$@" -c core/mpw-types.c -o core/mpw-types.o
|
||||||
cc "${CFLAGS[@]}" "$@" -c mpw-util.c -o mpw-util.o
|
cc "${CFLAGS[@]}" "$@" -c core/mpw-util.c -o core/mpw-util.o
|
||||||
cc "${CFLAGS[@]}" "$@" "mpw-algorithm.o" "mpw-types.o" "mpw-util.o" \
|
cc "${CFLAGS[@]}" "$@" "core/mpw-algorithm.o" "core/mpw-types.o" "core/mpw-util.o" \
|
||||||
"${LDFLAGS[@]}" "mpw-bench.c" -o "mpw-bench"
|
"${LDFLAGS[@]}" "cli/mpw-bench.c" -o "mpw-bench"
|
||||||
echo "done! Now use ./mpw-bench"
|
echo "done! Now use ./mpw-bench"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -284,27 +288,29 @@ mpw-tests() {
|
|||||||
echo
|
echo
|
||||||
echo "Building target: $target..."
|
echo "Building target: $target..."
|
||||||
local CFLAGS=(
|
local CFLAGS=(
|
||||||
# include paths
|
# library paths
|
||||||
-I"lib/include"
|
-I"lib/include"
|
||||||
-I"/usr/include/libxml2"
|
-I"/usr/include/libxml2"
|
||||||
-I"/usr/local/include/libxml2"
|
-I"/usr/local/include/libxml2"
|
||||||
|
# mpw paths
|
||||||
|
-I"core" -I"cli"
|
||||||
)
|
)
|
||||||
local LDFLAGS=(
|
local LDFLAGS=(
|
||||||
# scrypt
|
# scrypt
|
||||||
"lib/scrypt/src/libcperciva/"*/*.o
|
"lib/scrypt/src/libcperciva/"*/*.o
|
||||||
"lib/scrypt/src/lib/crypto/"*.o
|
"lib/scrypt/src/lib/crypto/"*.o
|
||||||
# library paths
|
# library paths
|
||||||
-L"." -L"lib/scrypt/src"
|
-L"lib/scrypt/src"
|
||||||
# link libraries
|
# link libraries
|
||||||
-l"crypto" -l"xml2"
|
-l"crypto" -l"xml2"
|
||||||
)
|
)
|
||||||
|
|
||||||
cc "${CFLAGS[@]}" "$@" -c mpw-algorithm.c -o mpw-algorithm.o
|
cc "${CFLAGS[@]}" "$@" -c core/mpw-algorithm.c -o core/mpw-algorithm.o
|
||||||
cc "${CFLAGS[@]}" "$@" -c mpw-types.c -o mpw-types.o
|
cc "${CFLAGS[@]}" "$@" -c core/mpw-types.c -o core/mpw-types.o
|
||||||
cc "${CFLAGS[@]}" "$@" -c mpw-util.c -o mpw-util.o
|
cc "${CFLAGS[@]}" "$@" -c core/mpw-util.c -o core/mpw-util.o
|
||||||
cc "${CFLAGS[@]}" "$@" -c mpw-tests-util.c -o mpw-tests-util.o
|
cc "${CFLAGS[@]}" "$@" -c cli/mpw-tests-util.c -o cli/mpw-tests-util.o
|
||||||
cc "${CFLAGS[@]}" "$@" "mpw-algorithm.o" "mpw-types.o" "mpw-util.o" "mpw-tests-util.o" \
|
cc "${CFLAGS[@]}" "$@" "core/mpw-algorithm.o" "core/mpw-types.o" "core/mpw-util.o" \
|
||||||
"${LDFLAGS[@]}" "mpw-tests.c" -o "mpw-tests"
|
"${LDFLAGS[@]}" "cli/mpw-tests-util.o" "cli/mpw-tests.c" -o "mpw-tests"
|
||||||
echo "done! Now use ./mpw-tests"
|
echo "done! Now use ./mpw-tests"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,4 +5,4 @@ set -e
|
|||||||
cd "${BASH_SOURCE%/*}"
|
cd "${BASH_SOURCE%/*}"
|
||||||
|
|
||||||
rm -vfr lib/*/{.unpacked,.patched,src} lib/include
|
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