-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
43 lines (31 loc) · 809 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
MAKE += --silent
BUILD_DIR = ./build
LIB = ./lib
HEAP_FILE = ./src/Heap_File
HASH_FILE = ./src/Hash_File
SHASH_FILE = ./src/SHash_File
EXEC_FILES = $(shell find $(BUILD_DIR) -type f -executable)
VAL_FLAGS := valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes
all: heap_file hash_file shash_file
.PHONY: heap_file hash_file shash_file
heap_file:
@$(MAKE) -C $(HEAP_FILE)
hash_file:
@$(MAKE) -C $(HASH_FILE)
shash_file:
@$(MAKE) -C $(SHASH_FILE)
run:
@for exec in $(EXEC_FILES); do \
LD_LIBRARY_PATH=$(LIB) ./$$exec; \
done
valgrind:
@for exec in $(EXEC_FILES); do \
LD_LIBRARY_PATH=$(LIB) $(VAL_FLAGS) ./$$exec; \
done
gdb:
@for exec in $(EXEC_FILES); do \
LD_LIBRARY_PATH=$(LIB) gdb ./$$exec; \
done
clean:
@rm -rf *.db
@$(MAKE) -C $(HEAP_FILE) clean