Changed location of the /build directory to be in the root to make for easier cleaning of project. Added in a clean-all.sh script as well to clean everything. Clean Script Added in a way to clean the build environment as well.
24 lines
489 B
Bash
Executable File
24 lines
489 B
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# Build script for quantum
|
|
|
|
set echo on
|
|
|
|
mkdir -p ../build/
|
|
|
|
# Get a list of all the .c files.
|
|
cFilenames=$(find . -type f -name "*.c")
|
|
|
|
assembly="quantum"
|
|
objLocation="../build/libquantum.o"
|
|
compilerFlags="-g -c -fpic"
|
|
includeFlags="-Isrc"
|
|
|
|
echo "Building $assembly..."
|
|
|
|
# First we need to compile down to .o files
|
|
gcc $cFilenames $compilerFlags -o $objLocation $includeFlags
|
|
|
|
compilerFlags="-g -shared"
|
|
gcc $objLocation $compilerFlags -o ../bin/libquantum.so $includeFlags
|