xref: /titanic_52/usr/src/cmd/syslogd/Makefile.com (revision d58fda4376e4bf67072ce2e69f6f47036f9dbb68)
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
52ROOTETCCONFIG=	$(CONFIGFILE:%=$(ROOTETC)/%)
53ROOTLIBROTATE=	$(ROTATESCRIPT:%=$(ROOTLIB)/%)
54ROOTVARSYSLOG=	$(VARSYSLOG:%=$(ROOTVARLOGD)/%)
55ROOTVARAUTHLOG=	$(VARAUTHLOG:%=$(ROOTVARLOGD)/%)
56
57$(ROOTUSRSBINPROG) 	:= FILEMODE = 0555
58$(ROOTUSRLIBROTATE)	:= FILEMODE = 0555
59$(ROOTETCCONFIG)	:= FILEMODE = 0644
60$(ROOTVARSYSLOG)	:= FILEMODE = 0644
61$(ROOTVARAUTHLOG)	:= FILEMODE = 0600
62
63$(ROOTVARLOGD)/% : %
64	$(INS.file)
65
66$(ROOTETC)/%:	../%
67	$(INS.file)
68
69$(ROOTLIB)/%:	../%
70	$(INS.file)
71
72.KEEP_STATE:
73
74.SUFFIXES:	$(SUFFIXES) .ll
75
76.c.ll:
77	$(CC) $(CFLAGS) $(CPPFLAGS) -Zll -o $@ $<
78
79.PARALLEL: $(OBJS)
80
81
82$(VARSYSLOG) $(VARAUTHLOG):
83	$(ECHO) '\c' > $@
84
85%.o: ../%.c
86	$(COMPILE.c) $<
87
88%.ll: ../%.c
89	$(CC) $(CFLAGS) $(CPPFLAGS) -Zll -o $@ $<
90
91syslogd: $(OBJS)
92	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
93	$(POST_PROCESS)
94
95logfiles: $(ROOTVARSYSLOG) $(ROOTVARAUTHLOG)
96
97clean:
98	$(RM) $(OBJS) $(LLOBJS) $(VARSYSLOG) $(VARAUTHLOG)
99
100lint:	lint_SRCS
101
102lock_lint:	$(LLOBJS)
103
104include ../../Makefile.targ
105