move 32-bit libs to lib/i386 subdirs & 64-bit libs to lib/
[unleashed.git] / usr / src / cmd / syslogd / Makefile.com
blobbc6ffc6034eef7f5b61aacd4a159ce70030c14bc
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.
24 # Copyright (c) 2018, Joyent, Inc.
26 PROG=           syslogd
27 ROTATESCRIPT=   newsyslog
28 CONFIGFILE=     syslog.conf
29 TXTS=           syslog.conf
30 PRODUCT=        $(PROG) $(ROTATESCRIPT)
31 OBJS=           syslogd.o queue.o list.o conf.o
32 SRCS=           $(OBJS:%.o=../%.c)
33 LLOBJS=         $(OBJS:%.o=%.ll)
35 include ../../Makefile.cmd
37 $(PROG)         := LDLIBS += -lscf
38 CERRWARN        += -Wno-uninitialized
40 # not linted
41 SMATCH=off
43 CPPFLAGS        += -D_POSIX_PTHREAD_SEMANTICS
44 CFLAGS          += -DNDEBUG
46 # there's some extra utility code defined but not used.
48 VARSYSLOG=      syslog
49 VARAUTHLOG=     authlog
50 ROOTVARLOGD=    $(ROOT)/var/log
52 ROOTETCCONFIG=  $(CONFIGFILE:%=$(ROOTETC)/%)
53 ROOTLIBROTATE=  $(ROTATESCRIPT:%=$(ROOTLIB64)/%)
54 ROOTVARSYSLOG=  $(VARSYSLOG:%=$(ROOTVARLOGD)/%)
55 ROOTVARAUTHLOG= $(VARAUTHLOG:%=$(ROOTVARLOGD)/%)
57 $(ROOTUSRSBINPROG)      := FILEMODE = 0555
58 $(ROOTUSRLIBROTATE)     := FILEMODE = 0555
59 $(ROOTETCCONFIG)        := FILEMODE = 0644
60 $(ROOTVARSYSLOG)        := FILEMODE = 0644
61 $(ROOTVARAUTHLOG)       := FILEMODE = 0600
63 $(ROOTVARLOGD)/% : %
64         $(INS.file)
66 $(ROOTETC)/%:   ../%
67         $(INS.file)
69 $(ROOTLIB64)/%: ../%
70         $(INS.file)
72 .KEEP_STATE:
74 .SUFFIXES:      $(SUFFIXES) .ll
76 .c.ll:
77         $(CC) $(CFLAGS) $(CPPFLAGS) -Zll -o $@ $<
79 .PARALLEL: $(OBJS)
82 $(VARSYSLOG) $(VARAUTHLOG):
83         $(ECHO) '\c' > $@
85 %.o: ../%.c
86         $(COMPILE.c) $<
88 %.ll: ../%.c
89         $(CC) $(CFLAGS) $(CPPFLAGS) -Zll -o $@ $<
91 syslogd: $(OBJS)
92         $(LINK.c) -o $@ $(OBJS) $(LDLIBS)
93         $(POST_PROCESS)
95 logfiles: $(ROOTVARSYSLOG) $(ROOTVARAUTHLOG)
97 clean:
98         $(RM) $(OBJS) $(LLOBJS) $(VARSYSLOG) $(VARAUTHLOG)
100 include ../../Makefile.targ