39 lines
494 B
Makefile
39 lines
494 B
Makefile
NAME = libasm
|
|
|
|
SRC = \
|
|
ft_strlen.s \
|
|
ft_strcpy.s \
|
|
ft_strcmp.s \
|
|
ft_write.s \
|
|
ft_read.s \
|
|
ft_strdup.s \
|
|
ft_list_size.s \
|
|
ft_list_push_front.s \
|
|
ft_list_sort.s \
|
|
|
|
OBJ = $(SRC:.s=.o)
|
|
|
|
%.o:%.s
|
|
nasm -f elf64 $< -o $@
|
|
|
|
all: $(NAME)
|
|
|
|
bonus: all
|
|
|
|
$(NAME): $(OBJ)
|
|
ar rcs libasm.a $(OBJ)
|
|
|
|
test: $(NAME)
|
|
gcc -Wall -Werror -Wextra -no-pie -g ft_list_print.c main.c -L. -lasm -o libasm_unit_tests
|
|
|
|
clean:
|
|
rm $(OBJ)
|
|
|
|
fclean:
|
|
rm libasm.a
|
|
rm libasm_unit_tests
|
|
|
|
re: fclean all
|
|
|
|
.PHONY: all test
|