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