Makefile 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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:= gettext-tiny-host glib-host flex-host bison-host qemu-host
  11. PKG_BUILDDEP+= alsa-lib xproto libjpeg-turbo zlib giflib libpng freetype cups
  12. PKG_BUILDDEP+= libX11 libXt libXp libXinerama libXrender libXtst libiconv-tiny
  13. PKG_DEPENDS:= zlib libstdcxx libffi libpthread libxtst libxi libgcc
  14. PKG_URL:= http://openjdk.org/
  15. PKG_SITES:= http://icedtea.classpath.org/download/source/
  16. DISTFILES:= icedtea-$(PKG_VERSION).tar.gz
  17. WRKDIST= ${WRKDIR}/icedtea-${PKG_VERSION}
  18. PKG_HOST_DEPENDS:= linux
  19. PKG_ARCH_DEPENDS:= arm mips ppc sparc x86 x86_64
  20. PKG_SYSTEM_DEPENDS:= !linksys-ag241 !fon-fon2100 !broadcom-bcm47xx !lemote-yeelong
  21. PKG_SUBPKGS:= OPENJDK7
  22. PKG_CHOICES_OPENJDK7:= ZERO SHARK CACAO
  23. PKGCD_ZERO:= zero-assembly backend
  24. PKGCD_SHARK:= Shark JIT backend (needs eglibc/glibc)
  25. PKGCB_SHARK:= llvm
  26. PKGCD_CACAO:= Cacao JIT backend
  27. include $(TOPDIR)/mk/package.mk
  28. include $(TOPDIR)/mk/qemu.mk
  29. $(eval $(call PKG_template,OPENJDK7,openjdk7,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  30. # for UINTPTR_MAX in stdint.h
  31. TARGET_CFLAGS+= -D__STDC_LIMIT_MACROS
  32. # segfaults with march=pentium-m/atom
  33. TARGET_CFLAGS:= $(subst march=pentium-m,march=i686,$(TARGET_CFLAGS))
  34. TARGET_CFLAGS:= $(subst march=atom,march=i686,$(TARGET_CFLAGS))
  35. TARGET_CFLAGS:= $(filter-out -fhonour-copts,$(TARGET_CFLAGS))
  36. BOOTSTRAPJDK:= ${STAGING_JAVA_HOST_DIR}/bootstrap-jdk
  37. JDKARCH:= $(CPU_ARCH)
  38. ifeq ($(ARCH),x86)
  39. JDKARCH:= i386
  40. endif
  41. ifeq ($(ADK_TARGET_SYSTEM_LEMOTE_YEELONG),y)
  42. JDKARCH:= mipsel
  43. endif
  44. ifeq ($(ADK_PACKAGE_OPENJDK7_ZERO),y)
  45. CONFIGURE_BACKEND:= --enable-zero
  46. endif
  47. ifeq ($(ADK_PACKAGE_OPENJDK7_SHARK),y)
  48. CONFIGURE_BACKEND:= --enable-shark \
  49. --with-llvm-config=$(STAGING_TARGET_DIR)/usr/bin/llvm-config
  50. endif
  51. ifeq ($(ADK_PACKAGE_OPENJDK7_CACAO),y)
  52. CONFIGURE_BACKEND:= --enable-cacao
  53. endif
  54. CONFIGURE_COMMON:= --disable-docs \
  55. --with-jdk-home=$(BOOTSTRAPJDK) \
  56. --with-java=$(BOOTSTRAPJDK)/bin/java \
  57. --with-javac=$(BOOTSTRAPJDK)/bin/javac \
  58. --with-javah=$(BOOTSTRAPJDK)/bin/javah \
  59. --with-jar=$(BOOTSTRAPJDK)/bin/jar \
  60. --with-rmic=$(BOOTSTRAPJDK)/bin/rmic \
  61. --with-native2ascii=$(BOOTSTRAPJDK)/bin/native2ascii \
  62. --with-gcj=$(STAGING_JAVA_HOST_DIR)/usr/bin/gcj \
  63. --without-hotspot-build \
  64. --disable-system-jpeg \
  65. --disable-system-lcms \
  66. --disable-system-zlib \
  67. --disable-system-png \
  68. --disable-system-gif \
  69. --disable-system-gtk \
  70. --disable-system-gio \
  71. --disable-system-fontconfig \
  72. --disable-compile-against-syscalls \
  73. --without-rhino
  74. CONFIGURE_ARGS+= $(CONFIGURE_BACKEND)
  75. CONFIGURE_ARGS+= $(CONFIGURE_COMMON)
  76. CONFIGURE_ARGS+= --disable-bootstrap
  77. CONFIGURE_ENV+= PATH="$(STAGING_JAVA_HOST_DIR)/usr/bin:$${PATH}"
  78. MAKE_ENV+= ALT_COMPILER_PATH=$(STAGING_HOST_DIR)/$(REAL_GNU_TARGET_NAME) \
  79. ALT_OPENWIN_HOME=$(STAGING_DIR)/usr/ \
  80. ALT_CUPS_HEADERS_PATH=$(STAGING_DIR)/usr/include/ \
  81. ALT_FREETYPE_HEADERS_PATH=$(STAGING_DIR)/usr/include/ \
  82. OTHER_CFLAGS='$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)' \
  83. OTHER_CXXFLAGS='$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)' \
  84. GCC_HONOUR_COPTS=s CROSS_COMPILE_ARCH=$(JDKARCH) QEMU=$(QEMU)
  85. ALL_TARGET:= icedtea
  86. openjdk7-install:
  87. $(INSTALL_DIR) $(IDIR_OPENJDK7)/usr/lib/jvm/jre
  88. $(INSTALL_DIR) $(IDIR_OPENJDK7)/usr/bin
  89. $(CP) $(WRKBUILD)/openjdk.build/j2re-image/bin $(IDIR_OPENJDK7)/usr/lib/jvm/jre
  90. $(CP) $(WRKBUILD)/openjdk.build/j2re-image/lib $(IDIR_OPENJDK7)/usr/lib/jvm/jre
  91. (cd $(IDIR_OPENJDK7)/usr/bin && ln -sf ../lib/jvm/jre/bin/java .)
  92. (cd $(IDIR_OPENJDK7)/usr/lib/jvm/jre/lib/$(JDKARCH) && ln -sf server/libjvm.so .)
  93. include ${TOPDIR}/mk/pkg-bottom.mk