First build system
First draft of a build system. This will run the hello function from our library.
This commit is contained in:
15
test_stuff/build.sh
Executable file
15
test_stuff/build.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
#Build script for test_stuff
|
||||
|
||||
set echo on
|
||||
|
||||
# Get a list of all the .c files.
|
||||
cFilenames=$(find . -type f -name "*.c")
|
||||
|
||||
assembly="test_stuff"
|
||||
compilerFlags="-g -fpic"
|
||||
includeFlags="-Isrc -I../quantum/src/"
|
||||
linkerFlags="-L../bin/ -lquantum -Wl,-rpath,."
|
||||
|
||||
echo "Building $assembly..."
|
||||
gcc $cFilenames $compilerFlags -o ../bin/$assembly $includeFlags $linkerFlags
|
||||
7
test_stuff/src/main.c
Normal file
7
test_stuff/src/main.c
Normal file
@@ -0,0 +1,7 @@
|
||||
#include <test.h>
|
||||
|
||||
int main() {
|
||||
hello_quantum();
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user