libasm/Makefile

34 lines
410 B
Makefile

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