Added simple implementation of hex/octal conversion

This commit is contained in:
kdeng00
2020-10-29 21:47:51 -04:00
parent 72906bac35
commit 9639c6453e
8 changed files with 239 additions and 71 deletions
+19 -1
View File
@@ -1,3 +1,12 @@
#!/bin/bash
if [ -n "$1" ]; then
compile_type=$1
else
compile_type="debug"
fi
if [ ! -d "bin" ]; then
mkdir bin
echo "created bin directory"
@@ -8,6 +17,15 @@ if [ ! -d "bin/static" ]; then
echo "created bin/static directory"
fi
gcc -c src/hex.c -Iinclude -o bin/static/hex.o
if [ "$compile_type" = "debug" ]; then
echo "Compiling for debug version"
gcc -c src/hex.c -Iinclude -o bin/static/hex.o -O0
elif [ "$compile_type" = "release" ]; then
echo "Compiling for release version"
gcc -c src/hex.c -Iinclude -o bin/static/hex.o -O3
else
echo "Compiling for debug by default"
gcc -c src/hex.c -Iinclude -o bin/static/hex.o -O0
fi
ar rcs bin/static/libhexoctalconv.a bin/static/hex.o