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 (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
25 PROGS
= pcom acom dcom tpcom dispsyms
32 all: libobj.a .WAIT
$(PROGS
)
38 $(CC
) $(CPPFLAGS
) $(CFLAGS
) -c
$<
39 mcs
-d
-a
"ELF demo: object comment: $@" $@
42 $(CC
) $(CFLAGS
) -o
$@
$< $(LDLIBS
)
43 mcs
-d
-a
"ELF demo: executable comment: $@" $@
45 test: test1 test2 test3 test4 test5 test6
49 @ echo
"<<< Test 1 >>>"
50 @ echo
"Print comments of pcom"
53 @ echo
"Print comments from archive libobj.a"
58 @ echo
"<<< Test 2 >>>"
59 @ echo
"Delete the comment section from pcom"
63 test3
: pcom acom test2 FRC
65 @ echo
"<<< Test 3 >>>"
66 @ echo
"update comments from pcom and then print them out."
67 acom
"Newly Updated Comments" pcom
70 test4
: acom pcom test3 FRC
72 @ echo
"<<< Test 4 >>>"
73 @ echo
"Append to the comment section of pcom."
74 acom
"This comment has been appended" pcom
79 @ echo
"<<< Test 5 >>>"
80 @ echo
"Relabel the new utilities using the new utilities."
83 acom.safe
"libelf Demonstration Tools" $(PROGS
)
89 @ echo
"<<< Test 6 >>>"
90 @ echo
"Display symbols in dispsyms itself."
91 dispsyms dispsyms | egrep
-v
"LOCL|ABS|SECT|UNDEF"
95 @ echo
"<<< Test-extra >>>"
96 @ echo
"Using the threaded tpcom, go through and examine all"
97 @ echo
"libraries in /lib. This is an output intensive test."
101 $(RM
) $(OBJS
) $(PROGS
) libobj.a core