From d68e7acced381037f49d55d083c7059cd07bc76c Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sat, 2 Aug 2025 02:47:53 -0400 Subject: lib: Introduce libgfx This commit introduces libgfx which is a low-level graphics library and does not know anything about windows, display architecture, etc. The job of libgfx is soley to provide an API to draw shapes, graphical objects and perform operations on them. Signed-off-by: Ian Moffett --- lib/libgfx/Makefile | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 lib/libgfx/Makefile (limited to 'lib/libgfx/Makefile') diff --git a/lib/libgfx/Makefile b/lib/libgfx/Makefile new file mode 100644 index 0000000..1f866ac --- /dev/null +++ b/lib/libgfx/Makefile @@ -0,0 +1,30 @@ +CFLAGS = -c -fno-stack-protector -nostdlib -static \ + -Iinclude/ -I$(USRDIR)/include/ +CFILES = $(shell find src/ -name "*.c") +OBJ = $(CFILES:.c=.o) + +all: headers $(OBJ) build/libgfx.a + echo "----------------------------------------" + echo $(USRDIR) + mv build/libgfx.a $(USRDIR)/lib/ + cp -r include/ $(USRDIR)/include/ + +build/libgfx.a: + mkdir -p build/ + ar rcs build/libgfx.a $(OBJ) + +%.o: %.c + $(CC) $(CFLAGS) -Iinclude/ $< -o $@ + +.PHONY: headers +headers: + cp -rf include/* $(USRDIR)/include/ + +.PHONY: +build/: + mkdir -p build/ + +.PHONY: clean +clean: + rm -f $(OBJ) + rm -rf build/ -- cgit v1.2.3