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