2 # Copyright (C) 2006,2007 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_SOURCE_URL
:=@SF
/sablevm
17 PKG_MD5SUM
:=18a7c1a92b0748a206f9767a76a6b3bb
19 include $(INCLUDE_DIR
)/package.mk
21 define Package
/sablevm
/Default
25 TITLE
:=A Java Virtual Machine
(JVM
) implementation
26 URL
:=http
://sablevm.org
/
27 DEPENDS
:=+libltdl
+libpopt
+libpthread
+zlib
30 define Package
/sablevm
/Default
/description
31 SableVM is a robust
, extremely portable
, efficient
, and specifications-
32 -compliant Java virtual machine that aims to be easy to maintain and to
33 extend. It features a state-of-the-art and efficient interpreter engine.
34 Its source code is very accessible and easy to understand. It also has
35 many robustness features that have been the object of careful design.
38 define Package
/sablevm
39 $(call Package
/sablevm
/Default
)
43 define Package
/sablevm
/description
44 $(call Package
/sablevm
/Default
/description
)
46 This package contains the full set of Java classes.
49 define Package
/sablevm-mini
50 $(call Package
/sablevm
/Default
)
54 define Package
/sablevm-mini
/description
55 $(call Package
/sablevm
/Default
/description
)
57 This package contains only the minimal set of Java classes needed to
58 run a simple
"HelloWorld" program
(included in this package
).
61 define Build
/Configure
62 $(call Build
/Configure
/Default
, \
66 $(call Build
/Configure
/Default
, \
67 --srcdir="./../sablevm" \
68 --with-fastjar
=/usr
/bin
/fastjar \
69 --with-jikes
=/usr
/bin
/jikes \
70 --with-internal-libffi
=yes \
71 --with-internal-libpopt
=no \
73 LIBS
=" -lltdl -lpopt -lz " \
76 $(call Build
/Configure
/Default
, \
77 --srcdir=.
/..
/sablevm-classpath \
78 --with-fastjar
=/usr
/bin
/fastjar \
79 --with-jikes
=/usr
/bin
/jikes \
89 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
92 DESTDIR
="$(PKG_INSTALL_DIR)" \
94 $(CP
) .
/files
/mini.classlist
$(PKG_BUILD_DIR
)/sablevm-classpath
/lib
/
95 ( cd
$(PKG_BUILD_DIR
)/sablevm-classpath
/lib
; \
96 fastjar
-Mcf mini.jar
-@
< mini.classlist
; \
98 mkdir
-p
$(PKG_INSTALL_DIR
)/usr
/share
/sablevm
/examples
99 $(CP
) .
/files
/*.java
$(PKG_INSTALL_DIR
)/usr
/share
/sablevm
/examples
/
100 ( cd
$(PKG_INSTALL_DIR
)/usr
/share
/sablevm
/examples
; \
101 jikes
-bootclasspath
"../../sablevm-classpath:../../sablevm-classpath/libclasspath.jar:../../sablevm-classpath/resources.jar" *.java
; \
105 define Package
/sablevm
/install
106 $(INSTALL_DIR
) $(1)/usr
/bin
107 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/{java-
,}sablevm
$(1)/usr
/bin
/
108 $(INSTALL_DIR
) $(1)/usr
/lib
109 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libsablevm-
*.so
$(1)/usr
/lib
/
110 $(INSTALL_DIR
) $(1)/usr
/lib
/sablevm-classpath
111 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/sablevm-classpath
/libjava
*.so
$(1)/usr
/lib
/sablevm-classpath
/
112 $(INSTALL_DIR
) $(1)/usr
/lib
/security
113 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/security
/classpath.security
$(1)/usr
/lib
/security
/
114 $(INSTALL_DIR
) $(1)/usr
/share
/sablevm-classpath
115 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/sablevm-classpath
/{libclasspath
,resources
}.jar \
116 $(1)/usr
/share
/sablevm-classpath
/
119 define Package
/sablevm-mini
/install
120 $(call Package
/sablevm
/install,$(1))
121 rm -f
$(1)/usr
/lib
/security
/classpath.security
122 rm -f
$(1)/usr
/share
/sablevm-classpath
/resources.jar
123 $(CP
) $(PKG_BUILD_DIR
)/sablevm-classpath
/lib
/mini.jar \
124 $(1)/usr
/share
/sablevm-classpath
/libclasspath.jar
125 $(INSTALL_DIR
) $(1)/usr
/share
/sablevm
/examples
126 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/sablevm
/examples
/* \
127 $(1)/usr
/share
/sablevm
/examples
/
130 $(eval
$(call BuildPackage
,sablevm
))
131 $(eval
$(call BuildPackage
,sablevm-mini
))
133 $(foreach command
, jikes fastjar
, \
134 $(eval
$(call RequireCommand
,$(command
), \
135 $(PKG_NAME
) requires
$(command
). \