make/windows/makefiles/adlc.make

Thu, 06 Jan 2011 20:10:19 -0800

author
cl
date
Thu, 06 Jan 2011 20:10:19 -0800
changeset 2385
09d92cbb793b
parent 2369
aa6e219afbf1
child 3390
65149e74c706
permissions
-rw-r--r--

Added tag jdk7-b124 for changeset 0a8e0d4345b3

duke@435 1 #
stefank@2314 2 # Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
duke@435 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@435 4 #
duke@435 5 # This code is free software; you can redistribute it and/or modify it
duke@435 6 # under the terms of the GNU General Public License version 2 only, as
duke@435 7 # published by the Free Software Foundation.
duke@435 8 #
duke@435 9 # This code is distributed in the hope that it will be useful, but WITHOUT
duke@435 10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@435 11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@435 12 # version 2 for more details (a copy is included in the LICENSE file that
duke@435 13 # accompanied this code).
duke@435 14 #
duke@435 15 # You should have received a copy of the GNU General Public License version
duke@435 16 # 2 along with this work; if not, write to the Free Software Foundation,
duke@435 17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@435 18 #
trims@1907 19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
trims@1907 20 # or visit www.oracle.com if you need additional information or have any
trims@1907 21 # questions.
duke@435 22 #
duke@435 23 #
duke@435 24
duke@435 25
duke@435 26 # Rules for building adlc.exe
duke@435 27
duke@435 28 # Need exception handling support here
duke@435 29 # $(MS_RUNTIME_OPTION) ( with /D_STATIC_CPPLIB)
duke@435 30 # causes adlc.exe to link with the static
duke@435 31 # multithread Standard C++ library (libcpmt.lib) instead of
duke@435 32 # the dynamic version (msvcprt.lib), which is not included
duke@435 33 # in any of the free tools.
duke@435 34 EXH_FLAGS=$(GX_OPTION) $(MS_RUNTIME_OPTION)
duke@435 35
duke@435 36 !ifdef ALT_ADLC_PATH
duke@435 37 ADLC=$(ALT_ADLC_PATH)\adlc.exe
duke@435 38 !else
duke@435 39 ADLC=adlc
duke@435 40 !endif
duke@435 41
duke@435 42 !ifdef LP64
duke@435 43 ADLCFLAGS=-q -T -D_LP64
duke@435 44 !else
duke@435 45 ADLCFLAGS=-q -T -U_LP64
duke@435 46 !endif
duke@435 47
sla@2369 48 ADLC_CPP_FLAGS=$(CPP_FLAGS) /D _CRT_SECURE_NO_WARNINGS /D _CRT_SECURE_NO_DEPRECATE
duke@435 49
duke@435 50 CPP_INCLUDE_DIRS=\
stefank@2314 51 /I "..\generated" \
stefank@2314 52 /I "$(WorkSpace)\src\share\vm" \
stefank@2314 53 /I "$(WorkSpace)\src\os\windows\vm" \
duke@435 54 /I "$(WorkSpace)\src\cpu\$(Platform_arch)\vm"
duke@435 55
stefank@2314 56 # NOTE! If you add any files here, you must also update GENERATED_NAMES_IN_DIR
stefank@2314 57 # and ProjectCreatorIDEOptions in projectcreator.make.
duke@435 58 GENERATED_NAMES=\
duke@435 59 ad_$(Platform_arch_model).cpp \
duke@435 60 ad_$(Platform_arch_model).hpp \
duke@435 61 ad_$(Platform_arch_model)_clone.cpp \
duke@435 62 ad_$(Platform_arch_model)_expand.cpp \
duke@435 63 ad_$(Platform_arch_model)_format.cpp \
duke@435 64 ad_$(Platform_arch_model)_gen.cpp \
duke@435 65 ad_$(Platform_arch_model)_misc.cpp \
duke@435 66 ad_$(Platform_arch_model)_peephole.cpp \
duke@435 67 ad_$(Platform_arch_model)_pipeline.cpp \
duke@435 68 adGlobals_$(Platform_arch_model).hpp \
duke@435 69 dfa_$(Platform_arch_model).cpp
duke@435 70
duke@435 71 # NOTE! This must be kept in sync with GENERATED_NAMES
stefank@2314 72 GENERATED_NAMES_IN_DIR=\
stefank@2314 73 $(AdlcOutDir)\ad_$(Platform_arch_model).cpp \
stefank@2314 74 $(AdlcOutDir)\ad_$(Platform_arch_model).hpp \
stefank@2314 75 $(AdlcOutDir)\ad_$(Platform_arch_model)_clone.cpp \
stefank@2314 76 $(AdlcOutDir)\ad_$(Platform_arch_model)_expand.cpp \
stefank@2314 77 $(AdlcOutDir)\ad_$(Platform_arch_model)_format.cpp \
stefank@2314 78 $(AdlcOutDir)\ad_$(Platform_arch_model)_gen.cpp \
stefank@2314 79 $(AdlcOutDir)\ad_$(Platform_arch_model)_misc.cpp \
stefank@2314 80 $(AdlcOutDir)\ad_$(Platform_arch_model)_peephole.cpp \
stefank@2314 81 $(AdlcOutDir)\ad_$(Platform_arch_model)_pipeline.cpp \
stefank@2314 82 $(AdlcOutDir)\adGlobals_$(Platform_arch_model).hpp \
stefank@2314 83 $(AdlcOutDir)\dfa_$(Platform_arch_model).cpp
duke@435 84
duke@435 85 {$(WorkSpace)\src\share\vm\adlc}.cpp.obj::
sla@2369 86 $(CPP) $(ADLC_CPP_FLAGS) $(EXH_FLAGS) $(CPP_INCLUDE_DIRS) /c $<
duke@435 87
duke@435 88 {$(WorkSpace)\src\share\vm\opto}.cpp.obj::
sla@2369 89 $(CPP) $(ADLC_CPP_FLAGS) $(EXH_FLAGS) $(CPP_INCLUDE_DIRS) /c $<
duke@435 90
duke@435 91 adlc.exe: main.obj adlparse.obj archDesc.obj arena.obj dfa.obj dict2.obj filebuff.obj \
duke@435 92 forms.obj formsopt.obj formssel.obj opcodes.obj output_c.obj output_h.obj
duke@435 93 $(LINK) $(LINK_FLAGS) /subsystem:console /out:$@ $**
tbell@862 94 !if "$(MT)" != ""
tbell@862 95 # The previous link command created a .manifest file that we want to
tbell@862 96 # insert into the linked artifact so we do not need to track it
tbell@862 97 # separately. Use ";#2" for .dll and ";#1" for .exe:
tbell@862 98 $(MT) /manifest $@.manifest /outputresource:$@;#1
tbell@862 99 !endif
duke@435 100
stefank@2314 101 $(GENERATED_NAMES_IN_DIR): $(Platform_arch_model).ad adlc.exe
duke@435 102 rm -f $(GENERATED_NAMES)
stefank@2314 103 if exist $(AdlcOutDir) rmdir /s /q $(AdlcOutDir)
stefank@2314 104 mkdir $(AdlcOutDir)
duke@435 105 $(ADLC) $(ADLCFLAGS) $(Platform_arch_model).ad
stefank@2314 106 mv $(GENERATED_NAMES) $(AdlcOutDir)/
duke@435 107
duke@435 108 $(Platform_arch_model).ad: $(WorkSpace)/src/cpu/$(Platform_arch)/vm/$(Platform_arch_model).ad $(WorkSpace)/src/os_cpu/windows_$(Platform_arch)/vm/windows_$(Platform_arch_model).ad
duke@435 109 rm -f $(Platform_arch_model).ad
duke@435 110 cat $(WorkSpace)/src/cpu/$(Platform_arch)/vm/$(Platform_arch_model).ad \
duke@435 111 $(WorkSpace)/src/os_cpu/windows_$(Platform_arch)/vm/windows_$(Platform_arch_model).ad >$(Platform_arch_model).ad

mercurial