dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / usr / src / cmd / mailwrapper / Makefile
blob2d4d7eebecb62f6821b1538f95884f526ee1ad0c
2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"), version 1.0.
4 # You may only use this file in accordance with the terms of version
5 # 1.0 of the CDDL.
7 # A full copy of the text of the CDDL should have accompanied this
8 # source. A copy of the CDDL is also available via the Internet at
9 # http://www.illumos.org/license/CDDL.
13 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
14 # Copyright 2014 Alexander Pyhalov
18 LIBPROG= mailwrapper
20 PROG= $(LIBPROG)
22 include ../Makefile.cmd
24 MWOBJS= fgetln.o fparseln.o mailwrapper.o
26 CLOBBERFILES= $(PROG)
27 CLEANFILES= $(MWOBJS)
29 SRCS= $(MWOBJS:%.o=%.c)
31 CPROG= mailwrapper
32 CPROGSRC= $(CPROG:%=_%.c)
34 CFS= mailer.conf
36 ROOTETCFILES=$(CFS:%=$(ROOTETC)/%)
38 $(ROOTETCFILES) := FILEMODE = 0644
40 # installed modules
41 ROOTLIBPROG= $(LIBPROG:%=$(ROOTLIB)/%)
43 ROOTSYMLINKS= $(ROOTBIN)/mailq \
44 $(ROOTLIB)/sendmail \
45 $(ROOTUSRSBIN)/newaliases \
46 $(ROOTUSRSBIN)/sendmail
48 CPPFLAGS = -I. $(CPPFLAGS.master)
51 # conditional assignments
53 all:= TARGET= all
54 install:= TARGET= install
55 clean:= TARGET= clean
56 clobber:= TARGET= clobber
58 # install rules
59 $(ROOTINC)/% : %
60 $(INS.file)
62 .KEEP_STATE:
64 .PARALLEL: $(MWOBJS) $(OBJS)
66 all: $(PROG)
68 mailwrapper: $(MWOBJS)
69 $(LINK.c) -o $@ $(MWOBJS) $(LDLIBS)
70 $(POST_PROCESS)
72 install: all .WAIT $(ROOTLIBPROG) $(ROOTSYMLINKS) $(ROOTETCFILES)
74 # ROOTSYMLINKS
76 $(ROOTBIN)/mailq:
77 $(RM) $@; $(SYMLINK) ../lib/mailwrapper $@
79 $(ROOTLIB)/sendmail:
80 $(RM) $@; $(SYMLINK) mailwrapper $@
82 $(ROOTUSRSBIN)/newaliases:
83 $(RM) $@; $(SYMLINK) ../lib/mailwrapper $@
85 $(ROOTUSRSBIN)/sendmail:
86 $(RM) $@; $(SYMLINK) ../lib/mailwrapper $@
88 $(ROOTETCMAIL)/%: %
89 $(INS.file)
91 clean:
92 $(RM) $(OBJS) $(MWOBJS) mailwrapper
94 clobber: clean
95 $(RM) $(ROOTSYMLINKS) $(ROOTLIBPROG) $(ROOTETCFILES)