diff options
| author | mo khan <mo.khan@gmail.com> | 2020-06-28 17:15:18 -0600 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2020-06-28 17:15:18 -0600 |
| commit | ea6811627bdbb26b4141bbb01e438111441935e3 (patch) | |
| tree | ca802ca06aaf4a70324383e47a52be280331c0ba /Makefile | |
| parent | 0a11c21a3d6c1668ea556b998491901ad213d780 (diff) | |
Clean up makefile
Diffstat (limited to 'Makefile')
| -rwxr-xr-x[-rw-r--r--] | Makefile | 43 |
1 files changed, 23 insertions, 20 deletions
@@ -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 |
