-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.FreeBSD
170 lines (133 loc) · 4.04 KB
/
Makefile.FreeBSD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
#
# @(#)Makefile.FreeBSD 1.1 3/5/96
#
# Makefile for Privtool, by Mark Grant ([email protected]). Linux changes
# from David Summers ([email protected]).
# FreeBSD version adapted from above by Stuart Arnold, [email protected]
#
#
# In theory, you could have different code to replace mail_reader.c and
# x.c (e.g. for Motif, Xt, etc). In practice, that's not done yet.
#
# The following environment variables are needed:
# OPENWINHOME
#
.MAIN: all
INSTALLDIR=/usr/local/bin
MAIL_OBJECT = mail_reader.o $(FREEBSD_OBJ)
DISPLAY_OBJECT = x.o
OFILES = main.o pgplib.o buffers.o $(MAIL_OBJECT) messages.o gui.o \
$(DISPLAY_OBJECT)
#
# Use the following lines if you don't have PGP Tools.
#
PGPTOOLDIR=
PGPLDFLAGS=
#
# Use the following lines if you do have PGP Tools, and set PGPTOOLDIR
# to the directory with the header files and libpgptools.a. You
# may want to simply create a link from this directory to the PGP Tools
# directory.
#
#PGPTOOLDIR=./pgptools
#PGPLDFLAGS=-L$(PGPTOOLDIR) -lpgptools
#
# Set the following to the path for your PGP executable - can be blank
# if using PGP Tools
#
#PGPEXEC=$(HOME)/bin/pgp
PGPEXEC=/usr/local/bin/pgp
#
# Set the following to the path for your Mixmaster executable, and
# Mixmaster directory.
#
MIXEXEC=$(HOME)/bin/mixmaster
MIXPATH=$(HOME)/Mix
#
# Set the version number to claim in encrypted/signed messages if using
# PGP Tools - can be blank if using PGP for everything. You'll probably
# want to set this to 2.5 now that has been released.
#
#PGPVERSION=2.3a
PGPVERSION=2.6.2
#
# Use the first lines if your OpenWindows files are installed in standard
# lib/include directories, or the second if they're in a tree under
# $OPENWINHOME.
#
#OPENWINLDFLAGS=
#OPENWINCPPFLAGS=
OPENWINLDFLAGS=-L$(OPENWINHOME)/lib
OPENWINCPPFLAGS=-I$(OPENWINHOME)/include
LDFLAGS= $(OPENWINLDFLAGS) -lxview -lolgx -lX11 \
$(PGPLDFLAGS) -L/usr/lib -lcompat
#
# If you have PGP Tools, use the first line, otherwise use the
# second.
#
# You should modify the flags after -I$(PGPTOOLDIR) to match the
# flags you used when compiling libpgptools.a.
#
# Removing USE_HASH will save memory, but decrease performance. Using
# the public key hash table *significantly* improves the speed of
# signature verification for small messages when you have a large
# pubring.pgp.
#
#PGPTOOLS=-DPGPTOOLS -DUSE_HASH -I$(PGPTOOLDIR) -DUNIX -DDYN_ALLOC \
# -DNO_ASM -DHIGHFIRST -DIDEA32
PGPTOOLS=
#
# Define the directory where mail is stored.
#
MAIL_SPOOL_DIR=-DMAIL_SPOOL_DIR=\"/var/mail/\"
#MAIL_SPOOL_DIR=
#
# Use -g for debugging, change to -O for production use. Add -DNO_MIXMASTER
# if you do not have the Mixmaster software. Use -DSETGID if your /var/mail
# does not have global write permission.
#
#DEBUG=-g
DEBUG=-O
CFLAGS= $(DEBUG) -DPGPEXEC=\"$(PGPEXEC)\" -DPGPVERSION=\"$(PGPVERSION)\" \
-DSAVEPATH=\"$(SAVEPATH)\" -DMIXEXEC=\"$(MIXEXEC)\" \
-DMIXPATH=\"$(MIXPATH)\" -DNSA_ICON -DSETGID \
$(MAIL_SPOOL_DIR)
#
# Note: Keep -DSAFE until you are sure of correct operation on
# your machine !
#
# The SunOS strstr() code seems to take an age, so we define SLOW_STRSTR
# to use the simple C implementation in pgplib.c. Add -DACCEPT_PATH if
# you want to support Usenet archives that use Path: instead of From,
# but be aware that this may cause problems with mail....
#
#CPPFLAGS=$(OPENWINCPPFLAGS) -DSAFE $(PGPTOOLS) -DSLOW_STRSTR
CPPFLAGS=$(OPENWINCPPFLAGS) $(PGPTOOLS)
#
# Code is written for cc, but should work with gcc. However, I'm wary
# of trying to get the Xview code to with with gcc as I've had problems
# with that in the past.
#
CC=gcc
#CC=cc -DNON_ANSI
FREEBSD_OBJ = FreeBSD/parsedate.o
#
# Following provides automatic dependencies on SunOS
#
.KEEP_STATE:
#
# Actually do the compilation...
#
all: privtool
privtool: $(OFILES)
$(CC) $(CFLAGS) $(OFILES) -o privtool $(LDFLAGS)
clean:
rm *.o privtool FreeBSD/*.o
/* We now run setgid mail - do not do this unless SETGID
is defined above. */
install:
cp privtool $(INSTALLDIR)
chgrp mail $(INSTALLDIR)/privtool
chmod g+s $(INSTALLDIR)/privtool
.c.o:
$(CC) -c $< -o $@ $(CPPFLAGS) $(CFLAGS)