xref: /onnv-gate/usr/src/lib/libtnf/Makefile (revision 7514:24478c5e37d8)
10Sstevel@tonic-gate#
20Sstevel@tonic-gate# CDDL HEADER START
30Sstevel@tonic-gate#
40Sstevel@tonic-gate# The contents of this file are subject to the terms of the
52522Sraf# Common Development and Distribution License (the "License").
62522Sraf# You may not use this file except in compliance with the License.
70Sstevel@tonic-gate#
80Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate# See the License for the specific language governing permissions
110Sstevel@tonic-gate# and limitations under the License.
120Sstevel@tonic-gate#
130Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate#
190Sstevel@tonic-gate# CDDL HEADER END
200Sstevel@tonic-gate#
210Sstevel@tonic-gate#
22*7514SJohn.Sonnenschein@Sun.COM# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
230Sstevel@tonic-gate# Use is subject to license terms.
240Sstevel@tonic-gate#
250Sstevel@tonic-gate#
260Sstevel@tonic-gate
270Sstevel@tonic-gateLIBRARY=	libtnf.a
280Sstevel@tonic-gateVERS=		.1
290Sstevel@tonic-gateOBJECTS=	$(MACH)dep.o	\
300Sstevel@tonic-gate		ref.o		\
310Sstevel@tonic-gate		abi.o		\
320Sstevel@tonic-gate		util.o		\
330Sstevel@tonic-gate		info.o		\
340Sstevel@tonic-gate		datum.o		\
350Sstevel@tonic-gate		record.o	\
360Sstevel@tonic-gate		scalar.o	\
370Sstevel@tonic-gate		array.o		\
380Sstevel@tonic-gate		struct.o	\
390Sstevel@tonic-gate		type.o		\
400Sstevel@tonic-gate		error.o		\
410Sstevel@tonic-gate		access.o	\
420Sstevel@tonic-gate		reader.o
430Sstevel@tonic-gate
442522Srafinclude ../Makefile.lib
450Sstevel@tonic-gate
462522SrafSRCDIR =	.
470Sstevel@tonic-gate
480Sstevel@tonic-gateTEXT_DOMAIN=	SUNW_OST_OSLIB
490Sstevel@tonic-gateXGETFLAGS=	-a
500Sstevel@tonic-gatePOFILE=		$(LIBRARY:%.a=%.po)
510Sstevel@tonic-gatePOFILES=	_error.po
520Sstevel@tonic-gate
530Sstevel@tonic-gateSED=	sed
540Sstevel@tonic-gateGREP=	grep
550Sstevel@tonic-gate
560Sstevel@tonic-gateLIBS=		$(DYNLIB)
570Sstevel@tonic-gate
580Sstevel@tonic-gateLDLIBS += -lc
590Sstevel@tonic-gate
600Sstevel@tonic-gateHDRS=		tnf.h
610Sstevel@tonic-gateROOTHDRDIR=	$(ROOT)/usr/include/tnf
620Sstevel@tonic-gateROOTHDRS=	$(HDRS:%=$(ROOTHDRDIR)/%)
630Sstevel@tonic-gateCHECKHDRS=	$(HDRS:%.h=%.check)
640Sstevel@tonic-gate$(ROOTHDRS) := 	FILEMODE = 0644
650Sstevel@tonic-gateCHECKHDRS =	$(HDRS:%.h=%.check)
660Sstevel@tonic-gate
670Sstevel@tonic-gate$(ROOTHDRS) :=	FILEMODE = 644
680Sstevel@tonic-gate
690Sstevel@tonic-gateCPPFLAGS +=	-D_DATUM_MACROS -D_REENTRANT
700Sstevel@tonic-gate
710Sstevel@tonic-gateLINTFLAGS +=	-y
720Sstevel@tonic-gate
730Sstevel@tonic-gate.KEEP_STATE:
740Sstevel@tonic-gate
752522Srafall: $(LIBS)
760Sstevel@tonic-gate
772522Srafinstall: all $(ROOTLIBDIR) $(ROOTLIBS) $(ROOTLINKS)
780Sstevel@tonic-gate
790Sstevel@tonic-gateinstall_h: $(ROOTHDRDIR) $(ROOTHDRS)
800Sstevel@tonic-gate
810Sstevel@tonic-gatelint:
820Sstevel@tonic-gate	$(LINT.c) $(SRCS)
830Sstevel@tonic-gate
840Sstevel@tonic-gatecheck: $(CHECKHDRS)
850Sstevel@tonic-gate
860Sstevel@tonic-gate$(ROOTLIBDIR) $(ROOTHDRDIR):
870Sstevel@tonic-gate	$(INS.dir)
880Sstevel@tonic-gate
890Sstevel@tonic-gate$(ROOTHDRDIR)/% : %
900Sstevel@tonic-gate	$(INS.file)
910Sstevel@tonic-gate
920Sstevel@tonic-gateASFLAGS=	$(AS_PICFLAGS) -P -D_SYS_SYS_S -D_LOCORE -D_ASM -DPIC -DLOCORE $(CPPFLAGS)
930Sstevel@tonic-gateBUILD.s=	$(AS) $(ASFLAGS) $< -o $@
940Sstevel@tonic-gate
950Sstevel@tonic-gatepics/%.o:	./%.s
960Sstevel@tonic-gate		$(BUILD.s)
970Sstevel@tonic-gate		$(POST_PROCESS_O)
980Sstevel@tonic-gate
990Sstevel@tonic-gateobjs/%.o:	./%.s
1000Sstevel@tonic-gate		$(BUILD.s)
1010Sstevel@tonic-gate		$(POST_PROCESS_O)
1020Sstevel@tonic-gate
1030Sstevel@tonic-gate_msg:	$(MSGDOMAIN) $(POFILE)
1040Sstevel@tonic-gate	$(RM) $(MSGDOMAIN)/$(POFILE)
1050Sstevel@tonic-gate	$(CP) $(POFILE) $(MSGDOMAIN)
1060Sstevel@tonic-gate
1070Sstevel@tonic-gate$(POFILE): $(POFILES)
1080Sstevel@tonic-gate	$(RM) $@
1090Sstevel@tonic-gate	$(CAT) $(POFILES) > $@
1100Sstevel@tonic-gate
1110Sstevel@tonic-gate$(POFILES):
1120Sstevel@tonic-gate	$(RM) messages.po
1130Sstevel@tonic-gate	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]*`
1140Sstevel@tonic-gate	$(SED) -e '/^# msg/d' -e '/^domain/d' messages.po > $@
1150Sstevel@tonic-gate	$(RM) messages.po
1160Sstevel@tonic-gate
1170Sstevel@tonic-gateinclude ../Makefile.targ
118