diff options
| author | mo khan <mo.khan@gmail.com> | 2020-08-27 13:06:52 -0600 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2020-08-27 13:06:52 -0600 |
| commit | b7d1b0175926b57179997c69b2f86e55bbbbd4df (patch) | |
| tree | 658f7df3d54fd7363e1c97d00ce766580a48076c /src/03/Makefile | |
| parent | 7082bf3853c2bb4a0fcf3d386b884291fbfa11a6 (diff) | |
Start to create an AVL tree
Diffstat (limited to 'src/03/Makefile')
| -rw-r--r-- | src/03/Makefile | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/03/Makefile b/src/03/Makefile new file mode 100644 index 0000000..e87119a --- /dev/null +++ b/src/03/Makefile @@ -0,0 +1,37 @@ +#!/usr/bin/make -f +SHELL=/bin/sh + +CC=clang +TEST_LIBS = -lcgreen + +BUILDDIR := build +OBJS := $(addprefix $(BUILDDIR)/,avl_tree.o) +TEST_OBJS := $(addprefix $(BUILDDIR)/,avl_tree_test.o) + +$(BUILDDIR)/%.o : %.c + $(COMPILE.c) $(OUTPUT_OPTION) $< + +.PHONY: all +all: $(OBJS) $(BUILDDIR)/main.o + $(CC) $(OBJS) $(BUILDDIR)/main.o -o $(BUILDDIR)/program + +.PHONY: test +test: $(OBJS) $(TEST_OBJS) + $(CC) $(OBJS) $(TEST_OBJS) $(TEST_LIBS) -o $(BUILDDIR)/test + +$(OBJS): | $(BUILDDIR) + +$(TEST_OBJS): | $(BUILDDIR) + +$(BUILDDIR): + mkdir $(BUILDDIR) + +.PHONY: clean +clean: + rm -fr build + +run : all + ./build/program + +run_test : test + cgreen-runner -c -v $(BUILDDIR)/test |
