1786 Sendmail should be built with SASL methods
[unleashed.git] / usr / src / cmd / sendmail / src / Makefile
blobe171e139d3b5b0aff2bc0a224059a87db35edbe2
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
22 # Copyright (c) 2011 Gary Mills
25 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
26 # Use is subject to license terms.
28 # cmd/sendmail/src/Makefile
31 PROG= sendmail
33 include ../../Makefile.cmd
34 include ../Makefile.cmd
36 OBJS= alias.o arpadate.o bf.o collect.o conf.o control.o convtime.o daemon.o \
37 deliver.o domain.o envelope.o err.o headers.o macro.o main.o map.o \
38 mci.o milter.o mime.o parseaddr.o queue.o ratectrl.o readcf.o \
39 recipient.o sasl.o savemail.o sfsasl.o sm_resolve.o srvrsmtp.o stab.o \
40 stats.o sysexits.o tls.o trace.o udb.o usersmtp.o util.o version.o
42 SRCS= $(OBJS:%.o=%.c)
44 MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB)
45 LDFLAGS += $(MAPFILES:%=-M%)
47 # EXPORT DELETE START
48 CRYPTOLIBS= -lssl -lcrypto -lsasl
49 # EXPORT DELETE END
50 LDLIBS += ../libsmutil/libsmutil.a ../libsm/libsm.a -lresolv -lsocket \
51 -lnsl ../db/libdb.a -lldap -lsldap -lwrap -lumem \
52 $(CRYPTOLIBS)
54 INCPATH= -I. -I../include -I../db
56 # EXPORT DELETE START
57 CRYPTOENVDEF= -DSTARTTLS -DSASL=20115
58 # EXPORT DELETE END
59 ENVDEF= -DNETINET6 -DTCPWRAPPERS $(CRYPTOENVDEF)
60 SUNENVDEF= -DSUN_EXTENSIONS -DVENDOR_DEFAULT=VENDOR_SUN \
61 -DSUN_INIT_DOMAIN -DSUN_SIMPLIFIED_LDAP -D_FFR_LOCAL_DAEMON \
62 -D_FFR_MAIL_MACRO
64 CPPFLAGS = $(INCPATH) $(ENVDEF) $(SUNENVDEF) $(DBMDEF) $(CPPFLAGS.sm)
66 FILEMODE= 2555
68 ROOTSYMLINKS= $(ROOTUSRSBIN)/newaliases $(ROOTUSRSBIN)/sendmail
70 # build rule
73 .KEEP_STATE:
74 all: $(PROG)
76 .PARALLEL: $(OBJS)
78 $(PROG): $(OBJS) $(MAPFILES) \
79 ../libsmutil/libsmutil.a ../libsm/libsm.a ../db/libdb.a
80 $(LINK.c) -o $@ $(OBJS) $(LDLIBS)
81 $(POST_PROCESS)
83 install: $(ROOTLIBPROG) $(ROOTSYMLINKS)
85 $(ROOTSYMLINKS):
86 $(RM) $@; $(SYMLINK) ../lib/sendmail $@
88 clean:
89 $(RM) $(PROG) $(OBJS)
91 lint: lint_SRCS
93 # EXPORT DELETE START
94 EXPORT_SRC:
95 $(RM) Makefile+
96 $(SED) -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
97 < Makefile > Makefile+
98 $(MV) Makefile+ Makefile
99 $(CHMOD) 444 Makefile
100 # EXPORT DELETE END
102 include ../../Makefile.targ