Browse Source

Introduce tools folder

rexim 2 years ago
parent
commit
11ebee757b
4 changed files with 14 additions and 10 deletions
  1. 14 10
      build.sh
  2. 0 0
      tools/obj2c.c
  3. 0 0
      tools/png2c.c
  4. 0 0
      tools/viewobj.c

+ 14 - 10
build.sh

@@ -39,23 +39,27 @@ build_all_vc_demos() {
     wait # TODO: the whole script must fail if one of the jobs fails
     wait # TODO: the whole script must fail if one of the jobs fails
 }
 }
 
 
+build_tools() {
+    mkdir -p ./build/tools/
+    clang $COMMON_CFLAGS -o ./build/tools/png2c -Ithirdparty ./tools/png2c.c -lm &
+    clang $COMMON_CFLAGS -o ./build/tools/obj2c -Ithirdparty ./tools/obj2c.c -lm &
+    clang $COMMON_CFLAGS -O2 -o ./build/tools/viewobj ./tools/viewobj.c &
+    wait # TODO: the whole script must fail if one of the jobs fails
+}
+
 build_assets() {
 build_assets() {
     mkdir -p ./build/assets/
     mkdir -p ./build/assets/
-
-    clang $COMMON_CFLAGS -o ./build/png2c -Ithirdparty png2c.c -lm
-    ./build/png2c -n tsodinPog -o ./build/assets/tsodinPog.c ./assets/tsodinPog.png
-    ./build/png2c -n Sadge -o ./build/assets/Sadge.c ./assets/Sadge.png
-
-    clang $COMMON_CFLAGS -o ./build/obj2c -Ithirdparty obj2c.c -lm
-    ./build/obj2c ./assets/tsodinCupLowPoly.obj ./build/assets/tsodinCupLowPoly.c
+    ./build/tools/png2c -n tsodinPog -o ./build/assets/tsodinPog.c ./assets/tsodinPog.png &
+    ./build/tools/png2c -n Sadge -o ./build/assets/Sadge.c ./assets/Sadge.png &
+    ./build/tools/obj2c ./assets/tsodinCupLowPoly.obj ./build/assets/tsodinCupLowPoly.c &
+    wait # TODO: the whole script must fail if one of the jobs fails
 }
 }
 
 
 build_tests() {
 build_tests() {
-    mkdir -p ./build/
-    clang $COMMON_CFLAGS -fsanitize=memory -o ./build/test -Ithirdparty test.c -lm
+    clang $COMMON_CFLAGS -fsanitize=memory -o ./build/test -Ithirdparty ./test.c -lm &
 }
 }
 
 
+build_tools
 build_assets
 build_assets
 build_tests
 build_tests
 build_all_vc_demos
 build_all_vc_demos
-# clang $COMMON_CFLAGS -O2 -o viewobj viewobj.c 

+ 0 - 0
obj2c.c → tools/obj2c.c


+ 0 - 0
png2c.c → tools/png2c.c


+ 0 - 0
viewobj.c → tools/viewobj.c