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