From: Michael D. Lowis Date: Wed, 27 May 2015 01:44:33 +0000 (-0400) Subject: Added libcds to the build X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=e92a72dd2896b13c282d9297258113ad2b955882;p=proto%2Fgir.git Added libcds to the build --- diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..09ec159 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "modules/libcds"] + path = modules/libcds + url = https://github.com/mikedlowis/data-structures.git diff --git a/Makefile b/Makefile index fd404ce..4bef298 100644 --- 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 index 0000000..8cc7a08 --- /dev/null +++ b/modules/libcds @@ -0,0 +1 @@ +Subproject commit 8cc7a08d44ce471f09ffc19ad9ef999c0df9144e