Use wildcard for *.c files

This commit is contained in:
NukeBird 2025-11-30 18:35:17 +03:00
parent 007c6267ac
commit 6c6f7eb902
2 changed files with 22 additions and 1 deletions

View file

@ -98,3 +98,24 @@ i32 axl_strcmp(const i8* s1, const i8* s2)
return 0;
}
i32 axl_strncmp(const i8* s1, const i8* s2, u32 n)
{
if (!s1 || !s2)
{
return (s1 == s2) ? 0 : (!s1 ? -1 : 1);
}
for (u32 i = 0; i < n; s1++, s2++)
{
u8 c1 = *(const u8*)s1;
u8 c2 = *(const u8*)s2;
if (c1 != c2 || c1 == '\0' || c2 == '\0')
{
return c1 - c2;
}
}
return 0;
}

View file

@ -2,7 +2,7 @@ CC = clang
CFLAGS = -Wall -Wextra -Werror -pedantic -std=c11 -nostdlib -static -Oz -ffreestanding
LDFLAGS = -Wl,/SUBSYSTEM:CONSOLE,/ENTRY:_start -fuse-ld=lld
LIBS = -lkernel32
SOURCES = main.c axl_memory.c
SOURCES = $(wildcard *.c)
TARGET = prog.exe
all: clean $(TARGET)