chore: comply with subject

This commit is contained in:
gbrochar 2024-03-11 15:32:39 +01:00
parent 8331a437c0
commit bb43c3b95a
7 changed files with 16 additions and 23 deletions

View File

@ -1,5 +1,7 @@
NAME = libasm NAME = libasm
MAKE = make --no-print-directory
SRC = \ SRC = \
ft_strlen.s \ ft_strlen.s \
ft_strcpy.s \ ft_strcpy.s \
@ -7,34 +9,34 @@ SRC = \
ft_write.s \ ft_write.s \
ft_read.s \ ft_read.s \
ft_strdup.s \ ft_strdup.s \
ft_list_size.s \
ft_list_push_front.s \ SRCBONUS = \
ft_list_sort.s \ ft_list_size_bonus.s \
ft_list_remove_if.s \ ft_list_push_front_bonus.s \
ft_atoi_base.s \ ft_list_sort_bonus.s \
ft_list_remove_if_bonus.s \
ft_atoi_base_bonus.s \
OBJ = $(SRC:.s=.o) OBJ = $(SRC:.s=.o)
OBJBONUS = $(SRCBONUS:.s=.o)
%.o:%.s %.o:%.s
nasm -f elf64 $< -o $@ nasm -f elf64 $< -o $@
all: $(NAME) all: $(NAME)
bonus: all bonus: $(OBJ) $(OBJBONUS)
ar rcs libasm.a $(OBJ) $(OBJBONUS)
$(NAME): $(OBJ) $(NAME): $(OBJ)
ar rcs libasm.a $(OBJ) ar rcs libasm.a $(OBJ)
test: $(NAME)
gcc -Wall -Werror -Wextra -g ft_list_print.c main.c -L. -lasm -o libasm_unit_tests
clean: clean:
rm $(OBJ) rm -fv $(OBJ) $(OBJBONUS)
fclean: fclean: clean
rm libasm.a rm -fv libasm.a
rm libasm_unit_tests
re: fclean all re: fclean all
.PHONY: all test .PHONY: all bonus clean fclean re

View File

@ -1,9 +0,0 @@
#include "libasm.h"
#include <stdio.h>
void ft_list_print(t_list *begin_list) {
while (begin_list) {
printf("%s", (char *)begin_list->data);
begin_list = begin_list->next;
}
}