]> git.mdlowis.com Git - proto/gir.git/commitdiff
Added libcds to the build
authorMichael D. Lowis <mike@mdlowis.com>
Wed, 27 May 2015 01:44:33 +0000 (21:44 -0400)
committerMichael D. Lowis <mike@mdlowis.com>
Wed, 27 May 2015 01:44:33 +0000 (21:44 -0400)
.gitmodules [new file with mode: 0644]
Makefile
modules/libcds [new submodule]

diff --git a/.gitmodules b/.gitmodules
new file mode 100644 (file)
index 0000000..09ec159
--- /dev/null
@@ -0,0 +1,3 @@
+[submodule "modules/libcds"]
+       path = modules/libcds
+       url = https://github.com/mikedlowis/data-structures.git
index fd404ce4bc447a9a8e956206bdb3eba4211b0cd7..4bef298e0101da6c8db67ea56a16714e12803af0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,13 +1,29 @@
+INCLUDES = \
+    source/ \
+    modules/libcds/source/ \
+    modules/libcds/source/buffer/ \
+    modules/libcds/source/cmp/ \
+    modules/libcds/source/exn/ \
+    modules/libcds/source/list/ \
+    modules/libcds/source/map/ \
+    modules/libcds/source/mem/ \
+    modules/libcds/source/murmur3/ \
+    modules/libcds/source/rbt/ \
+    modules/libcds/source/set/ \
+    modules/libcds/source/string/ \
+    modules/libcds/source/vector/
+
+SOURCES = $(wildcard source/*.c) \
+          $(wildcard modules/libcds/source/*/*.c)
+
 LD = $(CC)
 MAKEDEPEND = $(CPP) -M $(CPPFLAGS) -o  $<
 CCDEPGEN = -MMD -MF $*.d
-CFLAGS = -Wall -Wextra -O3 --std=c99 --pedantic
-
-SOURCES = $(wildcard source/*.c)
+CFLAGS = -Wall -Wextra -O3 --std=c99 --pedantic $(addprefix -I,$(INCLUDES))
 
 -include $(SOURCES:.c=.d)
 
-parser: source/lex.yy.o source/main.o
+parser: source/lex.yy.o $(SOURCES:.c=.o)
        $(LD) $(LDFLAGS) -o $@ $^
 
 %.o : %.c
@@ -17,8 +33,8 @@ source/lex.yy.c: source/lexer.l
        $(LEX) $(LFLAGS) -o $@ $^
 
 clean:
-       rm -f source/*.o
-       rm -f source/*.d
+       rm -f $(SOURCES:.c=.o)
+       rm -f $(SOURCES:.c=.d)
        rm -f source/lex.yy.c
        rm -f parser parser.exe
 
diff --git a/modules/libcds b/modules/libcds
new file mode 160000 (submodule)
index 0000000..8cc7a08
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit 8cc7a08d44ce471f09ffc19ad9ef999c0df9144e