source: trunk/openjdk/hotspot/make/os2/makefiles/adlc.make

Last change on this file was 325, checked in by dmik, 14 years ago

hotspot: Add C compiler and separate C flags from C++ flags.

File size: 3.1 KB
Line 
1#
2# Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved.
3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4#
5# This code is free software; you can redistribute it and/or modify it
6# under the terms of the GNU General Public License version 2 only, as
7# published by the Free Software Foundation.
8#
9# This code is distributed in the hope that it will be useful, but WITHOUT
10# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12# version 2 for more details (a copy is included in the LICENSE file that
13# accompanied this code).
14#
15# You should have received a copy of the GNU General Public License version
16# 2 along with this work; if not, write to the Free Software Foundation,
17# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18#
19# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
20# CA 95054 USA or visit www.sun.com if you need additional information or
21# have any questions.
22#
23#
24
25# adlc is an internal tool, always generate the debug version with assert()
26CPP_FLAGS += -DASSERT
27C_FLAGS += $(DEBUG_OPT_OPTION)
28LINK_FLAGS += $(DEBUG_LINK_FLAGS)
29
30# Rules for building adlc.exe
31
32ifdef ALT_ADLC_PATH
33ADLC=$(ALT_ADLC_PATH)/adlc.exe
34else
35ADLC=adlc
36endif
37
38CPP_INCLUDE_DIRS=\
39 -I'../generated' \
40 -I'$(WorkSpace)/src/share/vm/' \
41 -I'$(WorkSpace)/src/os/windows/vm' \
42 -I'$(WorkSpace)/src/cpu/$(Platform_arch)/vm'
43
44# NOTE! If you add any files here, you must also update GENERATED_NAMES_IN_DIR
45# and ProjectCreatorIDEOptions in projectcreator.make.
46GENERATED_NAMES=\
47 ad_$(Platform_arch_model).cpp \
48 ad_$(Platform_arch_model).hpp \
49 ad_$(Platform_arch_model)_clone.cpp \
50 ad_$(Platform_arch_model)_expand.cpp \
51 ad_$(Platform_arch_model)_format.cpp \
52 ad_$(Platform_arch_model)_gen.cpp \
53 ad_$(Platform_arch_model)_misc.cpp \
54 ad_$(Platform_arch_model)_peephole.cpp \
55 ad_$(Platform_arch_model)_pipeline.cpp \
56 adGlobals_$(Platform_arch_model).hpp \
57 dfa_$(Platform_arch_model).cpp
58
59# NOTE! This must be kept in sync with GENERATED_NAMES
60GENERATED_NAMES_IN_DIR=$(GENERATED_NAMES:%=$(AdlcOutDir)/%)
61
62VPATH += $(WorkSpace)/src/share/vm/adlc;$(WorkSpace)/src/share/vm/opto
63
64%.obj: %.cpp
65 $(CXX) $(CPP_INCLUDE_DIRS) $(CXX_FLAGS) -c $< -o $@
66
67adlc.exe: main.obj adlparse.obj archDesc.obj arena.obj dfa.obj dict2.obj filebuff.obj \
68 forms.obj formsopt.obj formssel.obj opcodes.obj output_c.obj output_h.obj
69 $(LINK) $(LINK_FLAGS) -o $@ $^
70
71.NOTPARALLEL: $(GENERATED_NAMES_IN_DIR)
72
73$(GENERATED_NAMES_IN_DIR): $(Platform_arch_model).ad adlc.exe
74 rm -f $(GENERATED_NAMES)
75 if [ -d $(AdlcOutDir) ]; then rm -rf $(AdlcOutDir); fi
76 mkdir -p $(AdlcOutDir)
77 $(ADLC) $(ADLCFLAGS) $(Platform_arch_model).ad
78 mv $(GENERATED_NAMES) $(AdlcOutDir)/
79
80$(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
81 rm -f $(Platform_arch_model).ad
82 cat $(WorkSpace)/src/cpu/$(Platform_arch)/vm/$(Platform_arch_model).ad \
83 $(WorkSpace)/src/os_cpu/windows_$(Platform_arch)/vm/windows_$(Platform_arch_model).ad >$(Platform_arch_model).ad
Note: See TracBrowser for help on using the repository browser.