]> git.mdlowis.com Git - archive/carl.git/commitdiff
Convert the project over to a ninja build file generated via ruby script
authorMike D. Lowis <mike.lowis@gentex.com>
Wed, 30 Sep 2015 12:30:52 +0000 (08:30 -0400)
committerMike D. Lowis <mike.lowis@gentex.com>
Wed, 30 Sep 2015 12:30:52 +0000 (08:30 -0400)
build.ninja [new file with mode: 0644]
project.rb [new file with mode: 0644]

diff --git a/build.ninja b/build.ninja
new file mode 100644 (file)
index 0000000..9556fd5
--- /dev/null
@@ -0,0 +1,60 @@
+CC = gcc
+DEPSUFFIX = .d
+CPPFLAGS = -Isource/ -Imodules/atf/source
+CFLAGS = -g -O3 -Wall -Wextra --std=c99 --pedantic
+LD = gcc
+LDFLAGS = 
+AR = ar
+ARFLAGS = rcs
+
+rule cc
+    command = $CC -MMD -MF $out$DEPSUFFIX $CPPFLAGS $CFLAGS -c -o $out $in
+    depfile = $out$DEPSUFFIX
+rule ld
+    command = $LD $LDFLAGS -o $out $in
+rule ar
+    command = $AR $ARFLAGS $out $in
+    depfile = $out$DEPSUFFIX
+rule command
+    command = $CMD
+
+build source/refcount.o: cc source/refcount.c
+build source/utf/runetype/toupper.o: cc source/utf/runetype/toupper.c
+build source/utf/runetype/tolower.o: cc source/utf/runetype/tolower.c
+build source/utf/runetype/uppers.o: cc source/utf/runetype/uppers.c
+build source/utf/runetype/numbers.o: cc source/utf/runetype/numbers.c
+build source/utf/runetype/symbols.o: cc source/utf/runetype/symbols.c
+build source/utf/runetype/totitle.o: cc source/utf/runetype/totitle.c
+build source/utf/runetype/titles.o: cc source/utf/runetype/titles.c
+build source/utf/runetype/lowers.o: cc source/utf/runetype/lowers.c
+build source/utf/runetype/spaces.o: cc source/utf/runetype/spaces.c
+build source/utf/runetype/punctuation.o: cc source/utf/runetype/punctuation.c
+build source/utf/runetype/alphas.o: cc source/utf/runetype/alphas.c
+build source/utf/runetype/digits.o: cc source/utf/runetype/digits.c
+build source/utf/runetype/controls.o: cc source/utf/runetype/controls.c
+build source/utf/runetype/marks.o: cc source/utf/runetype/marks.c
+build source/utf/runetype/otherletters.o: cc source/utf/runetype/otherletters.c
+build source/utf/runetype/other.o: cc source/utf/runetype/other.c
+build source/utf/runecmp.o: cc source/utf/runecmp.c
+build source/utf/runeinrange.o: cc source/utf/runeinrange.c
+build source/utf/chartorune.o: cc source/utf/chartorune.c
+build source/utf/runetype.o: cc source/utf/runetype.c
+build source/utf/runelen.o: cc source/utf/runelen.c
+build source/utf/fullrune.o: cc source/utf/fullrune.c
+build source/utf/runenlen.o: cc source/utf/runenlen.c
+build source/utf/runetochar.o: cc source/utf/runetochar.c
+build source/data/vec.o: cc source/data/vec.c
+build source/data/list.o: cc source/data/list.c
+build source/data/bstree.o: cc source/data/bstree.c
+build source/data/slist.o: cc source/data/slist.c
+build source/main.o: cc source/main.c
+build libcarl.a: ar source/refcount.o source/utf/runetype/toupper.o source/utf/runetype/tolower.o source/utf/runetype/uppers.o source/utf/runetype/numbers.o source/utf/runetype/symbols.o source/utf/runetype/totitle.o source/utf/runetype/titles.o source/utf/runetype/lowers.o source/utf/runetype/spaces.o source/utf/runetype/punctuation.o source/utf/runetype/alphas.o source/utf/runetype/digits.o source/utf/runetype/controls.o source/utf/runetype/marks.o source/utf/runetype/otherletters.o source/utf/runetype/other.o source/utf/runecmp.o source/utf/runeinrange.o source/utf/chartorune.o source/utf/runetype.o source/utf/runelen.o source/utf/fullrune.o source/utf/runenlen.o source/utf/runetochar.o source/data/vec.o source/data/list.o source/data/bstree.o source/data/slist.o source/main.o
+build tests/refcount.o: cc tests/refcount.c
+build tests/utf/test_unicodedata.o: cc tests/utf/test_unicodedata.c
+build tests/data/bstree.o: cc tests/data/bstree.c
+build tests/data/slist.o: cc tests/data/slist.c
+build tests/main.o: cc tests/main.c
+build modules/atf/source/atf.o: cc modules/atf/source/atf.c
+build test_libc: ld tests/refcount.o tests/utf/test_unicodedata.o tests/data/bstree.o tests/data/slist.o tests/main.o modules/atf/source/atf.o libcarl.a
+build Tests: command test_libc
+    CMD = ./test_libc
diff --git a/project.rb b/project.rb
new file mode 100644 (file)
index 0000000..ab87c5e
--- /dev/null
@@ -0,0 +1,8 @@
+project do
+  env.CFLAGS   = '-g -O3 -Wall -Wextra --std=c99 --pedantic'
+  env.CPPFLAGS = ['-Isource/', '-Imodules/atf/source']
+
+  library 'libcarl.a', Dir['source/**/*.c']
+  program 'test_libc', Dir["tests/**/*.c", "modules/atf/source/*.c"] + ["libcarl.a"]
+  command 'Tests', 'test_libc', CMD: './test_libc'
+end