xref: /illumos-gate/usr/src/cmd/sendmail/Makefile (revision ac2f5fbefc05314fcd97b03f2338b39e6efe643f)
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 2009 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# Copyright 2019 Garrett D'Amore <garrett@damore.org>
27#
28# cmd/sendmail/Makefile
29#
30# Makefile for top level sendmail source directory
31#
32
33# static libraries (db, libsm, libsmdb, libsmutil) must be built before
34# src and util
35SUBDIRS=	cf lib db libsm libsmdb libsmutil .WAIT src util
36
37include 	../Makefile.cmd
38
39ROOTDIRS=	$(ROOT)/var/spool/mqueue $(ROOT)/var/spool/clientmqueue
40$(ROOTDIRS):=	DIRMODE = 0750
41$(ROOT)/var/spool/clientmqueue:=	DIRMODE = 0770
42
43all:=           TARGET= all
44install:=       TARGET= install
45clean:=         TARGET= clean
46clobber:=       TARGET= clobber
47lint:=          TARGET= lint
48
49.KEEP_STATE:
50
51all clean clobber lint:	$(SUBDIRS)
52
53install: 	$(ROOTDIRS) $(SUBDIRS) $(ROOTMANIFEST) $(ROOTSVCSH)
54
55all install:	THIRDPARTYLICENSE
56
57clobber:	FRC
58	$(RM) THIRDPARTYLICENSE
59
60.PARALLEL:	$(SUBDIRS)
61
62$(ROOTDIRS):
63	$(INS.dir)
64
65$(SUBDIRS): 	FRC
66	@cd $@; pwd; $(MAKE) $(TARGET)
67
68THIRDPARTYLICENSE: LICENSE db/LICENSE
69	$(SED) -n '/SENDMAIL LICENSE/,$$p' LICENSE > $@
70	$(ECHO) " " >> $@
71	$(SED) -n '/The following are the copyrights/,$$p' db/LICENSE >> $@
72
73FRC:
74