summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bf/Makefile.uni
diff options
context:
space:
mode:
authorcvs2svn <admin@example.com>1998-10-05 20:13:17 +0000
committercvs2svn <admin@example.com>1998-10-05 20:13:17 +0000
commite82f18fab47b698d93971f576f962a3068132912 (patch)
tree681519717892864935c3d0533cf171098afa649a /src/lib/libcrypto/bf/Makefile.uni
parent536c76cbb863bab152f19842ab88772c01e922c7 (diff)
downloadopenbsd-SSLeay_0_9_0b.tar.gz
openbsd-SSLeay_0_9_0b.tar.bz2
openbsd-SSLeay_0_9_0b.zip
This commit was manufactured by cvs2git to create tag 'SSLeay_0_9_0b'.SSLeay_0_9_0b
Diffstat (limited to 'src/lib/libcrypto/bf/Makefile.uni')
-rw-r--r--src/lib/libcrypto/bf/Makefile.uni169
1 files changed, 169 insertions, 0 deletions
diff --git a/src/lib/libcrypto/bf/Makefile.uni b/src/lib/libcrypto/bf/Makefile.uni
new file mode 100644
index 0000000000..9ba5b0c854
--- /dev/null
+++ b/src/lib/libcrypto/bf/Makefile.uni
@@ -0,0 +1,169 @@
1# Targets
2# make - twidle the options yourself :-)
3# make cc - standard cc options
4# make gcc - standard gcc options
5# make x86-elf - linux-elf etc
6# make x86-out - linux-a.out, FreeBSD etc
7# make x86-solaris
8# make x86-bdsi
9
10DIR= bf
11TOP= .
12# use BF_PTR2 for intel boxes,
13# BF_PTR for sparc and MIPS/SGI
14# use nothing for Alpha and HP.
15
16# There are 3 possible performance options, experiment :-)
17#OPTS= -DBF_PTR # usr for sparc and MIPS/SGI
18#OPTS= -DBF_PTR2 # use for pentium
19OPTS= # use for pentium pro, Alpha and HP
20
21MAKE=make -f Makefile
22#CC=cc
23#CFLAG= -O
24
25CC=gcc
26#CFLAG= -O4 -funroll-loops -fomit-frame-pointer
27CFLAG= -O3 -fomit-frame-pointer
28
29CFLAGS=$(OPTS) $(CFLAG)
30CPP=$(CC) -E
31AS=as
32
33# Assember version of bf_encrypt().
34BF_ENC=bf_enc.o # normal C version
35#BF_ENC=asm/bx86-elf.o # elf format x86
36#BF_ENC=asm/bx86-out.o # a.out format x86
37#BF_ENC=asm/bx86-sol.o # solaris format x86
38#BF_ENC=asm/bx86bsdi.o # bsdi format x86
39
40LIBDIR=/usr/local/lib
41BINDIR=/usr/local/bin
42INCDIR=/usr/local/include
43MANDIR=/usr/local/man
44MAN1=1
45MAN3=3
46SHELL=/bin/sh
47LIBOBJ=bf_skey.o bf_ecb.o $(BF_ENC) bf_cfb64.o bf_ofb64.o
48LIBSRC=bf_skey.c bf_ecb.c bf_enc.c bf_cfb64.c bf_ofb64.c
49
50GENERAL=Makefile Makefile.ssl Makefile.uni asm bf_locl.org README \
51 COPYRIGHT blowfish.doc INSTALL
52
53TESTING= bftest bfspeed bf_opts
54TESTING_SRC=bftest.c bfspeed.c bf_opts.c
55HEADERS=bf_locl.h blowfish.h bf_pi.h
56
57ALL= $(GENERAL) $(TESTING_SRC) $(LIBSRC) $(HEADERS)
58
59BLIB= libblowfish.a
60
61all: $(BLIB) $(TESTING)
62
63cc:
64 $(MAKE) CC=cc CFLAGS="-O $(OPTS) $(CFLAG)" all
65
66gcc:
67 $(MAKE) CC=gcc CFLAGS="-O3 -fomit-frame-pointer $(OPTS) $(CFLAG)" all
68
69x86-elf:
70 $(MAKE) BF_ENC='asm/bx86-elf.o' CC=$(CC) CFLAGS="-DELF $(OPTS) $(CFLAG)" all
71
72x86-out:
73 $(MAKE) BF_ENC='asm/bx86-out.o' CC=$(CC) CFLAGS="-DOUT $(OPTS) $(CFLAG)" all
74
75x86-solaris:
76 $(MAKE) BF_ENC='asm/bx86-sol.o' CC=$(CC) CFLAGS="-DSOL $(OPTS) $(CFLAG)" all
77
78x86-bsdi:
79 $(MAKE) BF_ENC='asm/bx86bsdi.o' CC=$(CC) CFLAGS="-DBSDI $(OPTS) $(CFLAG)" all
80
81# elf
82asm/bx86-elf.o: asm/bx86unix.cpp
83 $(CPP) -DELF asm/bx86unix.cpp | $(AS) -o asm/bx86-elf.o
84
85# solaris
86asm/bx86-sol.o: asm/bx86unix.cpp
87 $(CC) -E -DSOL asm/bx86unix.cpp | sed 's/^#.*//' > asm/bx86-sol.s
88 as -o asm/bx86-sol.o asm/bx86-sol.s
89 rm -f asm/bx86-sol.s
90
91# a.out
92asm/bx86-out.o: asm/bx86unix.cpp
93 $(CPP) -DOUT asm/bx86unix.cpp | $(AS) -o asm/bx86-out.o
94
95# bsdi
96asm/bx86bsdi.o: asm/bx86unix.cpp
97 $(CPP) -DBSDI asm/bx86unix.cpp | $(AS) -o asm/bx86bsdi.o
98
99asm/bx86unix.cpp:
100 (cd asm; perl bf-586.pl cpp >bx86unix.cpp)
101
102test: all
103 ./bftest
104
105$(BLIB): $(LIBOBJ)
106 /bin/rm -f $(BLIB)
107 ar cr $(BLIB) $(LIBOBJ)
108 -if test -s /bin/ranlib; then /bin/ranlib $(BLIB); \
109 else if test -s /usr/bin/ranlib; then /usr/bin/ranlib $(BLIB); \
110 else exit 0; fi; fi
111
112bftest: bftest.o $(BLIB)
113 $(CC) $(CFLAGS) -o bftest bftest.o $(BLIB)
114
115bfspeed: bfspeed.o $(BLIB)
116 $(CC) $(CFLAGS) -o bfspeed bfspeed.o $(BLIB)
117
118bf_opts: bf_opts.o $(BLIB)
119 $(CC) $(CFLAGS) -o bf_opts bf_opts.o $(BLIB)
120
121tags:
122 ctags $(TESTING_SRC) $(LIBBF)
123
124tar:
125 tar chf libbf.tar $(ALL)
126
127shar:
128 shar $(ALL) >libbf.shar
129
130depend:
131 makedepend $(LIBBF) $(TESTING_SRC)
132
133clean:
134 /bin/rm -f *.o tags core $(TESTING) $(BLIB) .nfs* *.old *.bak asm/*.o
135
136dclean:
137 sed -e '/^# DO NOT DELETE THIS LINE/ q' Makefile >Makefile.new
138 mv -f Makefile.new Makefile
139
140# Eric is probably going to choke when he next looks at this --tjh
141install: $(BLIB)
142 if test $(INSTALLTOP); then \
143 echo SSL style install; \
144 cp $(BLIB) $(INSTALLTOP)/lib; \
145 if test -s /bin/ranlib; then \
146 /bin/ranlib $(INSTALLTOP)/lib/$(BLIB); \
147 else \
148 if test -s /usr/bin/ranlib; then \
149 /usr/bin/ranlib $(INSTALLTOP)/lib/$(BLIB); \
150 fi; fi; \
151 chmod 644 $(INSTALLTOP)/lib/$(BLIB); \
152 cp blowfish.h $(INSTALLTOP)/include; \
153 chmod 644 $(INSTALLTOP)/include/blowfish.h; \
154 else \
155 echo Standalone install; \
156 cp $(BLIB) $(LIBDIR)/$(BLIB); \
157 if test -s /bin/ranlib; then \
158 /bin/ranlib $(LIBDIR)/$(BLIB); \
159 else \
160 if test -s /usr/bin/ranlib; then \
161 /usr/bin/ranlib $(LIBDIR)/$(BLIB); \
162 fi; \
163 fi; \
164 chmod 644 $(LIBDIR)/$(BLIB); \
165 cp blowfish.h $(INCDIR)/blowfish.h; \
166 chmod 644 $(INCDIR)/blowfish.h; \
167 fi
168
169# DO NOT DELETE THIS LINE -- make depend depends on it.