5324 .comment section on kmdb kmods is not set properly
[illumos-gate.git] / usr / src / cmd / mdb / Makefile.kmdb.targ
blob920a5603207bf61f79ea727cf006db9f3ce95991
2 # CDDL HEADER START
4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
19 # CDDL HEADER END
22 # Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23 # Use is subject to license terms.
26 ROOTTERMINFO = $(ROOTSHLIB)/terminfo
28 $(PROG).core: $(OBJS) $(KMDBLIBS) $(MAPFILE)
29         $(LD) -r $(BREDUCE) $(ZNOVERSION) $(ZDEFS) -M$(MAPFILE) -o $@ $(OBJS) \
30             $(KMDBLIBS)
32 $(PROG): $(PROG).core $(KCTLOBJS)
33         $(LD) -dy -r -o $@ $@.core -Nmisc/ctf $(KCTLOBJS)
34         $(CTFMERGE) -L VERSION -o $@ $(OBJS) $(KCTLOBJS)
35         $(KMDB_FPTEST)
36         $(POST_PROCESS)
37         $(SETDYNFLAG) -f DF_1_IGNMULDEF,DF_1_NOKSYMS $@
39 clean.lint:
40         $(RM) $(ALLLINTFILES)
42 clean:
43         $(RM) $(OBJS) $(KCTLOBJS) $(PROG).core $(MAPFILE)
44         $(RM) $(MAPFILE_INTERMEDIATE)
45         $(RM) kmdb_terminfo.c kmdb_modlinktest.c kmdb_modlinktest.o
46         $(RM) kaif_off.h kmdb_context_off.h
47         $(RM) mdb_lex.c mdb_grammar.c mdb_grammar.h y.tab.h y.tab.c y.output
49 clobber: clean clean.lint
50         $(RM) $(PROG)
52 dmods:
55 # Specialized object construction
57 kmdb_terminfo.c:        ../../../common/mdb/mdb_termio.c \
58                         ../../../common/kmdb/kmdb_terminfo_skel.c \
59                         $(ROOTTERMINFO)
60         TERMINFO=$(ROOTTERMINFO) $(TIGEN) -s \
61             ../../../common/kmdb/kmdb_terminfo_skel.c \
62             -t ../../../common/mdb/mdb_termio.c \
63             $(SUPPORTED_TERMS) > $@
65 $(MAPFILE_INTERMEDIATE): $(MAPFILE_SOURCES) $(MAPFILE_TEMPLATE)
66         $(HDR2MAP) -t $(MAPFILE_TEMPLATE) $(MAPFILE_SOURCES) >$@
68 $(MAPFILE): $(MAPFILE_INTERMEDIATE)
69         $(CPP) -P $(SACPPFLAGS) <$(MAPFILE_INTERMEDIATE) >$@
71 mdb_lex.c: ../../../common/mdb/mdb_lex.l mdb_grammar.h
72         $(LEX) $(LFLAGS) ../../../common/mdb/mdb_lex.l > $@
74 mdb_grammar.h mdb_grammar.c: ../../../common/mdb/mdb_grammar.y
75         $(YACC) $(YFLAGS) ../../../common/mdb/mdb_grammar.y
76         @$(MV) y.tab.h mdb_grammar.h
77         @$(MV) y.tab.c mdb_grammar.c
80 # These should really be combined into a dynamic rule, but there's a bug in
81 # dmake that'll cause it to get confused about dependencies if we do.
84 kaif_off.h := CPPFLAGS += $(SACPPCFLAGS)
86 kmdb_modlinktest.c: $(MAPFILE_INTERMEDIATE)
87         $(MAP2LINKTEST) <$(MAPFILE_INTERMEDIATE) >$@
88         $(CPP) -P $(SACPPFLAGS) <$(MAPFILE_INTERMEDIATE) >$(MAPFILE)
91 # Dynamic rules for object construction
93 %.o: ../../../common/kmdb/%.c
94         $(COMPILE.c) -o $@ $<
95         $(CTFCONVERT_O)
97 %.o: ../../../common/kmdb/kctl/%.c
98         $(COMPILE.c) -o $@ $<
99         $(CTFCONVERT_O)
101 %.o: ../../../common/kmdb/kctl/%.s
102         $(COMPILE.s) -o $@ $<
104 %.o: ../../../common/mdb/%.c
105         $(COMPILE.c) -o $@ $<
106         $(CTFCONVERT_O)
108 %.o: ../../kmdb/%.c
109         $(COMPILE.c) -o $@ $<
110         $(CTFCONVERT_O)
112 %.o: ../../kmdb/%.s
113         $(COMPILE.s) -o $@ $<
115 %.o: ../../kmdb/kctl/%.c
116         $(COMPILE.c) -o $@ $<
117         $(CTFCONVERT_O)
119 %.o: ../../kmdb/kctl/%.s
120         $(COMPILE.s) -o $@ $<
122 %.o: ../../mdb/%.c
123         $(COMPILE.c) -o $@ $<
124         $(CTFCONVERT_O)
126 %.o: %.c
127         $(COMPILE.c) -o $@ $<
128         $(CTFCONVERT_O)
130 %.o: %.s
131         $(COMPILE.s) -o $@ $<
133 %.o: kctl/%.s
134         $(COMPILE.s) -o $@ $<
136 %.o: $(SRC)/common/net/util/%.c
137         $(COMPILE.c) $<
138         $(CTFCONVERT_O)
140 %.o: $(SRC)/common/util/%.c
141         $(COMPILE.c) $<
142         $(CTFCONVERT_O)
145 # Lint
148 %.ln: ../../../common/kmdb/%.c
149         $(LINT.c) -c $<
151 %.ln: ../../../common/kmdb/kctl/%.c
152         $(LINT.c) -c $<
154 %.ln: ../../../common/kmdb/kctl/%.s
155         $(LINT.s) -c $<
157 %.ln: ../../../common/mdb/%.c
158         $(LINT.c) -c $<
160 %.ln: ../../kmdb/%.c
161         $(LINT.c) -c $<
163 %.ln: ../../kmdb/%.s
164         $(LINT.s) -c $<
166 %.ln: ../../kmdb/kctl/%.c
167         $(LINT.c) -c $<
169 %.ln: ../../kmdb/kctl/%.s
170         $(LINT.s) -c $<
172 %.ln: ../../mdb/%.c
173         $(LINT.c) -c $<
175 %.ln: %.c
176         $(LINT.c) -c $<
178 %.ln: %.s
179         $(LINT.s) -c $<
181 %.ln: kctl/%.s
182         $(LINT.s) -c $<
184 %.ln: $(SRC)/common/net/util/%.c
185         $(LINT.c) -c $<
187 %.ln: $(SRC)/common/util/%.c
188         $(LINT.c) -c $<