Compare commits
5 Commits
98490b3e50
...
0d10af1bd6
Author | SHA1 | Date |
---|---|---|
BodgeMaster | 0d10af1bd6 | |
BodgeMaster | cee542f1f5 | |
BodgeMaster | f8d3bb0b16 | |
BodgeMaster | c5a04af703 | |
BodgeMaster | ad336b84b6 |
10
build.sh
10
build.sh
|
@ -18,24 +18,24 @@ for lib in $(find ./src/lib -name "*.cpp"); do
|
|||
$COMPILE_COMMAND &
|
||||
done
|
||||
|
||||
wait
|
||||
|
||||
# Commands for every program need to be given individually because we can't
|
||||
# just add all shared libraries to all programs.
|
||||
# Or can we? Idk, cba to find out.
|
||||
|
||||
# How to build a tool: Tell the compiler where to find shared libraries and
|
||||
# which libraries to use.
|
||||
# which libraries to use.
|
||||
# Example: shared libraries are in bin/lib => -Lbin/lib
|
||||
# one of the libraries in that directory is libnbt.so
|
||||
# => use with -lnbt (omit prefix lib and suffix .so)
|
||||
# one of the libraries in that directory is nbt.so => use with -l:nbt.so
|
||||
# How to run a tool: specify the library path to use for the dynamic linker
|
||||
# when running a program
|
||||
# when running a program
|
||||
# Example: LD_LIBRARY_PATH=bin/lib bin/tools/dumpnbt
|
||||
echo "Building tools..."
|
||||
mkdir -pv bin/tools
|
||||
# add compile commands to this variable
|
||||
COMPILE_COMMANDS="
|
||||
set -v
|
||||
$CXX_WITH_FLAGS src/tools/dumpnbt.cpp -Lbin/lib -lnbt -o bin/tools/dumpnbt &
|
||||
$CXX_WITH_FLAGS src/tools/dumpnbt.cpp -Lbin/lib -l:nbt.so -o bin/tools/dumpnbt &
|
||||
"
|
||||
sh <<< $COMPILE_COMMANDS
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
rm -rv ./bin
|
||||
mkdir -v ./bin
|
||||
set -v
|
||||
echo -n "" > ./bin/.placeholder
|
|
@ -1,4 +1,4 @@
|
|||
#include "../lib/libnbt.h++"
|
||||
#include "../lib/nbt.h++"
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue