Fix stub lib

This commit is contained in:
Alex 2023-04-07 05:28:13 +03:00
parent 1a2f662bf9
commit 78494d58eb
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD
3 changed files with 21 additions and 3 deletions

8
libs/include/libdraw.h Normal file
View File

@ -0,0 +1,8 @@
#ifndef __FENNIX_LIB_DRAW_H__
#define __FENNIX_LIB_DRAW_H__
#include <types.h>
void DrawRect(int x, int y, int w, int h, int color);
#endif // !__FENNIX_LIB_DRAW_H__

View File

@ -1,7 +1,15 @@
#include <libdraw.h>
#include "../../../Kernel/syscalls.h"
int stub()
void DrawRect(int x, int y, int w, int h, int color)
{
return 0;
int i, j;
for (i = 0; i < w; i++)
{
for (j = 0; j < h; j++)
{
// TODO: DrawPixel(x + i, y + j, color);
}
}
}

View File

@ -27,7 +27,9 @@ else ifeq ($(OSARCH), i386)
ASM_ARCH := elf32
endif
CFLAGS := -fPIC -fPIE -I../include -I../../libc/include
SIMD_FLAGS := -mno-sse -mno-sse2 -mno-sse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -mno-sse4 -mno-avx -mno-avx2 -mno-avx512f
CFLAGS := -fPIC -fPIE -I../include -I../../libc/include $(SIMD_FLAGS)
build: $(OBJECT_NAME)