libasm/Makefile

30 lines
341 B
Makefile
Raw Normal View History

2024-02-24 07:17:58 +00:00
NAME = libasm
2024-02-24 07:40:53 +00:00
SRC = \
ft_strlen.s \
ft_strcpy.s \
2024-02-24 07:17:58 +00:00
OBJ = $(SRC:.s=.o)
%.o:%.s
nasm -f elf64 $< -o $@
all: $(NAME)
$(NAME): $(OBJ)
ar rcs libasm.a $(OBJ)
test: $(NAME)
2024-02-24 07:40:53 +00:00
gcc -Wall -Werror -Wextra -g main.c -L. -lasm -o libasm_unit_tests
2024-02-24 07:17:58 +00:00
clean:
rm $(OBJ)
fclean:
rm libasm.a
rm libasm_unit_tests
re: fclean all
.PHONY: all test