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# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 22# Use is subject to license terms. 23# 24# Copyright (c) 2018, Joyent, Inc. 25 26PROG= syslogd 27ROTATESCRIPT= newsyslog 28CONFIGFILE= syslog.conf 29TXTS= syslog.conf 30PRODUCT= $(PROG) $(ROTATESCRIPT) 31OBJS= syslogd.o queue.o list.o conf.o 32SRCS= $(OBJS:%.o=../%.c) 33 34include ../../Makefile.cmd 35 36$(PROG) := LDLIBS += -lscf -lnsl 37CERRWARN += $(CNOWARN_UNINIT) 38 39# not linted 40SMATCH=off 41 42CPPFLAGS += -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT 43CFLAGS += -DNDEBUG 44 45VARSYSLOG= syslog 46VARAUTHLOG= authlog 47ROOTVARLOGD= $(ROOT)/var/log 48 49ROOTETCCONFIG= $(CONFIGFILE:%=$(ROOTETC)/%) 50ROOTLIBROTATE= $(ROTATESCRIPT:%=$(ROOTLIB)/%) 51ROOTVARSYSLOG= $(VARSYSLOG:%=$(ROOTVARLOGD)/%) 52ROOTVARAUTHLOG= $(VARAUTHLOG:%=$(ROOTVARLOGD)/%) 53 54$(ROOTUSRSBINPROG) := FILEMODE = 0555 55$(ROOTUSRLIBROTATE) := FILEMODE = 0555 56$(ROOTETCCONFIG) := FILEMODE = 0644 57$(ROOTVARSYSLOG) := FILEMODE = 0644 58$(ROOTVARAUTHLOG) := FILEMODE = 0600 59 60$(ROOTVARLOGD)/% : % 61 $(INS.file) 62 63$(ROOTETC)/%: ../% 64 $(INS.file) 65 66$(ROOTLIB)/%: ../% 67 $(INS.file) 68 69.KEEP_STATE: 70 71.SUFFIXES: $(SUFFIXES) 72 73.PARALLEL: $(OBJS) 74 75$(VARSYSLOG) $(VARAUTHLOG): 76 $(ECHO) '\c' > $@ 77 78%.o: ../%.c 79 $(COMPILE.c) $< 80 81%.ll: ../%.c 82 $(CC) $(CFLAGS) $(CPPFLAGS) -Zll -o $@ $< 83 84syslogd: $(OBJS) 85 $(LINK.c) -o $@ $(OBJS) $(LDLIBS) 86 $(POST_PROCESS) 87 88logfiles: $(ROOTVARSYSLOG) $(ROOTVARAUTHLOG) 89 90clean: 91 $(RM) $(OBJS) $(LLOBJS) $(VARSYSLOG) $(VARAUTHLOG) 92 93include ../../Makefile.targ 94