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 2007 Sun Microsystems, Inc. All rights reserved. 23# Use is subject to license terms. 24# 25# Copyright 2025 Hans Rosenfeld 26 27include ../../Makefile.cmd 28include ../../Makefile.cmd.64 29 30.KEEP_STATE: 31 32PROG = rcapd 33ROOTUSRLIBRCAP = $(ROOT)/usr/lib/rcap 34ROOTUSRLIBRCAPPROG = $(ROOTUSRLIBRCAP)/$(PROG) 35 36COMMON_DIR= ../common 37 38MANIFEST = rcap.xml 39ROOTMANIFESTDIR = $(ROOTSVCSYSTEM) 40$(ROOTSVCSYSTEM)/rcap.xml := FILEMODE = 0444 41 42 43SRCS = rcapd_main.c \ 44 rcapd_collection.c \ 45 rcapd_collection_project.c \ 46 rcapd_collection_zone.c \ 47 rcapd_mapping.c \ 48 rcapd_rfd.c \ 49 rcapd_scanner.c \ 50 rcapd_stat.c \ 51 utils.c 52 53LINTSRCS = rcapd_main.c \ 54 rcapd_collection.c \ 55 rcapd_collection_project.c \ 56 rcapd_collection_zone.c \ 57 rcapd_mapping.c \ 58 rcapd_rfd.c \ 59 rcapd_scanner.c \ 60 $(COMMON_DIR)/rcapd_stat.c \ 61 $(COMMON_DIR)/utils.c 62 63$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG 64CPPFLAGS += -DDEBUG_MSG 65CPPFLAGS += -I$(COMMON_DIR) 66LDLIBS += -lkstat -lproc -lproject -lzonecfg -lumem -lscf 67LDLIBS += $(EXTRA_LDLIBS) 68 69OBJS = $(SRCS:%.c=%.o) rcapd_conf.o 70 71POFILES = $(OBJS:%.o=%.po) 72POFILE = $(PROG).po 73 74CLOBBERFILES += $(POFILES) $(POFILE) 75 76include ../Makefile.com 77 78all: $(PROG) 79 80install: all $(ROOTUSRLIBRCAPPROG) $(ROOTUSRLIBRCAP) $(ROOTMANIFEST) 81 82$(PROG): $(OBJS) 83 $(LINK.c) $(OBJS) -o $@ $(LDLIBS) 84 $(POST_PROCESS) 85 86check: $(CHKMANIFEST) 87 88clean: 89 $(RM) $(OBJS) 90 $(RM) rcapd_conf.c 91 92$(POFILE): $(POFILES) 93 $(RM) $@ 94 $(CAT) $(POFILES) > $@ 95 96$(ROOTUSRLIBRCAP)/%: $(ROOTUSRLIBRCAP) % 97 $(INS.file) 98 99include ../../Makefile.targ 100