」 feat(write + strcmp): fixed strcmp, write done ! first syscall git status :D

This commit is contained in:
y-syo
2025-12-05 20:15:39 +01:00
parent 0d80bed612
commit 09649f52d5
4 changed files with 87 additions and 5 deletions

44
Makefile Normal file
View File

@@ -0,0 +1,44 @@
SHELL = bash
# --- lib ---
NAME = libasm.a
OBJ_DIR = obj/
SRC_DIR = src/
SRC = $(shell find $(SRC_DIR) -name '*.s')
OBJ = $(addprefix $(OBJ_DIR), $(SRC:.s=.o))
AS = nasm
ASFLAGS = -f elf64
# --- tester ---
t_CC = gcc
t_CFLAGS = -z noexecstack
t_SRC = src/tests/main.c
t_NAME = tester
all: $(NAME)
$(NAME): $(OBJ)
ar rcs -o $@ $(OBJ)
$(OBJ_DIR)%.o: %.s
@mkdir -p $(@D)
$(AS) $(ASFLAGS) $< -o $@
clean:
rm -rf $(OBJ_DIR)
fclean: clean
rm $(NAME)
re: fclean
$(MAKE) -s all
test: $(OBJ)
$(t_CC) $(OBJ) $(t_SRC) $(t_CFLAGS) -o $(t_NAME)
.PHONY: clean fclean all re