xref: /illumos-gate/usr/src/cmd/sgs/demo_rdb/Makefile.targ (revision 45ede40b2394db7967e59f19288fae9b62efd4aa)
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# Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
23#
24
25$(OBJDIR)/%.o:	%.c
26		$(COMPILE.c) $< -o $@
27		$(POST_PROCESS_O)
28
29$(OBJDIR)/%.o:	../common/%.c
30		$(COMPILE.c) $< -o $@
31		$(POST_PROCESS_O)
32
33# DEMO DELETE START
34
35$(ROOTONLDBIN):
36		$(INS.dir)
37
38$(ROOTONLDBIN)/$(MACH64):
39		$(INS.dir)
40
41$(ROOTONLDBIN)/%: % $(ROOTONLDBIN)
42		$(INS.file)
43
44$(ROOTONLDBIN)/$(MACH64)/%: % $(ROOTONLDBIN)/$(MACH64)
45		$(INS.file)
46# DEMO DELETE END
47
48$(OBJDIR)/main.o: gram.h
49
50gram.c + gram.h: ../common/gram.y
51		$(YACC) -d ../common/gram.y
52		$(MV) y.tab.c gram.c
53		$(MV) y.tab.h gram.h
54
55lex.c: ../common/lex.l
56		$(LEX) ../common/lex.l
57		$(MV) lex.yy.c lex.c
58
59$(PROG):	$(OBJS)
60		$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
61# DEMO DELETE START
62		$(POST_PROCESS)
63# DEMO DELETE END
64
65
66simp: ../tests/simp.c libsub.so.1
67		$(LINK.c) $(LDFLAG) -o $@ ../tests/simp.c -R. ./libsub.so.1
68
69libsub.so.1: ../tests/sub.c
70		$(LINK.c) $(LDFLAG) -o $@ -G -fpic -hlibsub.so.1 ../tests/sub.c
71
72#
73# RDB sample runs & tests
74#
75test-maps: simp FRC
76		./rdb -f ../tests/loadmaps ./simp
77
78test-breaks: simp FRC
79		./rdb -f ../tests/breaks ./simp
80
81test-steps: simp FRC
82		./rdb -f ../tests/steps ./simp
83
84test-plt_skip: simp FRC
85		./rdb -f ../tests/plt_skip ./simp
86
87test-sparc-regs: simp FRC
88		./rdb -f ../tests/test-sparc-regs simp
89
90test-object-padding: simp FRC
91		./rdb -f ../tests/object_padding_maps simp
92
93$(OBJDIR):
94		-@mkdir -p $(OBJDIR)
95
96clean: FRC
97		$(RM) $(OBJS) $(CLEANFILES)
98
99clobber: clean FRC
100		$(RM) $(PROG)
101
102# DEMO DELETE START
103catalog check chkmsg:
104# DEMO DELETE END
105
106FRC:
107
108# DEMO DELETE START
109
110include		$(SRC)/cmd/sgs/Makefile.targ
111# DEMO DELETE END
112