libasm/Makefile

28 lines
318 B
Makefile
Raw Normal View History

2024-02-24 07:17:58 +00:00
NAME = libasm
SRC = ft_strlen.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 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