finish tests for strlen and makefile works

This commit is contained in:
2025-03-27 20:07:18 +01:00
parent 589addcb91
commit 76cf33dd1c
4 changed files with 49 additions and 54 deletions

View File

@ -14,11 +14,12 @@ SRCS = $(addprefix $(SRCS_DIR)/, $(SRCS_NAMES))
OBJS = $(addprefix $(OBJS_DIR)/, $(SRCS_NAMES:.s=.o))
FLAGS = -felf64
all: $(NAME)
test: test.c $(NAME)
gcc -o test.o -c test.c
ld tests.c -L. -lasm
clang -z noexecstack test.c $(NAME) -o test
$(NAME): $(OBJS_DIR) $(OBJS)
ar rcs $@ $(OBJS)
@ -27,7 +28,7 @@ $(OBJS_DIR):
mkdir -p $(OBJS_DIR)
$(OBJS_DIR)/%.o: $(SRCS_DIR)/%.s
nasm -o $@ $<
nasm $(FLAGS) -o $@ $<
clean:
rm -rf $(OBJS_DIR)