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]
22 # Copyright 2007 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
26 ROOTTERMINFO = $(ROOT)/usr/share/terminfo
28 $(PROG).core: $(OBJS) $(KMDBLIBS) $(MAPFILE)
29 $(LD) -r $(LD_BREDUCE) $(LD_ZNOVERSION) $(LD_ZDEFS) -M$(MAPFILE) -o $@ $(OBJS) \
32 $(PROG): $(PROG).core $(KCTLOBJS)
33 $(LD) -dy -r -o $@ $@.core -Nmisc/ctf $(KCTLOBJS)
34 $(CTFMERGE) -L VERSION -o $@ $(OBJS) $(KCTLOBJS)
37 $(SETDYNFLAG) -f DF_1_IGNMULDEF,DF_1_NOKSYMS $@
40 $(RM) $(OBJS) $(KCTLOBJS) $(PROG).core $(MAPFILE)
41 $(RM) $(MAPFILE_INTERMEDIATE)
42 $(RM) kmdb_terminfo.c kmdb_modlinktest.c kmdb_modlinktest.o
43 $(RM) kaif_off.h kmdb_context_off.h
44 $(RM) mdb_lex.c mdb_grammar.c mdb_grammar.h y.tab.h y.tab.c y.output
52 # Specialized object construction
54 kmdb_terminfo.c: ../../../common/mdb/mdb_termio.c \
55 ../../../common/kmdb/kmdb_terminfo_skel.c \
57 TERMINFO=$(ROOTTERMINFO) $(TIGEN) -s \
58 ../../../common/kmdb/kmdb_terminfo_skel.c \
59 -t ../../../common/mdb/mdb_termio.c \
60 $(SUPPORTED_TERMS) > $@
62 $(MAPFILE_INTERMEDIATE): $(MAPFILE_SOURCES) $(MAPFILE_TEMPLATE)
63 $(HDR2MAP) -t $(MAPFILE_TEMPLATE) $(MAPFILE_SOURCES) >$@
65 $(MAPFILE): $(MAPFILE_INTERMEDIATE)
66 $(CPP) -E $(SACPPFLAGS) <$(MAPFILE_INTERMEDIATE) >$@
68 mdb_lex.c: ../../../common/mdb/mdb_lex.l mdb_grammar.h
69 $(LEX) $(LFLAGS) ../../../common/mdb/mdb_lex.l > $@
71 mdb_grammar.h mdb_grammar.c: ../../../common/mdb/mdb_grammar.y
72 $(YACC) $(YFLAGS) ../../../common/mdb/mdb_grammar.y
73 @$(MV) y.tab.h mdb_grammar.h
74 @$(MV) y.tab.c mdb_grammar.c
77 # These should really be combined into a dynamic rule, but there's a bug in
78 # dmake that'll cause it to get confused about dependencies if we do.
81 kaif_off.h := CPPFLAGS += $(SACPPCFLAGS)
83 kmdb_modlinktest.c: $(MAPFILE_INTERMEDIATE)
84 $(MAP2LINKTEST) <$(MAPFILE_INTERMEDIATE) >$@
85 $(CPP) -E $(SACPPFLAGS) <$(MAPFILE_INTERMEDIATE) >$(MAPFILE)
88 # Dynamic rules for object construction
90 %.o: ../../../common/kmdb/%.c
94 %.o: ../../../common/kmdb/kctl/%.c
98 %.o: ../../../common/kmdb/kctl/%.s
101 %.o: ../../../common/mdb/%.c
102 $(COMPILE.c) -o $@ $<
106 $(COMPILE.c) -o $@ $<
110 $(COMPILE.s) -o $@ $<
112 %.o: ../../kmdb/kctl/%.c
113 $(COMPILE.c) -o $@ $<
116 %.o: ../../kmdb/kctl/%.s
117 $(COMPILE.s) -o $@ $<
120 $(COMPILE.c) -o $@ $<
124 $(COMPILE.c) -o $@ $<
128 $(COMPILE.s) -o $@ $<
131 $(COMPILE.s) -o $@ $<
133 %.o: $(SRC)/common/net/util/%.c
137 %.o: $(SRC)/common/util/%.c