xref: /titanic_50/usr/src/cmd/sgs/librtld_db/demo/Makefile.targ (revision 32e0ab73531b6e6e8957e9ecdbbd42603865f2d0)
1#
2# CDDL HEADER START
3#
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.
7#
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.
12#
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]
18#
19# CDDL HEADER END
20#
21# Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
22
23$(OBJDIR)/%.o:	%.c
24		$(COMPILE.c) $< -o $@
25		$(POST_PROCESS_O)
26
27$(OBJDIR)/%.o:	../common/%.c
28		$(COMPILE.c) $< -o $@
29		$(POST_PROCESS_O)
30
31# DEMO DELETE START
32$(ROOTONLDBIN)/%: %
33		$(INS.file)
34
35$(ROOTONLDBIN)/$(MACH64)/%: %
36		$(INS.file)
37# DEMO DELETE END
38
39$(OBJDIR)/main.o: gram.h
40
41gram.c + gram.h: ../common/gram.y
42		$(YACC) -d ../common/gram.y
43		$(MV) y.tab.c gram.c
44		$(MV) y.tab.h gram.h
45
46lex.c: ../common/lex.l
47		$(LEX) ../common/lex.l
48		$(MV) lex.yy.c lex.c
49
50$(PROG):	$(OBJS)
51		$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
52# DEMO DELETE START
53		$(POST_PROCESS)
54# DEMO DELETE END
55
56
57simp: ../tests/simp.c libsub.so.1
58		$(LINK.c) $(LDFLAG) -o $@ ../tests/simp.c -R. ./libsub.so.1
59
60libsub.so.1: ../tests/sub.c
61		$(LINK.c) $(LDFLAG) -o $@ -G -Kpic -hlibsub.so.1 ../tests/sub.c
62
63#
64# RDB sample runs & tests
65#
66test-maps: simp FRC
67		./rdb -f ../tests/loadmaps ./simp
68
69test-breaks: simp FRC
70		./rdb -f ../tests/breaks ./simp
71
72test-steps: simp FRC
73		./rdb -f ../tests/steps ./simp
74
75test-plt_skip: simp FRC
76		./rdb -f ../tests/plt_skip ./simp
77
78test-sparc-regs: simp FRC
79		./rdb -f ../tests/test-sparc-regs simp
80
81test-object-padding: simp FRC
82		./rdb -f ../tests/object_padding_maps simp
83
84$(OBJDIR):
85		-@mkdir -p $(OBJDIR)
86
87clean: FRC
88		$(RM) $(OBJS) $(CLEANFILES)
89
90clobber: clean FRC
91		$(RM) $(PROG)
92
93FRC:
94
95# DEMO DELETE START
96
97$(LINTOUT):	$(SRCS)
98		$(LINT.c) $(SRCS) > lint.out 2>&1
99
100include		$(SRC)/cmd/sgs/Makefile.targ
101# DEMO DELETE END
102