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#ident "%Z%%M% %I% %E% SMI" 24# 25# Copyright 1990 - 2002 Sun Microsystems, Inc. All rights reserved. 26# Use is subject to license terms. 27# 28# cmd/sendmail/aux/Makefile 29# 30include ../../Makefile.cmd 31include ../Makefile.cmd 32 33PROG= mailstats mconnect vacation mailcompat aliasadm praliases mailq 34 35LIBPROG= mail.local smrsh 36 37USRSBINPROG= etrn makemap editmap 38 39# $(PROG) by default 40CLOBBERFILES= $(LIBPROG) $(USRSBINPROG) 41 42OBJS= $(PROG:%=%.o) nisplus.o nisedit.o 43 44.PARALLEL: $(OBJS) $(PROG) $(LIBPROG) $(USRSBINPROG) 45 46SRCS= $(PROG:%=%.c) nisplus.c nisedit.c 47 48aliasadm := LDLIBS += -lnsl 49editmap := LDLIBS += -lldap 50mail.local := LDLIBS += -lsocket -lnsl -lmail -lldap 51mailq := LDLIBS += -lsecdb 52mailstats := LDLIBS += -lldap 53makemap := LDLIBS += -lldap 54mconnect := LDLIBS += -lsocket -lnsl 55praliases := LDLIBS += -lldap 56smrsh := LDLIBS += -lldap 57vacation := LDLIBS += -lldap 58$(ROOTBIN)/mailq := FILEMODE = 4555 59 60INCPATH= -I../src -I../db -I../include 61 62ENVDEF= $(RLS_DEF) -DNOT_SENDMAIL 63SUNENVDEF= -DSUN_EXTENSIONS -DUSE_VENDOR_CF_PATH 64DBMDEF= -DNDBM -DNEWDB 65 66CPPFLAGS = $(INCPATH) $(ENVDEF) $(SUNENVDEF) $(DBMDEF) $(CPPFLAGS.master) 67 68.KEEP_STATE: 69 70all: $(PROG) $(LIBPROG) $(USRSBINPROG) 71 72convtime.o: ../src/convtime.c 73 $(COMPILE.c) ../src/convtime.c 74 $(POST_PROCESS_O) 75 76vacation: vacation.o convtime.o rfc2047.o ../libsm/libsm.a 77 $(LINK.c) vacation.o convtime.o rfc2047.o -o $@ $(LDLIBS) \ 78 ../libsm/libsm.a 79 $(POST_PROCESS) 80 81aliasadm: aliasadm.o nisplus.o nisedit.o 82 $(LINK.c) aliasadm.o nisplus.o nisedit.o -o $@ $(LDLIBS) 83 $(POST_PROCESS) 84 85mail.local: mail.local.o ../libsmutil/libsmutil.a ../libsm/libsm.a 86 $(LINK.c) mail.local.o -o $@ $(LDLIBS) ../libsmutil/libsmutil.a \ 87 ../libsm/libsm.a 88 $(POST_PROCESS) 89 90smrsh: smrsh.o ../libsm/libsm.a 91 $(LINK.c) smrsh.o -o $@ $(LDLIBS) ../libsm/libsm.a 92 $(POST_PROCESS) 93 94makemap: makemap.o ../libsmutil/libsmutil.a ../libsmdb/libsmdb.a \ 95 ../db/libdb.a ../libsm/libsm.a 96 $(LINK.c) makemap.o -o $@ $(LDLIBS) ../libsmdb/libsmdb.a \ 97 ../libsmutil/libsmutil.a ../db/libdb.a ../libsm/libsm.a 98 $(POST_PROCESS) 99 100editmap: editmap.o ../libsmutil/libsmutil.a ../libsmdb/libsmdb.a \ 101 ../db/libdb.a ../libsm/libsm.a 102 $(LINK.c) editmap.o -o $@ $(LDLIBS) ../libsmdb/libsmdb.a \ 103 ../libsmutil/libsmutil.a ../db/libdb.a ../libsm/libsm.a 104 $(POST_PROCESS) 105 106praliases: praliases.o ../libsmutil/libsmutil.a ../libsmdb/libsmdb.a \ 107 ../libsm/libsm.a 108 $(LINK.c) praliases.o -o $@ $(LDLIBS) ../libsmdb/libsmdb.a \ 109 ../libsmutil/libsmutil.a ../db/libdb.a ../libsm/libsm.a 110 $(POST_PROCESS) 111 112mailstats: mailstats.o ../libsmutil/libsmutil.a ../libsm/libsm.a 113 $(LINK.c) mailstats.o -o $@ $(LDLIBS) ../libsmutil/libsmutil.a \ 114 ../libsm/libsm.a 115 $(POST_PROCESS) 116 117etrn%: etrn%.pl 118 $(CP) -f $< $@ 119 $(CHMOD) +x $@ 120 121install: all $(ROOTPROG) $(ROOTLIB)/mail.local $(ROOTLIB)/smrsh \ 122 $(ROOTUSRSBIN)/makemap $(ROOTUSRSBIN)/etrn $(ROOTUSRSBIN)/editmap 123 124clean: 125 $(RM) $(OBJS) *.o 126 127lint: lint_PROG 128 129 130include ../../Makefile.targ 131