summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rwxr-xr-x[-rw-r--r--]Makefile43
1 files changed, 23 insertions, 20 deletions
diff --git a/Makefile b/Makefile
index 6b8a355..17f2cfd 100644..100755
--- a/Makefile
+++ b/Makefile
@@ -1,33 +1,36 @@
+#!/usr/bin/make -f
+SHELL=/bin/sh
+
CC=gcc
-OBJDIR := build
-objects = build/*.o
-OBJS := $(addprefix $(OBJDIR)/,priority_queue_test.o stack_test.o min_stack_test.o swap_singly_linked_list_test.o swap_doubly_linked_list_test.o)
+LIBS = -lcgreen
-include src/**/*.mk
+BUILDDIR := build
+OBJS := $(addprefix $(BUILDDIR)/,priority_queue_test.o stack_test.o min_stack_test.o swap_singly_linked_list_test.o swap_doubly_linked_list_test.o main.o)
-#test : build/main
- #cgreen-runner -c main
+#doc : doc/
+#doxygen Doxyfile
-#ci : build/main
- #mkdir -p junit
- #cgreen-runner -c --xml=build/junit/ main
+$(BUILDDIR)/%.o : src/01/%.c
+ $(COMPILE.c) $(OUTPUT_OPTION) $<
-#doc : doc/
- #doxygen Doxyfile
+test : all
+ cgreen-runner -c $(BUILDDIR)/main
-#build/main : $(objects)
- #$(CC) -o build/main $(CFLAGS) $(objects)
- #$(CC) main.o priority_queue_test.o stack_test.o swap_singly_linked_list_test.o swap_doubly_linked_list_test.o min_stack_test.o -lcgreen -o main
+ci : all
+ cgreen-runner -c --xml=$(BUILDDIR)/ $(BUILDDIR)/main
-$(OBJDIR)/%.o : %.c
- $(COMPILE.c) $(OUTPUT_OPTION) $<
+.PHONY: all
+all: $(OBJS) $(BUILDDIR)/html
+ $(CC) $(OBJS) $(LIBS) -o $(BUILDDIR)/main
-all: $(OBJS)
+$(OBJS): | $(BUILDDIR)
-$(OBJS): | $(OBJDIR)
+$(BUILDDIR):
+ mkdir $(BUILDDIR)
-$(OBJDIR):
- mkdir $(OBJDIR)
+$(BUILDDIR)/html :
+ doxygen Doxyfile
+.PHONY: clean
clean:
rm -fr build