28 lines
318 B
Makefile
28 lines
318 B
Makefile
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
|