Merge commit 'b1e7e97d3b60469b243b3b2e22c7d8cbd11c7c90'
[unleashed.git] / usr / src / cmd / syslogd / Makefile.com
blobe341e14f357b55d6dfb85d51ea735c7915d0c9c6
2 # CDDL HEADER START
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.
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.
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]
19 # CDDL HEADER END
21 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22 # Use is subject to license terms.
25 PROG=           syslogd
26 ROTATESCRIPT=   newsyslog
27 CONFIGFILE=     syslog.conf
28 TXTS=           syslog.conf
29 PRODUCT=        $(PROG) $(ROTATESCRIPT)
30 OBJS=           syslogd.o queue.o list.o conf.o
31 SRCS=           $(OBJS:%.o=../%.c)
32 LLOBJS=         $(OBJS:%.o=%.ll)
34 include ../../Makefile.cmd
36 $(PROG)         := LDLIBS += -lscf
37 CERRWARN        += -Wno-uninitialized
38 CPPFLAGS        += -D_POSIX_PTHREAD_SEMANTICS
39 CFLAGS          += -DNDEBUG
41 # there's some extra utility code defined but not used.
43 VARSYSLOG=      syslog
44 VARAUTHLOG=     authlog
45 ROOTVARLOGD=    $(ROOT)/var/log
47 ROOTETCCONFIG=  $(CONFIGFILE:%=$(ROOTETC)/%)
48 ROOTLIBROTATE=  $(ROTATESCRIPT:%=$(ROOTLIB)/%)
49 ROOTVARSYSLOG=  $(VARSYSLOG:%=$(ROOTVARLOGD)/%)
50 ROOTVARAUTHLOG= $(VARAUTHLOG:%=$(ROOTVARLOGD)/%)
52 $(ROOTUSRSBINPROG)      := FILEMODE = 0555
53 $(ROOTUSRLIBROTATE)     := FILEMODE = 0555
54 $(ROOTETCCONFIG)        := FILEMODE = 0644
55 $(ROOTVARSYSLOG)        := FILEMODE = 0644
56 $(ROOTVARAUTHLOG)       := FILEMODE = 0600
58 $(ROOTVARLOGD)/% : %
59         $(INS.file)
61 $(ROOTETC)/%:   ../%
62         $(INS.file)
64 $(ROOTLIB)/%:   ../%
65         $(INS.file)
67 .KEEP_STATE:
69 .SUFFIXES:      $(SUFFIXES) .ll
71 .c.ll:
72         $(CC) $(CFLAGS) $(CPPFLAGS) -Zll -o $@ $<
74 .PARALLEL: $(OBJS)
77 $(VARSYSLOG) $(VARAUTHLOG):
78         $(ECHO) '\c' > $@
80 %.o: ../%.c
81         $(COMPILE.c) $<
83 %.ll: ../%.c
84         $(CC) $(CFLAGS) $(CPPFLAGS) -Zll -o $@ $<
86 syslogd: $(OBJS)
87         $(LINK.c) -o $@ $(OBJS) $(LDLIBS)
88         $(POST_PROCESS)
90 logfiles: $(ROOTVARSYSLOG) $(ROOTVARAUTHLOG)
92 clean:
93         $(RM) $(OBJS) $(LLOBJS) $(VARSYSLOG) $(VARAUTHLOG)
95 include ../../Makefile.targ