Makefile 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # $OpenBSD: Makefile,v 1.7 2017/05/05 10:49:28 jsg Exp $
  2. ONLY_FOR_ARCHS= ${GCC4_ARCHS} ${CLANG_ARCHS}
  3. COMMENT= Device Tree Blobs
  4. DISTNAME= linux-4.11
  5. PKGNAME= ${DISTNAME:S/linux/dtb/}
  6. CATEGORIES= sysutils
  7. HOMEPAGE= http://www.devicetree.org
  8. MAINTAINER= Jonathan Gray <jsg@openbsd.org>
  9. # dual GPL/BSD
  10. PERMIT_PACKAGE_CDROM= Yes
  11. MASTER_SITES= https://cdn.kernel.org/pub/linux/kernel/v4.x/
  12. EXTRACT_SUFX= .tar.xz
  13. PKG_ARCH= *
  14. MODULES= lang/clang
  15. MODCLANG_ARCHS= ${GCC4_ARCHS}
  16. BUILD_DEPENDS= devel/dtc
  17. NO_TEST= Yes
  18. ARCHS= arm arm64 mips powerpc
  19. do-build:
  20. .for ARCH in ${ARCHS}
  21. cd ${WRKSRC}/arch/${ARCH}/boot/dts ; \
  22. for vendor in `find . -type d ! -name include` ; do \
  23. cd ${WRKSRC}/arch/${ARCH}/boot/dts/$$vendor ; \
  24. for dts in `ls *.dts` ; do \
  25. clang-cpp -nostdinc -I . -I include -I${WRKSRC}/include \
  26. -undef -D__DTS__ -x assembler-with-cpp $$dts \
  27. | dtc -I dts -O dtb -o `echo "$$dts" \
  28. | sed -e 's/\.dts$$/\.dtb/'` - ; \
  29. done ; \
  30. done
  31. .endfor
  32. do-install:
  33. ${INSTALL_DATA_DIR} ${PREFIX}/share/dtb
  34. .for ARCH in ${ARCHS}
  35. ${INSTALL_DATA_DIR} ${PREFIX}/share/dtb/${ARCH}
  36. cd ${WRKSRC}/arch/${ARCH}/boot/dts ; \
  37. for vendor in `find . -type d ! -name include` ; do \
  38. ${INSTALL_DATA_DIR} ${PREFIX}/share/dtb/${ARCH}/$$vendor ; \
  39. cd ${WRKSRC}/arch/${ARCH}/boot/dts/$$vendor ; \
  40. for dtb in `ls *.dtb` ; do \
  41. ${INSTALL_DATA} ${WRKSRC}/arch/${ARCH}/boot/dts/$$vendor/$$dtb \
  42. ${PREFIX}/share/dtb/${ARCH}/$$vendor ; \
  43. done ; \
  44. done
  45. .endfor
  46. .include <bsd.port.mk>