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, Version 1.0 only 6# (the "License"). You may not use this file except in compliance 7# with the License. 8# 9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10# or http://www.opensolaris.org/os/licensing. 11# See the License for the specific language governing permissions 12# and limitations under the License. 13# 14# When distributing Covered Code, include this CDDL HEADER in each 15# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16# If applicable, add the following below this CDDL HEADER, with the 17# fields enclosed by brackets "[]" replaced with your own identifying 18# information: Portions Copyright [yyyy] [name of copyright owner] 19# 20# CDDL HEADER END 21# 22# 23# Copyright 2005 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 36# additional .o files needed 37OBJADD=sun_compat.o 38 39OBJS= alias.o arpadate.o bf.o collect.o conf.o control.o convtime.o daemon.o \ 40 deliver.o domain.o envelope.o err.o headers.o macro.o main.o map.o \ 41 mci.o milter.o mime.o parseaddr.o queue.o ratectrl.o readcf.o \ 42 recipient.o savemail.o sfsasl.o sm_resolve.o srvrsmtp.o stab.o stats.o \ 43 sysexits.o tls.o trace.o udb.o usersmtp.o util.o version.o ${OBJADD} 44 45SRCS= $(OBJS:%.o=%.c) 46 47LDFLAGS += -R$(SFW_ROOT)/lib 48 49# EXPORT DELETE START 50CRYPTOLIBS= -lssl -lcrypto 51# EXPORT DELETE END 52LDLIBS += ../libsmutil/libsmutil.a ../libsm/libsm.a -lresolv -lsocket \ 53 -lnsl ../db/libdb.a -lldap -lsldap -L$(ROOTSFWLIB) -lwrap \ 54 $(CRYPTOLIBS) 55 56INCPATH= -I. -I../include -I../db -I$(ROOTSFWINCLUDE) 57 58# EXPORT DELETE START 59CRYPTOENVDEF= -DSTARTTLS 60# EXPORT DELETE END 61ENVDEF= $(RLS_DEF) -DNETINET6 -DTCPWRAPPERS $(CRYPTOENVDEF) 62SUNENVDEF= -DSUN_EXTENSIONS -DVENDOR_DEFAULT=VENDOR_SUN \ 63 -DSUN_INIT_DOMAIN -DSUN_SIMPLIFIED_LDAP 64 65CPPFLAGS = $(INCPATH) $(ENVDEF) $(SUNENVDEF) $(DBMDEF) $(CPPFLAGS.master) 66 67FILEMODE= 2555 68OWNER= root 69GROUP= smmsp 70 71ROOTSYMLINKS= $(ROOTUSRSBIN)/newaliases $(ROOTUSRSBIN)/sendmail 72 73# build rule 74# 75 76.KEEP_STATE: 77all: $(PROG) 78 79.PARALLEL: $(OBJS) 80 81$(PROG): $(OBJS) ../libsmutil/libsmutil.a ../libsm/libsm.a ../db/libdb.a 82 $(LINK.c) -o $@ $(OBJS) $(LDLIBS) 83 $(POST_PROCESS) 84 85install: $(ROOTLIBPROG) $(ROOTSYMLINKS) 86 87$(ROOTSYMLINKS): 88 $(RM) $@; $(SYMLINK) ../lib/sendmail $@ 89 90clean: 91 $(RM) $(PROG) $(OBJS) 92 93lint: lint_SRCS 94 95# EXPORT DELETE START 96EXPORT_SRC: 97 $(RM) Makefile+ 98 $(SED) -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \ 99 < Makefile > Makefile+ 100 $(MV) Makefile+ Makefile 101 $(CHMOD) 444 Makefile 102# EXPORT DELETE END 103 104include ../../Makefile.targ 105