xref: /titanic_52/usr/src/lib/libtnfprobe/Makefile.com (revision 72b703890acc1682901e7ab4df40758e3c4399d8)
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#
22# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
23#
24
25LIBRARY=	libtnfprobe.a
26VERS=		.1
27OBJECTS.c=	tnf_buf.o	\
28		trace_init.o	\
29		trace_funcs.o	\
30		debug_funcs.o	\
31		probe_mem.o	\
32		tnf_args.o	\
33		tnf_trace.o	\
34		probe_cntl.o
35
36UFSDIR=		$(SRC)/uts/common/tnf
37UFSOBJS=	tnf_writer.o tnf_probe.o
38
39OBJECTS.s=	$(MACH)_locks.o
40
41OBJECTS=	$(OBJECTS.c) $(UFSOBJS) $(OBJECTS.s)
42
43include ../../Makefile.lib
44
45# We omit $(OBJECTS.s:%.o=%.s) in the next line, because lint no like
46SRCS= $(OBJECTS.c:%.o=../%.c) $(UFSOBJS:%.o=$(UFSDIR)/%.c)
47
48LIBS=		$(DYNLIB)
49
50DYNFLAGS +=	$(ZINTERPOSE)
51
52HDRS=		com.h writer.h probe.h
53ROOTHDRDIR=	$(ROOT)/usr/include/tnf
54ROOTHDRS=	$(HDRS:%=$(ROOTHDRDIR)/%)
55CHECKHDRS=	$(HDRS:%.h=%.check)
56$(ROOTHDRS) := 	FILEMODE = 0644
57CHECKHDRS =	$(HDRS:%.h=%.check)
58
59# Include .. first to pick up tnf_trace.h in current dir, Include UFSDIR to
60#	pick up tnf_types.h
61CPPFLAGS +=	-I.. -I$(UFSDIR) -D_REENTRANT -D_TNF_LIBRARY
62
63LINTFLAGS +=	-y
64
65$(ROOTHDRS) :=	FILEMODE = 644
66
67LDLIBS += -lc
68
69.KEEP_STATE:
70
71all: $(LIBS)
72
73install_h: $(ROOTHDRDIR) $(ROOTHDRS)
74
75lint:
76	$(LINT.c) $(SRCS)
77
78check: $(CHECKHDRS)
79
80$(ROOTLIBDIR) $(ROOTHDRDIR):
81	$(INS.dir)
82
83$(ROOTHDRDIR)/% : %
84	$(INS.file)
85
86#ASFLAGS=	-K pic -P -D_SYS_SYS_S -D_LOCORE -D_ASM -DPIC -DLOCORE $(CPPFLAGS)
87ASFLAGS=	-P -D_SYS_SYS_S -D_LOCORE -D_ASM -DPIC -DLOCORE $(CPPFLAGS)
88BUILD.s=	$(AS) $(ASFLAGS) $< -o $@
89
90objs/%.o pics/%.o: ../%.s
91		$(COMPILE.s) -o $@ $<
92		$(POST_PROCESS_O)
93
94pics/%.o objs/%.o: ../%.c
95		$(COMPILE.c) -o $@ $<
96		$(POST_PROCESS_O)
97
98pics/%.o objs/%.o:	$(UFSDIR)/%.c
99		$(COMPILE.c) -o $@ $<
100		$(POST_PROCESS_O)
101
102include ../../Makefile.targ
103