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 08:38:29 +00:00
|
|
|
ft_strcmp.s \
|
2024-02-26 04:47:24 +00:00
|
|
|
ft_write.s \
|
|
|
|
ft_read.s \
|
|
|
|
ft_strdup.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-26 04:48:37 +00:00
|
|
|
gcc -Wall -Werror -Wextra -no-pie -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
|