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
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
22 include ..
/Makefile.cmd
24 MWOBJS
= fgetln.o fparseln.o mailwrapper.o
29 SRCS
= $(MWOBJS
:%.o
=%.c
)
32 CPROGSRC
= $(CPROG
:%=_
%.c
)
36 ROOTETCFILES
=$(CFS
:%=$(ROOTETC
)/%)
38 $(ROOTETCFILES
) := FILEMODE
= 0644
41 ROOTLIBPROG
= $(LIBPROG
:%=$(ROOTLIB
)/%)
43 ROOTSYMLINKS
= $(ROOTBIN
)/mailq \
45 $(ROOTUSRSBIN
)/newaliases \
46 $(ROOTUSRSBIN
)/sendmail
48 CPPFLAGS
= -I.
$(CPPFLAGS.master
)
51 # conditional assignments
54 install:= TARGET
= install
56 clobber:= TARGET
= clobber
64 .PARALLEL
: $(MWOBJS
) $(OBJS
)
68 mailwrapper
: $(MWOBJS
)
69 $(LINK.c
) -o
$@
$(MWOBJS
) $(LDLIBS
)
72 install: all .WAIT
$(ROOTLIBPROG
) $(ROOTSYMLINKS
) $(ROOTETCFILES
)
77 $(RM
) $@
; $(SYMLINK
) ..
/lib
/mailwrapper
$@
80 $(RM
) $@
; $(SYMLINK
) mailwrapper
$@
82 $(ROOTUSRSBIN
)/newaliases
:
83 $(RM
) $@
; $(SYMLINK
) ..
/lib
/mailwrapper
$@
85 $(ROOTUSRSBIN
)/sendmail
:
86 $(RM
) $@
; $(SYMLINK
) ..
/lib
/mailwrapper
$@
92 $(RM
) $(OBJS
) $(MWOBJS
) mailwrapper
95 $(RM
) $(ROOTSYMLINKS
) $(ROOTLIBPROG
) $(ROOTETCFILES
)