Makefile.ssl 7.7 KB
Newer Older
1 2 3 4 5 6 7 8
#
# SSLeay/crypto/des/Makefile
#

DIR=	des
TOP=	../..
CC=	cc
CPP=	$(CC) -E
U
Ulf Möller 已提交
9
INCLUDES=-I../../include
10
CFLAG=-g
11 12
INSTALL_PREFIX=
OPENSSLDIR=     /usr/local/ssl
13 14
INSTALLTOP=/usr/local/ssl
MAKE=		make -f Makefile.ssl
15
MAKEDEPEND=	$(TOP)/util/domd $(TOP)
16 17
MAKEFILE=	Makefile.ssl
AR=		ar r
U
Ulf Möller 已提交
18
RANLIB=		ranlib
19 20
DES_ENC=	des_enc.o fcrypt_b.o
# or use
21
#DES_ENC=	dx86-elf.o yx86-elf.o
22 23 24

CFLAGS= $(INCLUDES) $(CFLAG)

25
GENERAL=Makefile
26 27 28 29
TEST=destest.c
APPS=

LIB=$(TOP)/libcrypto.a
30 31 32
LIBSRC=	cbc_cksm.c cbc_enc.c  cfb64enc.c cfb_enc.c  \
	ecb3_enc.c ecb_enc.c  enc_read.c enc_writ.c \
	fcrypt.c ofb64enc.c ofb_enc.c  pcbc_enc.c \
33 34 35
	qud_cksm.c rand_key.c read_pwd.c rpc_enc.c  set_key.c  \
	des_enc.c fcrypt_b.c read2pwd.c \
	fcrypt.c xcbc_enc.c \
B
Ben Laurie 已提交
36
	str2key.c  cfb64ede.c ofb64ede.c supp.c ede_cbcm_enc.c
37

38
LIBOBJ= set_key.o  ecb_enc.o  cbc_enc.o \
39
	ecb3_enc.o cfb64enc.o cfb64ede.o cfb_enc.o  ofb64ede.o \
40
	enc_read.o enc_writ.o ofb64enc.o \
41 42
	ofb_enc.o  str2key.o  pcbc_enc.o qud_cksm.o rand_key.o \
	${DES_ENC} read2pwd.o \
B
Ben Laurie 已提交
43 44
	fcrypt.o xcbc_enc.o read_pwd.o rpc_enc.o  cbc_cksm.o supp.o \
	ede_cbcm_enc.o
45 46 47 48 49 50 51 52 53 54 55

SRC= $(LIBSRC)

EXHEADER= des.h
HEADER=	des_locl.h rpc_des.h podd.h sk.h spr.h des_ver.h $(EXHEADER)

ALL=    $(GENERAL) $(SRC) $(HEADER)

top:
	(cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)

56
all:	lib des
57 58 59

lib:	$(LIBOBJ)
	$(AR) $(LIB) $(LIBOBJ)
60
	$(RANLIB) $(LIB)
61 62
	@touch lib

U
Ulf Möller 已提交
63 64 65
des: des.o cbc3_enc.o lib
	$(CC) $(CFLAGS) -o des des.o cbc3_enc.o $(LIB)

66
# elf
67
asm/dx86-elf.o: asm/dx86unix.cpp
68 69
	$(CPP) -DELF asm/dx86unix.cpp | as -o asm/dx86-elf.o

70 71
asm/yx86-elf.o: asm/yx86unix.cpp
	$(CPP) -DELF asm/yx86unix.cpp | as -o asm/yx86-elf.o
72 73

# solaris
74
asm/dx86-sol.o: asm/dx86unix.cpp
75 76 77 78
	$(CC) -E -DSOL asm/dx86unix.cpp | sed 's/^#.*//' > asm/dx86-sol.s
	as -o asm/dx86-sol.o asm/dx86-sol.s
	rm -f asm/dx86-sol.s

79 80 81 82
asm/yx86-sol.o: asm/yx86unix.cpp
	$(CC) -E -DSOL asm/yx86unix.cpp | sed 's/^#.*//' > asm/yx86-sol.s
	as -o asm/yx86-sol.o asm/yx86-sol.s
	rm -f asm/yx86-sol.s
83 84

# a.out
85
asm/dx86-out.o: asm/dx86unix.cpp
86 87
	$(CPP) -DOUT asm/dx86unix.cpp | as -o asm/dx86-out.o

88 89
asm/yx86-out.o: asm/yx86unix.cpp
	$(CPP) -DOUT asm/yx86unix.cpp | as -o asm/yx86-out.o
90 91

# bsdi
92
asm/dx86bsdi.o: asm/dx86unix.cpp
93
	$(CPP) -DBSDI asm/dx86unix.cpp | sed 's/ :/:/' | as -o asm/dx86bsdi.o
94

95
asm/yx86bsdi.o: asm/yx86unix.cpp
96
	$(CPP) -DBSDI asm/yx86unix.cpp | sed 's/ :/:/' | as -o asm/yx86bsdi.o
97

B
Ben Laurie 已提交
98
asm/dx86unix.cpp: asm/des-586.pl
99
	(cd asm; $(PERL) des-586.pl cpp >dx86unix.cpp)
100

B
Ben Laurie 已提交
101
asm/yx86unix.cpp: asm/crypt586.pl
102
	(cd asm; $(PERL) crypt586.pl cpp >yx86unix.cpp)
103 104

files:
105
	$(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
106 107

links:
108 109
	@$(TOP)/util/point.sh Makefile.ssl Makefile
	@$(TOP)/util/point.sh ../../perlasm asm/perlasm
110 111 112
	@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
	@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
	@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
113 114 115 116 117 118

install: installs

installs:
	@for i in $(EXHEADER) ; \
	do  \
119 120
	(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
	chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
121 122 123 124 125 126 127 128 129 130 131
	done;

tags:
	ctags $(SRC)

tests:

lint:
	lint -DLINT $(INCLUDES) $(SRC)>fluff

depend:
132
	$(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC)
133 134

dclean:
135
	$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
136 137 138
	mv -f Makefile.new $(MAKEFILE)

clean:
U
Ulf Möller 已提交
139
	rm -f asm/dx86unix.cpp asm/yx86unix.cpp *.o asm/*.o *.obj des lib tags core .pure .nfs* *.old *.bak fluff
140 141

# DO NOT DELETE THIS LINE -- make depend depends on it.
B
Ben Laurie 已提交
142

B
Bodo Möller 已提交
143
cbc_cksm.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
B
Ben Laurie 已提交
144
cbc_cksm.o: ../../include/openssl/opensslconf.h des_locl.h
B
Bodo Möller 已提交
145
cbc_enc.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
B
Bodo Möller 已提交
146
cbc_enc.o: ../../include/openssl/opensslconf.h des_locl.h ncbc_enc.c
B
Bodo Möller 已提交
147
cfb64ede.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
B
Ben Laurie 已提交
148
cfb64ede.o: ../../include/openssl/opensslconf.h des_locl.h
B
Bodo Möller 已提交
149
cfb64enc.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
B
Ben Laurie 已提交
150
cfb64enc.o: ../../include/openssl/opensslconf.h des_locl.h
B
Bodo Möller 已提交
151
cfb_enc.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
B
Ben Laurie 已提交
152
cfb_enc.o: ../../include/openssl/opensslconf.h des_locl.h
B
Bodo Möller 已提交
153
des_enc.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
B
Bodo Möller 已提交
154
des_enc.o: ../../include/openssl/opensslconf.h des_locl.h des_locl.h ncbc_enc.c
B
Bodo Möller 已提交
155
ecb3_enc.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
B
Ben Laurie 已提交
156
ecb3_enc.o: ../../include/openssl/opensslconf.h des_locl.h
B
Bodo Möller 已提交
157
ecb_enc.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
B
Ben Laurie 已提交
158 159
ecb_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
ecb_enc.o: des_locl.h spr.h
B
Bodo Möller 已提交
160
ede_cbcm_enc.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
B
Ben Laurie 已提交
161
ede_cbcm_enc.o: ../../include/openssl/opensslconf.h des_locl.h
B
Bodo Möller 已提交
162 163
enc_read.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
enc_read.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
164 165
enc_read.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
enc_read.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h
B
Bodo Möller 已提交
166
enc_read.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h
167
enc_read.o: ../cryptlib.h des_locl.h
B
Bodo Möller 已提交
168 169
enc_writ.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
enc_writ.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
170 171
enc_writ.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
enc_writ.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h
172 173
enc_writ.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h
enc_writ.o: ../../include/openssl/stack.h ../cryptlib.h des_locl.h
B
Bodo Möller 已提交
174
fcrypt.o: ../../include/openssl/des.h ../../include/openssl/des.h
B
Bodo Möller 已提交
175
fcrypt.o: ../../include/openssl/e_os2.h ../../include/openssl/e_os2.h
B
Bodo Möller 已提交
176 177
fcrypt.o: ../../include/openssl/opensslconf.h
fcrypt.o: ../../include/openssl/opensslconf.h des_locl.h des_locl.h
B
Bodo Möller 已提交
178
fcrypt_b.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
B
Ben Laurie 已提交
179
fcrypt_b.o: ../../include/openssl/opensslconf.h des_locl.h
B
Bodo Möller 已提交
180
ofb64ede.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
B
Ben Laurie 已提交
181
ofb64ede.o: ../../include/openssl/opensslconf.h des_locl.h
B
Bodo Möller 已提交
182
ofb64enc.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
B
Ben Laurie 已提交
183
ofb64enc.o: ../../include/openssl/opensslconf.h des_locl.h
B
Bodo Möller 已提交
184
ofb_enc.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
B
Ben Laurie 已提交
185
ofb_enc.o: ../../include/openssl/opensslconf.h des_locl.h
B
Bodo Möller 已提交
186
pcbc_enc.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
B
Ben Laurie 已提交
187
pcbc_enc.o: ../../include/openssl/opensslconf.h des_locl.h
B
Bodo Möller 已提交
188
qud_cksm.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
B
Ben Laurie 已提交
189
qud_cksm.o: ../../include/openssl/opensslconf.h des_locl.h
B
Bodo Möller 已提交
190
rand_key.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
B
Ben Laurie 已提交
191
rand_key.o: ../../include/openssl/opensslconf.h des_locl.h
B
Bodo Möller 已提交
192
read2pwd.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
B
Ben Laurie 已提交
193
read2pwd.o: ../../include/openssl/opensslconf.h des_locl.h
B
Bodo Möller 已提交
194 195
read_pwd.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
read_pwd.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
196 197
read_pwd.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
read_pwd.o: ../../include/openssl/err.h ../../include/openssl/opensslconf.h
B
Bodo Möller 已提交
198
read_pwd.o: ../../include/openssl/opensslv.h ../../include/openssl/stack.h
199
read_pwd.o: ../cryptlib.h des_locl.h
B
Bodo Möller 已提交
200
rpc_enc.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
B
Ben Laurie 已提交
201
rpc_enc.o: ../../include/openssl/opensslconf.h des_locl.h des_ver.h rpc_des.h
B
Bodo Möller 已提交
202
set_key.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
B
Ben Laurie 已提交
203
set_key.o: ../../include/openssl/opensslconf.h des_locl.h podd.h sk.h
B
Bodo Möller 已提交
204
str2key.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
B
Ben Laurie 已提交
205
str2key.o: ../../include/openssl/opensslconf.h des_locl.h
B
Bodo Möller 已提交
206
supp.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
B
Ben Laurie 已提交
207
supp.o: ../../include/openssl/opensslconf.h des_locl.h
B
Bodo Möller 已提交
208
xcbc_enc.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
B
Ben Laurie 已提交
209
xcbc_enc.o: ../../include/openssl/opensslconf.h des_locl.h