aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: fc5fc11a6c588a3695e0c0e645542cb37de7497c (plain)
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
RM = rm -f

LIBASM_PATH = ../libasm

CC = gcc
CCFLAGS = -Wall -Wextra
LDFLAGS = -L$(LIBASM_PATH) -lasm

NAME = runtest
SRC = main.c ft_strlen_test.c ft_strcpy_test.c ft_strcmp_test.c \
	  ft_write_test.c ft_read_test.c ft_strdup_test.c helper.c
OBJ = $(SRC:.c=.o)

run: all
	./runtest

all: $(NAME)

$(NAME): libasm_all $(OBJ)
	$(CC) $(LDFLAGS) -o $@ $(OBJ)

%.o: %.c
	$(CC) $(CCFLAGS) -c -o $@ $<

clean: 
	$(RM) $(OBJ)

fclean: clean 
	$(RM) $(NAME)

re: libasm_fclean libasm_all fclean all 


libasm_all:
	make -C $(LIBASM_PATH) all

libasm_fclean:
	make -C $(LIBASM_PATH) fclean