xref: /illumos-gate/usr/src/cmd/vscan/vscand/Makefile (revision 1e8d79d2)
1911106dfSjm#
2911106dfSjm# CDDL HEADER START
3911106dfSjm#
4911106dfSjm# The contents of this file are subject to the terms of the
5911106dfSjm# Common Development and Distribution License (the "License").
6911106dfSjm# You may not use this file except in compliance with the License.
7911106dfSjm#
8911106dfSjm# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9911106dfSjm# or http://www.opensolaris.org/os/licensing.
10911106dfSjm# See the License for the specific language governing permissions
11911106dfSjm# and limitations under the License.
12911106dfSjm#
13911106dfSjm# When distributing Covered Code, include this CDDL HEADER in each
14911106dfSjm# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15911106dfSjm# If applicable, add the following below this CDDL HEADER, with the
16911106dfSjm# fields enclosed by brackets "[]" replaced with your own identifying
17911106dfSjm# information: Portions Copyright [yyyy] [name of copyright owner]
18911106dfSjm#
19911106dfSjm# CDDL HEADER END
20911106dfSjm
21911106dfSjm#
22911106dfSjm# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23911106dfSjm# Use is subject to license terms.
24911106dfSjm#
25*5661bb76SJohn Levon# Copyright (c) 2018, Joyent, Inc.
26911106dfSjm
27911106dfSjmPROG = vscand
28911106dfSjmSRCS =	vs_main.c	\
29911106dfSjm		vs_eng.c	\
30911106dfSjm		vs_icap.c	\
31911106dfSjm		vs_svc.c	\
32911106dfSjm		vs_door.c	\
33911106dfSjm		vs_stats.c
34911106dfSjmHDRS	= vs_incl.h vs_icap.h
35911106dfSjmOBJS = $(SRCS:%.c=%.o)
36911106dfSjmPOFILES = $(SRCS:.c=.po)
37911106dfSjm
38911106dfSjminclude ../../Makefile.cmd
39911106dfSjm
40911106dfSjmDEFS = -I.
41911106dfSjmLDLIBS += -lsecdb -lumem -lbsm -lnsl -lsocket -lc -L$(ROOT)/usr/lib/vscan -lvscan
42911106dfSjmLDFLAGS += -R/usr/lib/vscan
43911106dfSjmCFLAGS += $(DEFS)
44911106dfSjmCFLAGS += $(CCVERBOSE)
45911106dfSjmCFLAGS += -D_FILE_OFFSET_BITS=64
46911106dfSjm$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
47911106dfSjm
487014882cSRichard LoweCERRWARN += -_gcc=-Wno-switch
497014882cSRichard Lowe
50*5661bb76SJohn Levon# not linted
51*5661bb76SJohn LevonSMATCH=off
52*5661bb76SJohn Levon
53bd0ce624SYuri PankovCSTD =       $(CSTD_GNU99)
54911106dfSjm
55911106dfSjmMANIFEST = vscan.xml
56911106dfSjmROOTMANIFESTDIR= $(ROOTSVCSYSTEM)/filesystem
57911106dfSjmROOTVSCANDIR=   $(ROOTLIB)/vscan
58911106dfSjmROOTVSCANFILE = $(PROG:%=$(ROOTVSCANDIR)/%)
59911106dfSjmCHECKHDRS=	$(HDRS:%.h=%.check)
60911106dfSjm
61911106dfSjmFILEMODE = 0555
62911106dfSjm$(ROOTVSCANFILE):= FILEMODE = 0555
63911106dfSjm
64911106dfSjm$(ROOTVSCANDIR):
65911106dfSjm	$(INS.dir)
66911106dfSjm
67911106dfSjm$(ROOTVSCANDIR)/%: %
68911106dfSjm	$(INS.file)
69911106dfSjm
70911106dfSjm.KEEP_STATE:
71911106dfSjm
72911106dfSjmall: $(PROG)
73911106dfSjm
74911106dfSjmclean:
75911106dfSjm	$(RM) $(OBJS)
76911106dfSjm
77911106dfSjm$(PROG): $(OBJS)
78911106dfSjm	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
79911106dfSjm	$(POST_PROCESS)
80911106dfSjm
81911106dfSjmcheck: $(CHECKHDRS) $(CHKMANIFEST)
82911106dfSjm
83911106dfSjm$(POFILE): $(POFILES)
84911106dfSjm	$(RM) $@
85911106dfSjm	$(CAT) $(POFILES) > $@
86911106dfSjm
87911106dfSjminclude ../../Makefile.targ
88911106dfSjm
89911106dfSjminstall: all .WAIT $(ROOTVSCANDIR) $(ROOTVSCANFILE) $(ROOTMANIFEST)
90