1#$Id: Makefile,v 1.76 2001/07/12 01:27:19 guenther Exp $
2
3# BASENAME should point to where the whole lot will be installed
4# change BASENAME to your home directory if need be
5BASENAME	= /usr
6# For display in the man pages
7VISIBLE_BASENAME= $(BASENAME)
8
9# You can predefine ARCHITECTURE to a bin directory suffix
10ARCHITECTURE	=
11#ARCHITECTURE	=.sun4
12
13BINDIR_TAIL	= bin$(ARCHITECTURE)
14MANDIR		= $(BASENAME)/man
15BINDIR		= $(BASENAME)/$(BINDIR_TAIL)
16VISIBLE_BINDIR	= $(VISIBLE_BASENAME)/$(BINDIR_TAIL)
17# MAN1SUFFIX for regular utility manuals
18MAN1SUFFIX	=1
19# MAN5SUFFIX for file-format descriptions
20MAN5SUFFIX	=5
21MAN1DIR		= $(MANDIR)/man$(MAN1SUFFIX)
22MAN5DIR		= $(MANDIR)/man$(MAN5SUFFIX)
23
24# Uncomment to install compressed man pages (possibly add extra suffix
25# to the definitions of MAN?DIR and/or MAN?SUFFIX by hand)
26#MANCOMPRESS = compress
27
28############################*#
29# Things that can be made are:
30#
31# help (or targets)	Displays this list you are looking at
32# init (or makefiles)	Performs some preliminary sanity checks on your system
33#			and generates Makefiles accordingly
34# bins			Preinstalls only the binaries to ./new
35# mans			Preinstalls only the man pages to ./new
36# all			Does both
37# install.bin		Installs the binaries from ./new to $(BINDIR)
38# install.man		Installs the man pages from ./new to $(MAN[15]DIR)
39# install		Does both
40# recommend		Show some recommended suid/sgid modes
41# install-suid		Impose the modes shown by 'make recommend'
42# clean			Attempts to restore the package to pre-make state
43# realclean		Attempts to restore the package to pre-make-init state
44# deinstall		Removes any previously installed binaries and man
45#			pages from your system by careful surgery
46# autoconf.h		Will list your system's anomalies
47# procmail		Preinstalls just all procmail related stuff to ./new
48# formail		Preinstalls just all formail related stuff to ./new
49# lockfile		Preinstalls just all lockfile related stuff to ./new
50# setid			Creates the setid binary needed by the SmartList
51#			installation
52######################*#
53
54# Makefile.0 - mark, don't (re)move this, a sed script needs it
55
56LOCKINGTEST=__defaults__
57
58#LOCKINGTEST=/tmp .	# Uncomment and add any directories you see fit.
59#			If LOCKINGTEST is defined, autoconf will NOT
60#			prompt you to enter additional directories.
61#			See INSTALL for more information about the
62#			significance of the locking tests.
63
64########################################################################
65# Only edit below this line if you *think* you know what you are doing #
66########################################################################
67
68#LOCKINGTEST=100	# Uncomment (and change) if you think you know
69#			it better than the autoconf lockingtests.
70#			This will cause the lockingtests to be hotwired.
71#			100	to enable fcntl()
72#			010	to enable lockf()
73#			001	to enable flock()
74#			Or them together to get the desired combination.
75
76# Optional system libraries we search for
77SEARCHLIBS = -lm -ldir -lx -lsocket -lnet -linet -lnsl_s -lnsl_i -lnsl -lsun \
78 -lgen -lsockdns -ldl
79#			-lresolv	# not really needed, is it?
80
81# Informal list of directories where we look for the libraries in SEARCHLIBS
82LIBPATHS=/lib /usr/lib /usr/local/lib
83
84GCC_WARNINGS = -O2 -pedantic -Wreturn-type -Wunused -Wformat -Wtraditional \
85 -Wpointer-arith -Wconversion -Waggregate-return \
86 #-Wimplicit -Wshadow -Wid-clash-6 #-Wuninitialized
87
88# The place to put your favourite extra cc flag
89CFLAGS0 = -O #$(GCC_WARNINGS)
90LDFLAGS0= -s
91# Read my libs :-)
92LIBS=
93
94CFLAGS1 = $(CFLAGS0) #-posix -Xp
95LDFLAGS1= $(LDFLAGS0) $(LIBS) #-lcposix
96
97####CC	= cc # gcc
98# object file extension
99O	= o
100RM	= /bin/rm -f
101MV	= mv -f
102LN	= ln
103BSHELL	= /bin/sh
104INSTALL = cp
105DEVNULL = /dev/null
106STRIP	= strip
107MKDIRS	= new/mkinstalldirs
108
109SUBDIRS = src man
110BINSS	= procmail lockfile formail mailstat
111MANS1S	= procmail formail lockfile
112MANS5S	= procmailrc procmailsc procmailex
113
114# Possible locations for the sendmail.cf file
115SENDMAILCFS = /etc/mail/sendmail.cf /etc/sendmail.cf /usr/lib/sendmail.cf
116
117# Makefile - mark, don't (re)move this, a sed script needs it
118
119all: init
120	$(MAKE) make $@
121
122make:
123	@$(BSHELL) -c "exit 0"
124
125.PRECIOUS: Makefile
126
127init:
128	$(BSHELL) ./initmake $(BSHELL) "$(SHELL)" "$(RM)" "$(MV)" "$(LN)" \
129 "$(SEARCHLIBS)" \
130 "$(LIBPATHS)" \
131 $(DEVNULL) "$(MAKE)" $(O) \
132 "$(CC)" "$(CFLAGS1)" "$(LDFLAGS1)" "$(BINSS)" \
133 "$(MANS1S)" \
134 "$(MANS5S)" "$(SUBDIRS)" \
135 "$(VISIBLE_BINDIR)" \
136 "$(STRIP)"
137
138makefiles makefile Makefiles Makefile: init
139	@$(BSHELL) -c "exit 0"
140
141help target targets \
142bins mans install.bin install.man install recommend install-suid clean setid \
143realclean veryclean clobber deinstall autoconf.h $(BINSS) multigram: init
144	$(MAKE) make $@
145