forked from gral-master/cimmutable
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
51 lines (35 loc) · 864 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
LIBNAME = cimmutable.a
UTILDIR = ./src
OBJDIR = ./obj
AVLDIR = ./src/avl
FINGERDIR = ./src/finger
RRBDIR = ./src/rrb_vector
CC = gcc
CFLAGS = -Wall -Wextra -Wimplicit -std=gnu11 -g -fPIC
SHELL = /bin/sh
RM = rm -f
ECHO = echo -e
.PHONY: clean doc
all: clean $(LIBNAME)
$(LIBNAME): comp build_rrb build_avl build_finger
@ar -cvq $@ $(OBJDIR)/*.o
@$(ECHO) "\e[32mLibrary "$@" linked!\e[0m"
comp:
@$(CC) $(CFLAGS) -c ./src/debug.c -o ./obj/debug.o
@$(ECHO) "\e[34mCompiled debug.c successfully!\e[0m"
build_avl:
@cd $(AVLDIR) && $(MAKE)
build_finger:
@cd $(FINGERDIR) && $(MAKE)
build_rrb:
@cd $(RRBDIR) && $(MAKE)
build_bench:
@cd $(BENCHDIR) && $(MAKE)
doc:
@doxygen doxygen-config
clean:
@$(RM) -v $(LIBNAME)
@$(RM) -v ./a.out
@find ./src -type f -iname '*.o' -delete
@find ./src -type f -iname 'log' -delete
@$(RM) -v $(OBJDIR)/*.o