xref: /illumos-gate/usr/src/cmd/fs.d/nfs/nfslog/Makefile (revision a5f20e891eb1b5d2af2255e766a1dc3b35ac9936)
17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
506e1a714Sraf# Common Development and Distribution License (the "License").
606e1a714Sraf# You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate#
87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate# and limitations under the License.
127c478bd9Sstevel@tonic-gate#
137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate#
197c478bd9Sstevel@tonic-gate# CDDL HEADER END
207c478bd9Sstevel@tonic-gate#
217c478bd9Sstevel@tonic-gate#
2206e1a714Sraf# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate# Use is subject to license terms.
247c478bd9Sstevel@tonic-gate#
255661bb76SJohn Levon# Copyright (c) 2018, Joyent, Inc.
267c478bd9Sstevel@tonic-gate
277c478bd9Sstevel@tonic-gateFSTYPE=		nfs
287c478bd9Sstevel@tonic-gateTYPEPROG=	nfslogd
297c478bd9Sstevel@tonic-gateATTMK=		$(TYPEPROG)
30a7872406SmeemDEFAULTFILES=	nfslogd.dfl
317c478bd9Sstevel@tonic-gate
327c478bd9Sstevel@tonic-gateinclude		../../Makefile.fstype
337c478bd9Sstevel@tonic-gate
347c478bd9Sstevel@tonic-gateCOMMON=		nfslog_config.o nfslogtab.o
357c478bd9Sstevel@tonic-gateLOCAL=		process_buffer.o fhtab.o nfslogd.o nfslog_elf.o \
367c478bd9Sstevel@tonic-gate		nfslog_trans.o nfslog_ipaddr.o readbuf.o dbtab.o \
377c478bd9Sstevel@tonic-gate		nfs_log_xdr.o buffer_list.o
387c478bd9Sstevel@tonic-gateOBJS=		$(LOCAL) $(COMMON)
397c478bd9Sstevel@tonic-gateSRCS=		$(LOCAL:%.o=%.c) $(COMMON:%.o=../lib/%.c)
4006e1a714SrafLDLIBS +=	-lsocket -lnsl
417c478bd9Sstevel@tonic-gateCFLAGS += 	$(CCVERBOSE)
427014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-parentheses
43*d3b5f563SJohn LevonCERRWARN +=	$(CNOWARN_UNINIT)
447014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-switch
457014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-type-limits
465661bb76SJohn Levon
475661bb76SJohn Levon# not linted
485661bb76SJohn LevonSMATCH=off
495661bb76SJohn Levon
507c478bd9Sstevel@tonic-gateCPPFLAGS += 	-D_FILE_OFFSET_BITS=64
517c478bd9Sstevel@tonic-gate
527c478bd9Sstevel@tonic-gate#
537c478bd9Sstevel@tonic-gate# Message catalog
547c478bd9Sstevel@tonic-gate#
557c478bd9Sstevel@tonic-gatePOFILE= nfslog.po
567c478bd9Sstevel@tonic-gate
577c478bd9Sstevel@tonic-gatecatalog:        $(POFILE)
587c478bd9Sstevel@tonic-gate
597c478bd9Sstevel@tonic-gate$(POFILE):      $(SRCS)
607c478bd9Sstevel@tonic-gate	$(RM) $@
617c478bd9Sstevel@tonic-gate	$(COMPILE.cpp) $(SRCS)   > $(POFILE).i
627c478bd9Sstevel@tonic-gate	$(XGETTEXT) $(XGETFLAGS)        $(POFILE).i
637c478bd9Sstevel@tonic-gate	sed "/^domain/d"        messages.po     > $@
647c478bd9Sstevel@tonic-gate	$(RM) messages.po $(POFILE).i
657c478bd9Sstevel@tonic-gate
667c478bd9Sstevel@tonic-gate$(TYPEPROG):	$(OBJS)
677c478bd9Sstevel@tonic-gate		$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
687c478bd9Sstevel@tonic-gate		$(POST_PROCESS)
697c478bd9Sstevel@tonic-gate
70a7872406Smeeminstall:	all $(ROOTETCDEFAULTFILES)
717c478bd9Sstevel@tonic-gate
727c478bd9Sstevel@tonic-gatenfslog_config.o:	../lib/nfslog_config.c
737c478bd9Sstevel@tonic-gate		$(COMPILE.c) ../lib/nfslog_config.c
747c478bd9Sstevel@tonic-gate
757c478bd9Sstevel@tonic-gatenfslogtab.o:	../lib/nfslogtab.c
767c478bd9Sstevel@tonic-gate		$(COMPILE.c) ../lib/nfslogtab.c
777c478bd9Sstevel@tonic-gate
787c478bd9Sstevel@tonic-gateclean:
797c478bd9Sstevel@tonic-gate	$(RM) $(OBJS)
80