xref: /illumos-gate/usr/src/cmd/sendmail/src/Makefile (revision 4abb96737d15cd2d6530b0aa7b8404ec911ad940)
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
5*4abb9673Sjbeck# Common Development and Distribution License (the "License").
6*4abb9673Sjbeck# 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#
21*4abb9673Sjbeck
227c478bd9Sstevel@tonic-gate#
23*4abb9673Sjbeck# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
247c478bd9Sstevel@tonic-gate# Use is subject to license terms.
257c478bd9Sstevel@tonic-gate#
267c478bd9Sstevel@tonic-gate# ident	"%Z%%M%	%I%	%E% SMI"
277c478bd9Sstevel@tonic-gate#
287c478bd9Sstevel@tonic-gate# cmd/sendmail/src/Makefile
297c478bd9Sstevel@tonic-gate#
307c478bd9Sstevel@tonic-gate
317c478bd9Sstevel@tonic-gatePROG=	sendmail
327c478bd9Sstevel@tonic-gate
337c478bd9Sstevel@tonic-gateinclude 	../../Makefile.cmd
347c478bd9Sstevel@tonic-gateinclude 	../Makefile.cmd
357c478bd9Sstevel@tonic-gate
367c478bd9Sstevel@tonic-gate# additional .o files needed
377c478bd9Sstevel@tonic-gateOBJADD=sun_compat.o
387c478bd9Sstevel@tonic-gate
397c478bd9Sstevel@tonic-gateOBJS= alias.o arpadate.o bf.o collect.o conf.o control.o convtime.o daemon.o \
407c478bd9Sstevel@tonic-gate	deliver.o domain.o envelope.o err.o headers.o macro.o main.o map.o \
417c478bd9Sstevel@tonic-gate	mci.o milter.o mime.o parseaddr.o queue.o ratectrl.o readcf.o \
427c478bd9Sstevel@tonic-gate	recipient.o savemail.o sfsasl.o sm_resolve.o srvrsmtp.o stab.o stats.o \
437c478bd9Sstevel@tonic-gate	sysexits.o tls.o trace.o udb.o usersmtp.o util.o version.o ${OBJADD}
447c478bd9Sstevel@tonic-gate
457c478bd9Sstevel@tonic-gateSRCS=	$(OBJS:%.o=%.c)
467c478bd9Sstevel@tonic-gate
477c478bd9Sstevel@tonic-gateLDFLAGS +=	-R$(SFW_ROOT)/lib
487c478bd9Sstevel@tonic-gate
497c478bd9Sstevel@tonic-gate# EXPORT DELETE START
507c478bd9Sstevel@tonic-gateCRYPTOLIBS=	-lssl -lcrypto
517c478bd9Sstevel@tonic-gate# EXPORT DELETE END
527c478bd9Sstevel@tonic-gateLDLIBS += 	../libsmutil/libsmutil.a ../libsm/libsm.a -lresolv -lsocket \
537c478bd9Sstevel@tonic-gate		-lnsl ../db/libdb.a -lldap -lsldap -L$(ROOTSFWLIB) -lwrap \
547c478bd9Sstevel@tonic-gate		$(CRYPTOLIBS)
557c478bd9Sstevel@tonic-gate
567c478bd9Sstevel@tonic-gateINCPATH=	-I. -I../include -I../db -I$(ROOTSFWINCLUDE)
577c478bd9Sstevel@tonic-gate
587c478bd9Sstevel@tonic-gate# EXPORT DELETE START
597c478bd9Sstevel@tonic-gateCRYPTOENVDEF=	-DSTARTTLS
607c478bd9Sstevel@tonic-gate# EXPORT DELETE END
61*4abb9673SjbeckENVDEF=		-DNETINET6 -DTCPWRAPPERS $(CRYPTOENVDEF)
627c478bd9Sstevel@tonic-gateSUNENVDEF=	-DSUN_EXTENSIONS -DVENDOR_DEFAULT=VENDOR_SUN \
637c478bd9Sstevel@tonic-gate		-DSUN_INIT_DOMAIN -DSUN_SIMPLIFIED_LDAP
647c478bd9Sstevel@tonic-gate
65*4abb9673SjbeckCPPFLAGS = 	$(INCPATH) $(ENVDEF) $(SUNENVDEF) $(DBMDEF) $(CPPFLAGS.sm)
667c478bd9Sstevel@tonic-gate
677c478bd9Sstevel@tonic-gateFILEMODE= 	2555
687c478bd9Sstevel@tonic-gateOWNER=		root
697c478bd9Sstevel@tonic-gateGROUP=		smmsp
707c478bd9Sstevel@tonic-gate
717c478bd9Sstevel@tonic-gateROOTSYMLINKS=	$(ROOTUSRSBIN)/newaliases $(ROOTUSRSBIN)/sendmail
727c478bd9Sstevel@tonic-gate
737c478bd9Sstevel@tonic-gate# build rule
747c478bd9Sstevel@tonic-gate#
757c478bd9Sstevel@tonic-gate
767c478bd9Sstevel@tonic-gate.KEEP_STATE:
777c478bd9Sstevel@tonic-gateall:		$(PROG)
787c478bd9Sstevel@tonic-gate
797c478bd9Sstevel@tonic-gate.PARALLEL:	$(OBJS)
807c478bd9Sstevel@tonic-gate
817c478bd9Sstevel@tonic-gate$(PROG):	$(OBJS) ../libsmutil/libsmutil.a ../libsm/libsm.a ../db/libdb.a
827c478bd9Sstevel@tonic-gate	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
837c478bd9Sstevel@tonic-gate	$(POST_PROCESS)
847c478bd9Sstevel@tonic-gate
857c478bd9Sstevel@tonic-gateinstall:	$(ROOTLIBPROG) $(ROOTSYMLINKS)
867c478bd9Sstevel@tonic-gate
877c478bd9Sstevel@tonic-gate$(ROOTSYMLINKS):
887c478bd9Sstevel@tonic-gate	$(RM) $@; $(SYMLINK) ../lib/sendmail $@
897c478bd9Sstevel@tonic-gate
907c478bd9Sstevel@tonic-gateclean:
917c478bd9Sstevel@tonic-gate	$(RM) $(PROG) $(OBJS)
927c478bd9Sstevel@tonic-gate
937c478bd9Sstevel@tonic-gatelint:	lint_SRCS
947c478bd9Sstevel@tonic-gate
957c478bd9Sstevel@tonic-gate# EXPORT DELETE START
967c478bd9Sstevel@tonic-gateEXPORT_SRC:
977c478bd9Sstevel@tonic-gate	$(RM) Makefile+
987c478bd9Sstevel@tonic-gate	$(SED) -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
997c478bd9Sstevel@tonic-gate	    < Makefile > Makefile+
1007c478bd9Sstevel@tonic-gate	$(MV) Makefile+ Makefile
1017c478bd9Sstevel@tonic-gate	$(CHMOD) 444 Makefile
1027c478bd9Sstevel@tonic-gate# EXPORT DELETE END
1037c478bd9Sstevel@tonic-gate
1047c478bd9Sstevel@tonic-gateinclude		../../Makefile.targ
105