aoqi@0: # aoqi@0: # Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. aoqi@0: # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. aoqi@0: # aoqi@0: # This code is free software; you can redistribute it and/or modify it aoqi@0: # under the terms of the GNU General Public License version 2 only, as aoqi@0: # published by the Free Software Foundation. aoqi@0: # aoqi@0: # This code is distributed in the hope that it will be useful, but WITHOUT aoqi@0: # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or aoqi@0: # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License aoqi@0: # version 2 for more details (a copy is included in the LICENSE file that aoqi@0: # accompanied this code). aoqi@0: # aoqi@0: # You should have received a copy of the GNU General Public License version aoqi@0: # 2 along with this work; if not, write to the Free Software Foundation, aoqi@0: # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. aoqi@0: # aoqi@0: # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA aoqi@0: # or visit www.oracle.com if you need additional information or have any aoqi@0: # questions. aoqi@0: # aoqi@0: # aoqi@0: aoqi@0: aoqi@0: # Rules for building adlc.exe aoqi@0: aoqi@0: # Need exception handling support here aoqi@0: # $(MS_RUNTIME_OPTION) ( with /D_STATIC_CPPLIB) aoqi@0: # causes adlc.exe to link with the static aoqi@0: # multithread Standard C++ library (libcpmt.lib) instead of aoqi@0: # the dynamic version (msvcprt.lib), which is not included aoqi@0: # in any of the free tools. aoqi@0: EXH_FLAGS=$(GX_OPTION) $(MS_RUNTIME_OPTION) aoqi@0: aoqi@0: !ifdef ALT_ADLC_PATH aoqi@0: ADLC=$(ALT_ADLC_PATH)\adlc.exe aoqi@0: !else aoqi@0: ADLC=adlc aoqi@0: !endif aoqi@0: aoqi@0: !ifdef LP64 aoqi@0: ADLCFLAGS=-q -T -D_LP64 aoqi@0: !else aoqi@0: ADLCFLAGS=-q -T -U_LP64 aoqi@0: !endif aoqi@0: aoqi@0: ADLC_CXX_FLAGS=$(CXX_FLAGS) /D _CRT_SECURE_NO_WARNINGS /D _CRT_SECURE_NO_DEPRECATE aoqi@0: aoqi@0: CXX_INCLUDE_DIRS=\ aoqi@0: /I "..\generated" \ aoqi@0: /I "$(WorkSpace)\src\share\vm" \ aoqi@0: /I "$(WorkSpace)\src\os\windows\vm" \ aoqi@0: /I "$(WorkSpace)\src\cpu\$(Platform_arch)\vm" aoqi@0: aoqi@0: !if "$(Platform_arch_model)" == "$(Platform_arch)" aoqi@0: SOURCES_AD=\ aoqi@0: $(WorkSpace)/src/cpu/$(Platform_arch)/vm/$(Platform_arch_model).ad aoqi@0: !else aoqi@0: SOURCES_AD=\ aoqi@0: $(WorkSpace)/src/cpu/$(Platform_arch)/vm/$(Platform_arch_model).ad \ aoqi@0: $(WorkSpace)/src/cpu/$(Platform_arch)/vm/$(Platform_arch).ad aoqi@0: !endif aoqi@0: aoqi@0: # NOTE! If you add any files here, you must also update GENERATED_NAMES_IN_DIR aoqi@0: # and ProjectCreatorIDEOptions in projectcreator.make. aoqi@0: GENERATED_NAMES=\ aoqi@0: ad_$(Platform_arch_model).cpp \ aoqi@0: ad_$(Platform_arch_model).hpp \ aoqi@0: ad_$(Platform_arch_model)_clone.cpp \ aoqi@0: ad_$(Platform_arch_model)_expand.cpp \ aoqi@0: ad_$(Platform_arch_model)_format.cpp \ aoqi@0: ad_$(Platform_arch_model)_gen.cpp \ aoqi@0: ad_$(Platform_arch_model)_misc.cpp \ aoqi@0: ad_$(Platform_arch_model)_peephole.cpp \ aoqi@0: ad_$(Platform_arch_model)_pipeline.cpp \ aoqi@0: adGlobals_$(Platform_arch_model).hpp \ aoqi@0: dfa_$(Platform_arch_model).cpp aoqi@0: aoqi@0: # NOTE! This must be kept in sync with GENERATED_NAMES aoqi@0: GENERATED_NAMES_IN_DIR=\ aoqi@0: $(AdlcOutDir)\ad_$(Platform_arch_model).cpp \ aoqi@0: $(AdlcOutDir)\ad_$(Platform_arch_model).hpp \ aoqi@0: $(AdlcOutDir)\ad_$(Platform_arch_model)_clone.cpp \ aoqi@0: $(AdlcOutDir)\ad_$(Platform_arch_model)_expand.cpp \ aoqi@0: $(AdlcOutDir)\ad_$(Platform_arch_model)_format.cpp \ aoqi@0: $(AdlcOutDir)\ad_$(Platform_arch_model)_gen.cpp \ aoqi@0: $(AdlcOutDir)\ad_$(Platform_arch_model)_misc.cpp \ aoqi@0: $(AdlcOutDir)\ad_$(Platform_arch_model)_peephole.cpp \ aoqi@0: $(AdlcOutDir)\ad_$(Platform_arch_model)_pipeline.cpp \ aoqi@0: $(AdlcOutDir)\adGlobals_$(Platform_arch_model).hpp \ aoqi@0: $(AdlcOutDir)\dfa_$(Platform_arch_model).cpp aoqi@0: aoqi@0: {$(WorkSpace)\src\share\vm\adlc}.cpp.obj:: aoqi@0: $(CXX) $(ADLC_CXX_FLAGS) $(EXH_FLAGS) $(CXX_INCLUDE_DIRS) /c $< aoqi@0: aoqi@0: {$(WorkSpace)\src\share\vm\opto}.cpp.obj:: aoqi@0: $(CXX) $(ADLC_CXX_FLAGS) $(EXH_FLAGS) $(CXX_INCLUDE_DIRS) /c $< aoqi@0: aoqi@0: adlc.exe: main.obj adlparse.obj archDesc.obj arena.obj dfa.obj dict2.obj filebuff.obj \ aoqi@0: forms.obj formsopt.obj formssel.obj opcodes.obj output_c.obj output_h.obj aoqi@0: $(LD) $(LD_FLAGS) /subsystem:console /out:$@ $** aoqi@0: !if "$(MT)" != "" aoqi@0: # The previous link command created a .manifest file that we want to aoqi@0: # insert into the linked artifact so we do not need to track it aoqi@0: # separately. Use ";#2" for .dll and ";#1" for .exe: aoqi@0: $(MT) /manifest $@.manifest /outputresource:$@;#1 aoqi@0: !endif aoqi@0: aoqi@0: $(GENERATED_NAMES_IN_DIR): $(Platform_arch_model).ad adlc.exe aoqi@0: rm -f $(GENERATED_NAMES) aoqi@0: if exist $(AdlcOutDir) rmdir /s /q $(AdlcOutDir) aoqi@0: mkdir $(AdlcOutDir) aoqi@0: $(ADLC) $(ADLCFLAGS) $(Platform_arch_model).ad aoqi@0: mv $(GENERATED_NAMES) $(AdlcOutDir)/ aoqi@0: aoqi@0: $(Platform_arch_model).ad: $(SOURCES_AD) aoqi@0: rm -f $(Platform_arch_model).ad aoqi@0: cat $(SOURCES_AD) >$(Platform_arch_model).ad