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, Version 1.0 only 6# (the "License"). You may not use this file except in compliance 7# with the License. 8# 9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10# or http://www.opensolaris.org/os/licensing. 11# See the License for the specific language governing permissions 12# and limitations under the License. 13# 14# When distributing Covered Code, include this CDDL HEADER in each 15# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16# If applicable, add the following below this CDDL HEADER, with the 17# fields enclosed by brackets "[]" replaced with your own identifying 18# information: Portions Copyright [yyyy] [name of copyright owner] 19# 20# CDDL HEADER END 21# 22# 23# Copyright 2005 Sun Microsystems, Inc. All rights reserved. 24# Use is subject to license terms. 25# 26# ident "%Z%%M% %I% %E% SMI" 27# 28 29PROG= syslogd 30ROTATESCRIPT= newsyslog 31CONFIGFILE= syslog.conf 32TXTS= syslog.conf 33PRODUCT= $(PROG) $(ROTATESCRIPT) 34OBJS= syslogd.o queue.o list.o conf.o 35SRCS= $(OBJS:%.o=../%.c) 36LLOBJS= $(OBJS:%.o=%.ll) 37 38include ../../Makefile.cmd 39 40$(PROG) := LDLIBS += -lcmd -lnsl 41CCVERBOSE = 42CPPFLAGS += -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT 43CPPFLAGS += -DNDEBUG 44 45VARSYSLOG= syslog 46VARAUTHLOG= authlog 47ROOTVARLOGD= $(ROOT)/var/log 48 49OWNER= root 50GROUP= sys 51 52DFLTD= $(ROOTETC)/default 53 54ROOTETCCONFIG= $(CONFIGFILE:%=$(ROOTETC)/%) 55ROOTETCDFLT= $(PROG:%=$(DFLTD)/%) 56ROOTLIBROTATE= $(ROTATESCRIPT:%=$(ROOTLIB)/%) 57ROOTVARSYSLOG= $(VARSYSLOG:%=$(ROOTVARLOGD)/%) 58ROOTVARAUTHLOG= $(VARAUTHLOG:%=$(ROOTVARLOGD)/%) 59 60$(ROOTUSRSBINPROG) := FILEMODE = 0555 61$(ROOTUSRLIBROTATE) := FILEMODE = 0555 62$(ROOTETCCONFIG) := FILEMODE = 0644 63$(ROOTVARSYSLOG) := FILEMODE = 0644 64$(ROOTVARAUTHLOG) := FILEMODE = 0600 65$(ROOTETCDFLT) := FILEMODE = 0444 66 67$(ROOTVARLOGD)/% : % 68 $(INS.file) 69 70$(ROOTETC)/%: ../% 71 $(INS.file) 72 73$(ROOTLIB)/%: ../% 74 $(INS.file) 75 76$(DFLTD)/%: ../%.dfl 77 $(INS.rename) 78 79.KEEP_STATE: 80 81.SUFFIXES: $(SUFFIXES) .ll 82 83.c.ll: 84 $(CC) $(CFLAGS) $(CPPFLAGS) -Zll -o $@ $< 85 86.PARALLEL: $(OBJS) 87 88 89$(VARSYSLOG) $(VARAUTHLOG): 90 $(ECHO) '\c' > $@ 91 92%.o: ../%.c 93 $(COMPILE.c) $< 94 95%.ll: ../%.c 96 $(CC) $(CFLAGS) $(CPPFLAGS) -Zll -o $@ $< 97 98syslogd: $(OBJS) 99 $(LINK.c) -o $@ $(OBJS) $(LDLIBS) 100 $(POST_PROCESS) 101 102logfiles: $(ROOTVARSYSLOG) $(ROOTVARAUTHLOG) 103 104clean: 105 $(RM) $(OBJS) $(LLOBJS) $(VARSYSLOG) $(VARAUTHLOG) 106 107lint: lint_SRCS 108 109lock_lint: $(LLOBJS) 110 111include ../../Makefile.targ 112