xref: /illumos-gate/usr/src/cmd/sendmail/util/Makefile (revision 85f4cb87)
17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
54abb9673Sjbeck# Common Development and Distribution License (the "License").
64abb9673Sjbeck# You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate#
87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate# and limitations under the License.
127c478bd9Sstevel@tonic-gate#
137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate#
197c478bd9Sstevel@tonic-gate# CDDL HEADER END
207c478bd9Sstevel@tonic-gate#
2136e852a1SRaja Andra# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
224abb9673Sjbeck# Use is subject to license terms.
237c478bd9Sstevel@tonic-gate#
244abb9673Sjbeck
257c478bd9Sstevel@tonic-gate# cmd/sendmail/aux/Makefile
267c478bd9Sstevel@tonic-gate#
277c478bd9Sstevel@tonic-gateinclude		../../Makefile.cmd
287c478bd9Sstevel@tonic-gateinclude		../Makefile.cmd
297c478bd9Sstevel@tonic-gate
30*85f4cb87SRichard LowePROG=		mailstats mconnect vacation mailcompat praliases
317c478bd9Sstevel@tonic-gate
327c478bd9Sstevel@tonic-gateLIBPROG=	mail.local smrsh
337c478bd9Sstevel@tonic-gate
347c478bd9Sstevel@tonic-gateUSRSBINPROG=	etrn makemap editmap
357c478bd9Sstevel@tonic-gate
36287247a8SAlexander PyhalovLIBSMTPSMPROG= mailq
37287247a8SAlexander Pyhalov
387c478bd9Sstevel@tonic-gate# $(PROG) by default
39b52c8fbeSRichard PALOCLOBBERFILES=	$(LIBPROG) $(USRSBINPROG) $(LIBSMTPSMPROG)
407c478bd9Sstevel@tonic-gate
41*85f4cb87SRichard LoweOBJS=		$(PROG:%=%.o)
427c478bd9Sstevel@tonic-gate
437c478bd9Sstevel@tonic-gate.PARALLEL:	$(OBJS) $(PROG) $(LIBPROG) $(USRSBINPROG)
447c478bd9Sstevel@tonic-gate
45*85f4cb87SRichard LoweSRCS=		$(PROG:%=%.c)
467c478bd9Sstevel@tonic-gate
477c478bd9Sstevel@tonic-gateeditmap :=	LDLIBS += -lldap
487c478bd9Sstevel@tonic-gatemail.local :=	LDLIBS += -lsocket -lnsl -lmail -lldap
497c478bd9Sstevel@tonic-gatemailq :=	LDLIBS += -lsecdb
507c478bd9Sstevel@tonic-gatemailstats :=	LDLIBS += -lldap
517c478bd9Sstevel@tonic-gatemakemap :=	LDLIBS += -lldap
527c478bd9Sstevel@tonic-gatemconnect :=	LDLIBS += -lsocket -lnsl
537c478bd9Sstevel@tonic-gatepraliases :=	LDLIBS += -lldap
547c478bd9Sstevel@tonic-gatesmrsh :=	LDLIBS += -lldap
557c478bd9Sstevel@tonic-gatevacation :=	LDLIBS += -lldap
56287247a8SAlexander Pyhalov$(ROOTLIBSMTPSM)/mailq :=	FILEMODE = 4555
577c478bd9Sstevel@tonic-gate
587c478bd9Sstevel@tonic-gateINCPATH=	-I../src -I../db -I../include
597c478bd9Sstevel@tonic-gate
604abb9673SjbeckENVDEF=		-DNOT_SENDMAIL
617c478bd9Sstevel@tonic-gateSUNENVDEF=	-DSUN_EXTENSIONS -DUSE_VENDOR_CF_PATH
627c478bd9Sstevel@tonic-gateDBMDEF=		-DNDBM -DNEWDB
637c478bd9Sstevel@tonic-gate
644abb9673SjbeckCPPFLAGS =	$(INCPATH) $(ENVDEF) $(SUNENVDEF) $(DBMDEF) $(CPPFLAGS.sm)
657c478bd9Sstevel@tonic-gate
6624da5b34Srie# Nearly every support application provides sleep().  This isn't incompatible
6724da5b34Srie# with libc, but can be confined to the applications themselves.
68*85f4cb87SRichard LoweLDFLAGS +=	$(MAPFILE.NGB:%=-Wl,-M%)
6924da5b34Srie
707c478bd9Sstevel@tonic-gate.KEEP_STATE:
717c478bd9Sstevel@tonic-gate
72287247a8SAlexander Pyhalovall:		$(PROG) $(LIBSMTPSMPROG) $(LIBPROG) $(USRSBINPROG)
737c478bd9Sstevel@tonic-gate
747c478bd9Sstevel@tonic-gateconvtime.o:	../src/convtime.c
757c478bd9Sstevel@tonic-gate	$(COMPILE.c) ../src/convtime.c
767c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
777c478bd9Sstevel@tonic-gate
787c478bd9Sstevel@tonic-gatevacation:	vacation.o convtime.o rfc2047.o ../libsm/libsm.a
797c478bd9Sstevel@tonic-gate	$(LINK.c) vacation.o convtime.o rfc2047.o -o $@ $(LDLIBS) \
807c478bd9Sstevel@tonic-gate		../libsm/libsm.a
817c478bd9Sstevel@tonic-gate	$(POST_PROCESS)
827c478bd9Sstevel@tonic-gate
837c478bd9Sstevel@tonic-gatemail.local:	mail.local.o ../libsmutil/libsmutil.a ../libsm/libsm.a
847c478bd9Sstevel@tonic-gate	$(LINK.c) mail.local.o -o $@ $(LDLIBS) ../libsmutil/libsmutil.a \
857c478bd9Sstevel@tonic-gate		../libsm/libsm.a
867c478bd9Sstevel@tonic-gate	$(POST_PROCESS)
877c478bd9Sstevel@tonic-gate
887c478bd9Sstevel@tonic-gatesmrsh:	smrsh.o ../libsm/libsm.a
897c478bd9Sstevel@tonic-gate	$(LINK.c) smrsh.o -o $@ $(LDLIBS) ../libsm/libsm.a
907c478bd9Sstevel@tonic-gate	$(POST_PROCESS)
917c478bd9Sstevel@tonic-gate
927c478bd9Sstevel@tonic-gatemakemap:	makemap.o ../libsmutil/libsmutil.a ../libsmdb/libsmdb.a \
937c478bd9Sstevel@tonic-gate			../db/libdb.a ../libsm/libsm.a
947c478bd9Sstevel@tonic-gate	$(LINK.c) makemap.o -o $@ $(LDLIBS) ../libsmdb/libsmdb.a \
957c478bd9Sstevel@tonic-gate		../libsmutil/libsmutil.a ../db/libdb.a ../libsm/libsm.a
967c478bd9Sstevel@tonic-gate	$(POST_PROCESS)
977c478bd9Sstevel@tonic-gate
987c478bd9Sstevel@tonic-gateeditmap:	editmap.o ../libsmutil/libsmutil.a ../libsmdb/libsmdb.a \
997c478bd9Sstevel@tonic-gate			../db/libdb.a ../libsm/libsm.a
1007c478bd9Sstevel@tonic-gate	$(LINK.c) editmap.o -o $@ $(LDLIBS) ../libsmdb/libsmdb.a \
1017c478bd9Sstevel@tonic-gate		../libsmutil/libsmutil.a ../db/libdb.a ../libsm/libsm.a
1027c478bd9Sstevel@tonic-gate	$(POST_PROCESS)
1037c478bd9Sstevel@tonic-gate
1047c478bd9Sstevel@tonic-gatepraliases:	praliases.o ../libsmutil/libsmutil.a ../libsmdb/libsmdb.a \
1057c478bd9Sstevel@tonic-gate			../libsm/libsm.a
1067c478bd9Sstevel@tonic-gate	$(LINK.c) praliases.o -o $@ $(LDLIBS) ../libsmdb/libsmdb.a \
1077c478bd9Sstevel@tonic-gate		../libsmutil/libsmutil.a ../db/libdb.a ../libsm/libsm.a
1087c478bd9Sstevel@tonic-gate	$(POST_PROCESS)
1097c478bd9Sstevel@tonic-gate
1107c478bd9Sstevel@tonic-gatemailstats:	mailstats.o ../libsmutil/libsmutil.a ../libsm/libsm.a
1117c478bd9Sstevel@tonic-gate	$(LINK.c) mailstats.o -o $@ $(LDLIBS) ../libsmutil/libsmutil.a \
1127c478bd9Sstevel@tonic-gate		../libsm/libsm.a
1137c478bd9Sstevel@tonic-gate	$(POST_PROCESS)
1147c478bd9Sstevel@tonic-gate
1157c478bd9Sstevel@tonic-gateinstall: all $(ROOTPROG) $(ROOTLIB)/mail.local $(ROOTLIB)/smrsh \
116287247a8SAlexander Pyhalov	$(ROOTLIBSMTPSM)/mailq $(ROOTUSRSBIN)/makemap \
117287247a8SAlexander Pyhalov	$(ROOTUSRSBIN)/etrn $(ROOTUSRSBIN)/editmap
1187c478bd9Sstevel@tonic-gate
1197c478bd9Sstevel@tonic-gateclean:
1207c478bd9Sstevel@tonic-gate	$(RM) $(OBJS) *.o
1217c478bd9Sstevel@tonic-gate
1227c478bd9Sstevel@tonic-gateinclude	../../Makefile.targ
123