xref: /illumos-gate/usr/src/cmd/sendmail/src/Makefile (revision 18c2aff776a775d34a4c9893a4c72e0434d68e36)
1#
2# CDDL HEADER START
3#
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.
7#
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.
12#
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]
18#
19# CDDL HEADER END
20#
21
22#
23# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28# cmd/sendmail/src/Makefile
29#
30
31PROG=	sendmail
32
33include 	../../Makefile.cmd
34include 	../Makefile.cmd
35
36OBJS= 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 savemail.o sfsasl.o sm_resolve.o srvrsmtp.o stab.o stats.o \
40	sysexits.o tls.o trace.o udb.o usersmtp.o util.o version.o
41
42SRCS=	$(OBJS:%.o=%.c)
43
44LDFLAGS +=	-R$(SFW_ROOT)/lib
45
46# EXPORT DELETE START
47CRYPTOLIBS=	-lssl -lcrypto
48# EXPORT DELETE END
49LDLIBS += 	../libsmutil/libsmutil.a ../libsm/libsm.a -lresolv -lsocket \
50		-lnsl ../db/libdb.a -lldap -lsldap -L$(ROOTSFWLIB) -lwrap \
51		$(CRYPTOLIBS)
52
53INCPATH=	-I. -I../include -I../db -I$(ROOTSFWINCLUDE)
54
55# EXPORT DELETE START
56CRYPTOENVDEF=	-DSTARTTLS
57# EXPORT DELETE END
58ENVDEF=		-DNETINET6 -DTCPWRAPPERS $(CRYPTOENVDEF)
59SUNENVDEF=	-DSUN_EXTENSIONS -DVENDOR_DEFAULT=VENDOR_SUN \
60		-DSUN_INIT_DOMAIN -DSUN_SIMPLIFIED_LDAP
61
62CPPFLAGS = 	$(INCPATH) $(ENVDEF) $(SUNENVDEF) $(DBMDEF) $(CPPFLAGS.sm)
63
64FILEMODE= 	2555
65OWNER=		root
66GROUP=		smmsp
67
68ROOTSYMLINKS=	$(ROOTUSRSBIN)/newaliases $(ROOTUSRSBIN)/sendmail
69
70# build rule
71#
72
73.KEEP_STATE:
74all:		$(PROG)
75
76.PARALLEL:	$(OBJS)
77
78$(PROG):	$(OBJS) ../libsmutil/libsmutil.a ../libsm/libsm.a ../db/libdb.a
79	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
80	$(POST_PROCESS)
81
82install:	$(ROOTLIBPROG) $(ROOTSYMLINKS)
83
84$(ROOTSYMLINKS):
85	$(RM) $@; $(SYMLINK) ../lib/sendmail $@
86
87clean:
88	$(RM) $(PROG) $(OBJS)
89
90lint:	lint_SRCS
91
92# EXPORT DELETE START
93EXPORT_SRC:
94	$(RM) Makefile+
95	$(SED) -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
96	    < Makefile > Makefile+
97	$(MV) Makefile+ Makefile
98	$(CHMOD) 444 Makefile
99# EXPORT DELETE END
100
101include		../../Makefile.targ
102