Makefile 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include $(TOPDIR)/rules.mk
  4. PKG_NAME:= openjdk7
  5. PKG_VERSION:= 2.3.9
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= e96e5e578d442d3ae56cd332e8dbc6b6
  8. PKG_DESCR:= OpenJDK 7 Java VM
  9. PKG_SECTION:= lang
  10. PKG_BUILDDEP:= alsa-lib xproto jpeg zlib giflib libpng freetype cups
  11. PKG_BUILDDEP+= libX11 libXt libXp libXinerama libXrender libXtst libiconv-tiny
  12. PKG_DEPENDS:= zlib libstdcxx libffi libpthread libxtst libxi libgcc
  13. PKG_URL:= http://openjdk.org/
  14. PKG_SITES:= http://icedtea.classpath.org/download/source/
  15. DISTFILES:= icedtea-$(PKG_VERSION).tar.gz
  16. WRKDIST= ${WRKDIR}/icedtea-${PKG_VERSION}
  17. PKG_HOST_DEPENDS:= !darwin !cygwin !openbsd !netbsd !freebsd
  18. PKG_ARCH_DEPENDS:= arm mips x86 x86_64
  19. PKG_SYSTEM_DEPENDS:= !linksys-ag241 !fon-fon2100 !broadcom-bcm47xx !lemote-yeelong
  20. PKG_SUBPKGS:= OPENJDK7
  21. PKG_CHOICES_OPENJDK7:= ZERO SHARK CACAO
  22. PKGCD_ZERO:= zero-assembly backend
  23. PKGCD_SHARK:= Shark JIT backend (needs eglibc/glibc)
  24. PKGCB_SHARK:= llvm
  25. PKGCD_CACAO:= Cacao JIT backend
  26. include $(TOPDIR)/mk/package.mk
  27. $(eval $(call PKG_template,OPENJDK7,openjdk7,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  28. # for UINTPTR_MAX in stdint.h
  29. TARGET_CFLAGS+= -D__STDC_LIMIT_MACROS
  30. # segfaults with march=pentium-m/atom
  31. TARGET_CFLAGS:= $(subst march=pentium-m,march=i686,$(TARGET_CFLAGS))
  32. TARGET_CFLAGS:= $(subst march=atom,march=i686,$(TARGET_CFLAGS))
  33. TARGET_CFLAGS:= $(filter-out -fhonour-copts,$(TARGET_CFLAGS))
  34. BOOTSTRAPJDK:= ${STAGING_JAVA_HOST_DIR}/bootstrap-jdk
  35. JDKARCH:= $(ARCH)
  36. ifeq ($(ARCH),x86)
  37. JDKARCH:= i386
  38. endif
  39. ifeq ($(ADK_TARGET_SYSTEM_LEMOTE_YEELONG),y)
  40. JDKARCH:= mipsel
  41. endif
  42. ifeq ($(ADK_PACKAGE_OPENJDK7_ZERO),y)
  43. CONFIGURE_BACKEND:= --enable-zero
  44. endif
  45. ifeq ($(ADK_PACKAGE_OPENJDK7_SHARK),y)
  46. CONFIGURE_BACKEND:= --enable-shark \
  47. --with-llvm-config=$(STAGING_TARGET_DIR)/usr/bin/llvm-config
  48. endif
  49. ifeq ($(ADK_PACKAGE_OPENJDK7_CACAO),y)
  50. CONFIGURE_BACKEND:= --enable-cacao
  51. endif
  52. CONFIGURE_COMMON:= --disable-docs \
  53. --with-jdk-home=$(BOOTSTRAPJDK) \
  54. --with-java=$(BOOTSTRAPJDK)/bin/java \
  55. --with-javac=$(BOOTSTRAPJDK)/bin/javac \
  56. --with-javah=$(BOOTSTRAPJDK)/bin/javah \
  57. --with-jar=$(BOOTSTRAPJDK)/bin/jar \
  58. --with-rmic=$(BOOTSTRAPJDK)/bin/rmic \
  59. --with-native2ascii=$(BOOTSTRAPJDK)/bin/native2ascii \
  60. --with-gcj=$(STAGING_JAVA_HOST_DIR)/usr/bin/gcj \
  61. --without-hotspot-build \
  62. --disable-system-jpeg \
  63. --disable-system-lcms \
  64. --disable-system-zlib \
  65. --disable-system-png \
  66. --disable-system-gif \
  67. --disable-system-gtk \
  68. --disable-system-gio \
  69. --disable-system-fontconfig \
  70. --disable-compile-against-syscalls \
  71. --without-rhino
  72. CONFIGURE_ARGS+= $(CONFIGURE_BACKEND)
  73. CONFIGURE_ARGS+= $(CONFIGURE_COMMON)
  74. CONFIGURE_ARGS+= --disable-bootstrap
  75. CONFIGURE_ENV+= PATH=$(STAGING_JAVA_HOST_DIR)/usr/bin:$${PATH}:${STAGING_TARGET_DIR}/usr/bin
  76. MAKE_ENV+= ALT_COMPILER_PATH=$(STAGING_HOST_DIR)/$(REAL_GNU_TARGET_NAME) \
  77. ALT_OPENWIN_HOME=$(STAGING_DIR)/usr/ \
  78. ALT_CUPS_HEADERS_PATH=$(STAGING_DIR)/usr/include/ \
  79. ALT_FREETYPE_HEADERS_PATH=$(STAGING_DIR)/usr/include/ \
  80. OTHER_CFLAGS='$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)' \
  81. OTHER_CXXFLAGS='$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)' \
  82. GCC_HONOUR_COPTS=s CROSS_COMPILE_ARCH=$(JDKARCH) QEMU=$(QEMU)
  83. ALL_TARGET:= icedtea
  84. openjdk7-install:
  85. $(INSTALL_DIR) $(IDIR_OPENJDK7)/usr
  86. $(CP) $(WRKBUILD)/openjdk.build/j2re-image/* $(IDIR_OPENJDK7)/usr
  87. rm -rf $(IDIR_OPENJDK7)/usr/man
  88. include ${TOPDIR}/mk/pkg-bottom.mk