-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (34 loc) · 763 Bytes
/
Makefile
File metadata and controls
47 lines (34 loc) · 763 Bytes
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
##
## EPITECH PROJECT, 2018
## libstring
## File description:
## Builds a lib containing the string
##
override CFLAGS += -W -Wall -Wextra -fPIC -O3
override CPPFLAGS += -I ./include
CC = gcc
LD = $(CC)
override SRC_DIR = src/
override SRC = my_malloc.c \
my_free.c \
prune_trees.c \
auxiliary.c \
tools.c \
tree_managing.c
override OBJ = $(addprefix $(SRC_DIR), $(SRC:.c=.o))
LIB = libmy_malloc.so
$(LIB): $(OBJ)
$(CC) -shared -o $@ $^
all: $(LIB)
tests: $(LIB)
$(CC) -L./ main.c -lmy_malloc
LD_LIBRARY_PATH=$(PWD) \
./a.out
clean:
@rm -f $(OBJ)
@rm -f a.out
fclean: clean
@echo -e "\e[31;1m(lib) Removing: $(LIB)\e[0m"
@rm -f $(LIB)
re: fclean all
.PHONY: all tests_run clean fclean re