diff options
author | stefan <stefan@s00.xyz> | 2023-04-21 19:53:04 -0400 |
---|---|---|
committer | stefan <stefan@s00.xyz> | 2023-04-21 19:53:04 -0400 |
commit | eff82c45c589b42061344039d5f2efc8ad7c52df (patch) | |
tree | 4c5d89eea3fa74caba5d3dbfb8567643f3747e6d /lib/libfdt/Makefile | |
parent | 821706a3fea34c18a6171cf5169d5d6d852966de (diff) | |
download | sv-eff82c45c589b42061344039d5f2efc8ad7c52df.tar.gz |
libfdt port and the required libc functions
Diffstat (limited to 'lib/libfdt/Makefile')
-rw-r--r-- | lib/libfdt/Makefile | 21 |
1 files changed, 21 insertions, 0 deletions
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} |