From 5db066eb5184cc45e7634838b5b0b8c67cb2ae25 Mon Sep 17 00:00:00 2001 From: Danny Holman Date: Wed, 5 Jun 2024 13:47:01 -0500 Subject: libc: create a skeleton libc and build targets Create build targets for a skeleton libc that only includes enough functionality to get a cross compiler running. Signed-off-by: Danny Holman --- Makefile | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..373bc3c --- /dev/null +++ b/Makefile @@ -0,0 +1,26 @@ +ROOT:=$(PWD) +SYS_INCLUDE:=-I$(ROOT)/include +SYS_ROOT?=$(ROOT)/sysroot +export SYS_INCLUDE +export SYS_ROOT +export ROOT + +ARCH?=i386 +export ARCH + +SUBDIRS?=libc \ + +.PHONY: all install clean + +all: + for d in $(SUBDIRS); do $(MAKE) -C $$d; done + +install: + install -d $(SYS_ROOT)/usr + install -d $(SYS_ROOT)/lib + install -d $(SYS_ROOT)/bin + install -d $(SYS_ROOT)/sbin + for d in $(SUBDIRS); do $(MAKE) -C $$d install; done + +clean: + for d in $(SUBDIRS); do $(MAKE) -C $$d clean; done -- cgit v1.2.3