From eff82c45c589b42061344039d5f2efc8ad7c52df Mon Sep 17 00:00:00 2001 From: stefan Date: Fri, 21 Apr 2023 19:53:04 -0400 Subject: libfdt port and the required libc functions --- lib/libfdt/Makefile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 lib/libfdt/Makefile (limited to 'lib/libfdt/Makefile') diff --git a/lib/libfdt/Makefile b/lib/libfdt/Makefile new file mode 100644 index 0000000..b9c7223 --- /dev/null +++ b/lib/libfdt/Makefile @@ -0,0 +1,21 @@ +BUILDDIR=build/${TARGET} +TARGETDIR=../../mainboard/${TARGET} + +.if !exists(${TARGETDIR}/conf/mainboard.conf) +.error 'ERROR: invalid target "${TARGET}"' +.else +.include <${TARGETDIR}/conf/mainboard.conf> +.endif + +SRC=fdt.c fdt_ro.c fdt_wip.c fdt_sw.c fdt_rw.c fdt_strerror.c fdt_empty_tree.c \ + fdt_addresses.c fdt_overlay.c fdt_check.c + + +${BUILDDIR}/libfdt.a: ${SRC} + mkdir -p ${BUILDDIR} + cd ${BUILDDIR} && ${CROSS_COMPILE}gcc -c ${CFLAGS} -nostdlib ${SRC:%=../../%} + cd ${BUILDDIR} && ${CROSS_COMPILE}ar -rcs ${@:T} ${SRC:T:%.c=%.o} + + +clean: + rm -rf ${BUILDDIR} -- cgit v1.2.3