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 # Copyright 2017 Gary Mills 22 # Copyright 2009 Sun Microsystems, Inc. All rights reserved. 23 # Use is subject to license terms. 24 # 25 26 # cmd/sendmail/aux/Makefile 27 # 28 include ../../Makefile.cmd 29 include ../Makefile.cmd 30 31 PROG= mailstats mconnect vacation mailcompat praliases 32 33 LIBPROG= mail.local smrsh 34 35 USRSBINPROG= etrn makemap editmap 36 37 LIBSMTPSMPROG= mailq 38 39 # $(PROG) by default 40 CLOBBERFILES= $(LIBPROG) $(USRSBINPROG) $(LIBSMTPSMPROG) 41 42 OBJS= $(PROG:%=%.o) 43 44 .PARALLEL: $(OBJS) $(PROG) $(LIBPROG) $(USRSBINPROG) 45 46 SRCS= $(PROG:%=%.c) 47 48 editmap := LDLIBS += -lldap 49 mail.local := LDLIBS += -lsocket -lnsl -lmail -lldap 50 mailq := LDLIBS += -lsecdb 51 mailstats := LDLIBS += -lldap 52 makemap := LDLIBS += -lldap 53 mconnect := LDLIBS += -lsocket -lnsl 54 praliases := LDLIBS += -lldap 55 smrsh := LDLIBS += -lldap 56 vacation := LDLIBS += -lldap 57 $(ROOTLIBSMTPSM)/mailq := FILEMODE = 4555 58 59 # Suppress the error for: verbose 60 editmap.o := CERRWARN += -_gcc=-Wno-unused-but-set-variable 61 62 INCPATH= -I../src -I../db -I../include 63 64 ENVDEF= -DNOT_SENDMAIL 65 SUNENVDEF= -DSUN_EXTENSIONS -DUSE_VENDOR_CF_PATH 66 DBMDEF= -DNDBM -DNEWDB 67 68 CPPFLAGS = $(INCPATH) $(ENVDEF) $(SUNENVDEF) $(DBMDEF) $(CPPFLAGS.sm) 69 70 # Nearly every support application provides sleep(). This isn't incompatible 71 # with libc, but can be confined to the applications themselves. 72 LDFLAGS += $(MAPFILE.NGB:%=-M%) 73 74 .KEEP_STATE: 75 76 all: $(PROG) $(LIBSMTPSMPROG) $(LIBPROG) $(USRSBINPROG) 77 78 convtime.o: ../src/convtime.c 79 $(COMPILE.c) ../src/convtime.c 80 $(POST_PROCESS_O) 81 82 vacation: vacation.o convtime.o rfc2047.o ../libsm/libsm.a 83 $(LINK.c) vacation.o convtime.o rfc2047.o -o $@ $(LDLIBS) \ 84 ../libsm/libsm.a 85 $(POST_PROCESS) 86 87 mail.local: mail.local.o ../libsmutil/libsmutil.a ../libsm/libsm.a 88 $(LINK.c) mail.local.o -o $@ $(LDLIBS) ../libsmutil/libsmutil.a \ 89 ../libsm/libsm.a 90 $(POST_PROCESS) 91 92 smrsh: smrsh.o ../libsm/libsm.a 93 $(LINK.c) smrsh.o -o $@ $(LDLIBS) ../libsm/libsm.a 94 $(POST_PROCESS) 95 96 makemap: makemap.o ../libsmutil/libsmutil.a ../libsmdb/libsmdb.a \ 97 ../db/libdb.a ../libsm/libsm.a 98 $(LINK.c) makemap.o -o $@ $(LDLIBS) ../libsmdb/libsmdb.a \ 99 ../libsmutil/libsmutil.a ../db/libdb.a ../libsm/libsm.a 100 $(POST_PROCESS) 101 102 editmap: editmap.o ../libsmutil/libsmutil.a ../libsmdb/libsmdb.a \ 103 ../db/libdb.a ../libsm/libsm.a 104 $(LINK.c) editmap.o -o $@ $(LDLIBS) ../libsmdb/libsmdb.a \ 105 ../libsmutil/libsmutil.a ../db/libdb.a ../libsm/libsm.a 106 $(POST_PROCESS) 107 108 praliases: praliases.o ../libsmutil/libsmutil.a ../libsmdb/libsmdb.a \ 109 ../libsm/libsm.a 110 $(LINK.c) praliases.o -o $@ $(LDLIBS) ../libsmdb/libsmdb.a \ 111 ../libsmutil/libsmutil.a ../db/libdb.a ../libsm/libsm.a 112 $(POST_PROCESS) 113 114 mailstats: mailstats.o ../libsmutil/libsmutil.a ../libsm/libsm.a 115 $(LINK.c) mailstats.o -o $@ $(LDLIBS) ../libsmutil/libsmutil.a \ 116 ../libsm/libsm.a 117 $(POST_PROCESS) 118 119 install: all $(ROOTPROG) $(ROOTLIB)/mail.local $(ROOTLIB)/smrsh \ 120 $(ROOTLIBSMTPSM)/mailq $(ROOTUSRSBIN)/makemap \ 121 $(ROOTUSRSBIN)/etrn $(ROOTUSRSBIN)/editmap 122 123 clean: 124 $(RM) $(OBJS) *.o 125 126 lint: lint_PROG 127 128 129 include ../../Makefile.targ