diff options
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} |