javac.mk revision d1dbe7f5a23bacdff086b4992e1d31a96da706c3
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
11ifeq ($(EXPERIMENTAL_USE_JAVA7_OPENJDK),)
12common_flags := -target 1.5 -Xmaxerrs 9999999
13else
14common_flags := -Xmaxerrs 9999999
15endif
16
17
18# Whatever compiler is on this system.
19ifeq ($(BUILD_OS), windows)
20    COMMON_JAVAC := development/host/windows/prebuilt/javawrap.exe -J-Xmx256m \
21        $(common_flags)
22else
23    COMMON_JAVAC := javac -J-Xmx512M $(common_flags)
24endif
25
26# Eclipse.
27ifeq ($(CUSTOM_JAVA_COMPILER), eclipse)
28    COMMON_JAVAC := java -Xmx256m -jar prebuilt/common/ecj/ecj.jar -5 \
29        -maxProblems 9999999 -nowarn
30    $(info CUSTOM_JAVA_COMPILER=eclipse)
31endif
32
33HOST_JAVAC ?= $(COMMON_JAVAC)
34TARGET_JAVAC ?= $(COMMON_JAVAC)
35    
36#$(info HOST_JAVAC=$(HOST_JAVAC))
37#$(info TARGET_JAVAC=$(TARGET_JAVAC))
38