-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
49 lines (39 loc) · 844 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
##
## EPITECH PROJECT, 2021
## B-PSU-400-RUN-4-1-malloc-paul.brancieq
## File description:
## Makefile
##
EXEC = libmy_malloc.so
SOURCES = $(wildcard *.c)
DEBUG = -g -ggdb -g3
all:
gcc -shared -o $(EXEC) -fPIC $(SOURCES) -fcommon
re:
make fclean
gcc -shared -o $(EXEC) -fPIC $(SOURCES) -fcommon
libdebug:
make fclean
gcc -shared -o $(EXEC) -fPIC $(SOURCES) -fcommon $(DEBUG)
tests_run:
make libdebug
gcc -o test tests/*.c tests/tests_files/*.c *.c $(DEBUG) --coverage
./test
gcovr
tests_real:
make libdebug
gcc -o test tests/*.c tests/tests_files/*.c -L./ -lmy_malloc $(DEBUG)
LD_LIBRARY_PATH=./ ./test
make libdebug
make -sC tests/ls/
make libdebug
LD_PRELOAD=./libmy_malloc.so ls
clean:
rm -rf *.o
fclean: clean
rm -rf $(EXEC)
rm -rf *.gcda
rm -rf *.gcno
rm -rf vgcore.*
rm -f test
make -sC ./tests/ls/ fclean