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
32$(OBJDIR)/main.o: gram.h
33
34gram.c + gram.h: ../common/gram.y
35		$(YACC) -d ../common/gram.y
36		$(MV) y.tab.c gram.c
37		$(MV) y.tab.h gram.h
38
39lex.c: ../common/lex.l
40		$(LEX) ../common/lex.l
41		$(MV) lex.yy.c lex.c
42
43$(PROG):	$(OBJS)
44		$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
45
46
47simp: ../tests/simp.c libsub.so.1
48		$(LINK.c) $(LDFLAG) -o $@ ../tests/simp.c -R. ./libsub.so.1
49
50libsub.so.1: ../tests/sub.c
51		$(LINK.c) $(LDFLAG) -o $@ -G -Kpic -hlibsub.so.1 ../tests/sub.c
52
53#
54# RDB sample runs & tests
55#
56test-maps: simp FRC
57		./rdb -f ../tests/loadmaps ./simp
58
59test-breaks: simp FRC
60		./rdb -f ../tests/breaks ./simp
61
62test-steps: simp FRC
63		./rdb -f ../tests/steps ./simp
64
65test-plt_skip: simp FRC
66		./rdb -f ../tests/plt_skip ./simp
67
68test-sparc-regs: simp FRC
69		./rdb -f ../tests/test-sparc-regs simp
70
71test-object-padding: simp FRC
72		./rdb -f ../tests/object_padding_maps simp
73
74$(OBJDIR):
75		-@mkdir -p $(OBJDIR)
76
77clean: FRC
78		$(RM) $(OBJS) $(CLEANFILES)
79
80clobber: clean FRC
81		$(RM) $(PROG)
82
83FRC:
84
85