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