OSDN Git Service

am 366ac666: am 2b3b1409: am 6873be9e: am 5d2265cb: am ed5ea12b: am f09c7628: am...
[android-x86/build.git] / core / combo / javac.mk
1 # Selects a Java compiler.
2 #
3 # Inputs:
4 #       CUSTOM_JAVA_COMPILER -- "eclipse", "openjdk". or nothing for the system 
5 #                           default
6 #
7 # Outputs:
8 #   COMMON_JAVAC -- Java compiler command with common arguments
9
10 # Whatever compiler is on this system.
11 ifeq ($(BUILD_OS), windows)
12     COMMON_JAVAC := development/host/windows/prebuilt/javawrap.exe -J-Xmx256m \
13         -target 1.5 -Xmaxerrs 9999999
14 else
15     COMMON_JAVAC := javac -J-Xmx512M -target 1.5 -Xmaxerrs 9999999
16 endif
17
18 # Eclipse.
19 ifeq ($(CUSTOM_JAVA_COMPILER), eclipse)
20     COMMON_JAVAC := java -Xmx256m -jar prebuilt/common/ecj/ecj.jar -5 \
21         -maxProblems 9999999 -nowarn
22     $(info CUSTOM_JAVA_COMPILER=eclipse)
23 endif
24
25 # OpenJDK.
26 ifeq ($(CUSTOM_JAVA_COMPILER), openjdk)
27     # We set the VM options (like -Xmx) in the javac script.
28     COMMON_JAVAC := prebuilt/common/openjdk/bin/javac -target 1.5 \
29         -Xmaxerrs 9999999
30     $(info CUSTOM_JAVA_COMPILER=openjdk)
31 endif
32    
33 HOST_JAVAC ?= $(COMMON_JAVAC)
34 TARGET_JAVAC ?= $(COMMON_JAVAC)
35     
36 #$(info HOST_JAVAC=$(HOST_JAVAC))
37 #$(info TARGET_JAVAC=$(TARGET_JAVAC))