11 INSTALL_DATA
= @INSTALL_DATA@
12 INSTALL_PROGRAM
= @INSTALL_PROGRAM@
13 INSTALL_SCRIPT
= @INSTALL_SCRIPT@
14 INSTALL_STRIP_PROGRAM
= $(INSTALL_PROGRAM
) -s
17 OPT_ASM_SOURCES
= @OPT_ASM_SOURCES@
19 SUBDIRS
= tools testsuite examples
24 # FIXME: Add configuration of LIBEXT?
25 LIBTARGETS
= @IF_STATIC@ libnettle.a @IF_HOGWEED@ libhogweed.a
26 SHLIBTARGETS
= @IF_SHARED@
$(LIBNETTLE_FORLINK
) @IF_HOGWEED@
$(LIBHOGWEED_FORLINK
)
28 getopt_SOURCES
= getopt.c getopt1.c
29 getopt_TARGETS
= $(getopt_SOURCES
:.c
=.
$(OBJEXT
))
31 internal_SOURCES
= nettle-internal.c
32 internal_TARGETS
= $(internal_SOURCES
:.c
=.
$(OBJEXT
))
34 TARGETS
= aesdata
$(EXEEXT_FOR_BUILD
) desdata
$(EXEEXT_FOR_BUILD
) \
35 twofishdata
$(EXEEXT_FOR_BUILD
) shadata
$(EXEEXT_FOR_BUILD
) \
36 gcmdata
$(EXEEXT_FOR_BUILD
) \
37 $(getopt_TARGETS
) $(internal_TARGETS
) \
38 $(LIBTARGETS
) $(SHLIBTARGETS
)
39 IMPLICIT_TARGETS
= @IF_DLL@
$(LIBNETTLE_FILE
) $(LIBHOGWEED_FILE
)
41 DOCTARGETS
= @IF_DOCUMENTATION@ nettle.
info nettle.html nettle.pdf
43 PKGCONFIG_FILES
= nettle.
pc @IF_HOGWEED@ hogweed.
pc
44 pkgconfigdir
= $(libdir)/pkgconfig
46 all check install uninstall:
48 set
-e
; for d in
$(SUBDIRS
); do \
49 echo
"Making $@ in $$d" ; (cd
$$d && $(MAKE
) $@
); done
51 clean distclean mostlyclean maintainer-clean
tags:
52 set
-e
; for d in
$(SUBDIRS
); do \
53 echo
"Making $@ in $$d" ; (cd
$$d && $(MAKE
) $@
); done
59 # FIXME: Remove. These targets aren't supported, but they are expected by the
60 # automake generated Makefiles in the lsh build.
61 dvi installcheck uninstallcheck
:
64 all-here
: $(TARGETS
) $(DOCTARGETS
)
66 nettle_SOURCES
= aes-decrypt-internal.c aes-decrypt.c \
67 aes-encrypt-internal.c aes-encrypt.c aes-encrypt-table.c \
68 aes-set-encrypt-key.c aes-set-decrypt-key.c aes-meta.c \
69 arcfour.c arcfour-crypt.c arcfour-meta.c \
70 arctwo.c arctwo-meta.c gosthash94-meta.c \
71 base16-encode.c base16-decode.c base16-meta.c \
72 base64-encode.c base64-decode.c base64-meta.c \
73 camellia-crypt.c camellia-crypt-internal.c \
74 camellia-set-encrypt-key.c camellia-set-decrypt-key.c \
75 camellia-table.c camellia-meta.c \
76 cast128.c cast128-meta.c \
78 cbc.c ctr.c gcm.c gcm-aes.c \
81 hmac.c hmac-md5.c hmac-ripemd160.c hmac-sha1.c \
82 hmac-sha224.c hmac-sha256.c hmac-sha384.c hmac-sha512.c \
83 pbkdf2.c pbkdf2-hmac-sha1.c pbkdf2-hmac-sha256.c \
85 md2.c md2-meta.c md4.c md4-meta.c \
86 md5.c md5-compress.c md5-compat.c md5-meta.c \
88 ripemd160.c ripemd160-compress.c ripemd160-meta.c \
89 salsa20-core-internal.c \
90 salsa20-crypt.c salsa20r12-crypt.c salsa20-set-key.c \
91 sha1.c sha1-compress.c sha1-meta.c \
92 sha256.c sha256-compress.c sha224-meta.c sha256-meta.c \
93 sha512.c sha512-compress.c sha384-meta.c sha512-meta.c \
94 sha3.c sha3-permute.c \
95 sha3-224.c sha3-224-meta.c sha3-256.c sha3-256-meta.c \
96 sha3-384.c sha3-384-meta.c sha3-512.c sha3-512-meta.c\
97 serpent-set-key.c serpent-encrypt.c serpent-decrypt.c \
99 twofish.c twofish-meta.c \
100 umac-nh.c umac-nh-n.c umac-l2.c umac-l3.c \
101 umac-poly64.c umac-poly128.c umac-set-key.c \
102 umac32.c umac64.c umac96.c umac128.c \
103 yarrow256.c yarrow_key_event.c \
104 buffer.c buffer-init.c realloc.c \
105 nettle-meta-hashes.c nettle-meta-ciphers.c \
106 nettle-meta-armors.c \
107 write-be32.c write-le32.c write-le64.c
109 hogweed_SOURCES
= sexp.c sexp-format.c \
110 sexp-transport.c sexp-transport-format.c \
111 bignum.c bignum-next-prime.c \
112 bignum-random.c bignum-random-prime.c \
114 pkcs1.c pkcs1-encrypt.c pkcs1-decrypt.c \
115 pkcs1-rsa-digest.c pkcs1-rsa-md5.c pkcs1-rsa-sha1.c \
116 pkcs1-rsa-sha256.c pkcs1-rsa-sha512.c \
117 rsa.c rsa-sign.c rsa-verify.c \
118 rsa-pkcs1-sign.c rsa-pkcs1-sign-tr.c rsa-pkcs1-verify.c \
119 rsa-md5-sign.c rsa-md5-verify.c \
120 rsa-sha1-sign.c rsa-sha1-verify.c \
121 rsa-sha256-sign.c rsa-sha256-verify.c \
122 rsa-sha512-sign.c rsa-sha512-verify.c \
123 rsa-encrypt.c rsa-decrypt.c rsa-decrypt-tr.c \
124 rsa-keygen.c rsa-compat.c rsa-blind.c \
125 rsa2sexp.c sexp2rsa.c \
126 dsa.c dsa-sign.c dsa-verify.c dsa-keygen.c \
127 dsa-sha1-sign.c dsa-sha1-verify.c \
128 dsa-sha256-sign.c dsa-sha256-verify.c \
129 dsa2sexp.c sexp2dsa.c \
130 pgp-encode.c rsa2openpgp.c \
131 der-iterator.c der2rsa.c der2dsa.c \
132 sec-add-1.c sec-sub-1.c sec-modinv.c sec-tabselect.c \
133 gmp-glue.c cnd-copy.c \
134 ecc-mod.c ecc-generic-modp.c ecc-generic-modq.c \
135 ecc-modp.c ecc-modq.c ecc-generic-redc.c \
136 ecc-192.c ecc-224.c ecc-256.c ecc-384.c ecc-521.c \
137 ecc-size.c ecc-j-to-a.c ecc-a-to-j.c \
138 ecc-dup-jj.c ecc-add-jja.c ecc-add-jjj.c \
139 ecc-mul-g.c ecc-mul-a.c ecc-hash.c ecc-random.c \
140 ecc-point.c ecc-scalar.c ecc-point-mul.c ecc-point-mul-g.c \
141 ecc-ecdsa-sign.c ecdsa-sign.c \
142 ecc-ecdsa-verify.c ecdsa-verify.c ecdsa-keygen.c
144 HEADERS
= aes.h arcfour.h arctwo.h asn1.h bignum.h blowfish.h \
145 base16.h base64.h buffer.h camellia.h cast128.h \
147 des.h des-compat.h dsa.h ecc-curve.h ecc.h ecdsa.h \
148 gcm.h gosthash94.h hmac.h \
154 nettle-meta.h nettle-types.h \
156 pgp.h pkcs1.h realloc.h ripemd160.h rsa.h rsa-compat.h \
158 serpent.h sha.h sha1.h sha2.h sha3.h twofish.h \
161 INSTALL_HEADERS
= $(HEADERS
) nettle-stdint.h
163 SOURCES
= $(nettle_SOURCES
) $(hogweed_SOURCES
) \
164 $(getopt_SOURCES
) $(internal_SOURCES
) \
165 aesdata.c desdata.c twofishdata.c shadata.c gcmdata.c eccdata.c
167 DISTFILES
= $(SOURCES
) $(HEADERS
) getopt.h .bootstrap run-tests \
168 aclocal.m4 configure.ac \
169 configure stamp-h.in \
170 config.guess config.sub install-sh texinfo.
tex \
171 config.h.in config.m4.in config.make.in Makefile.in \
172 README AUTHORS COPYING.LIB INSTALL NEWS TODO ChangeLog \
173 nettle.
pc.in hogweed.
pc.in \
174 memxor.c
$(des_headers
) descore.README \
175 aes-internal.h camellia-internal.h serpent-internal.h \
176 cast128_sboxes.h desinfo.h desCode.h \
177 nettle-internal.h nettle-write.h prime-list.h \
178 gmp-glue.h ecc-internal.h \
179 mini-gmp.h mini-gmp.c asm.m4 \
180 nettle.texinfo nettle.
info nettle.html nettle.pdf sha-example.c
182 # Rules building static libraries
183 nettle_OBJS
= $(nettle_SOURCES
:.c
=.
$(OBJEXT
)) $(LIBOBJS
)
184 nettle_PURE_OBJS
= $(nettle_OBJS
:.
$(OBJEXT
)=.p
$(OBJEXT
))
186 hogweed_OBJS
= $(hogweed_SOURCES
:.c
=.
$(OBJEXT
)) $(OPT_ASM_SOURCES
:.asm
=.
$(OBJEXT
))
187 hogweed_PURE_OBJS
= $(hogweed_OBJS
:.
$(OBJEXT
)=.p
$(OBJEXT
))
189 libnettle.a
: $(nettle_OBJS
)
191 $(AR
) $(ARFLAGS
) $@
$(nettle_OBJS
)
194 libhogweed.a
: $(hogweed_OBJS
)
196 $(AR
) $(ARFLAGS
) $@
$(hogweed_OBJS
)
200 $(COMPILE
) $(CCPIC_MAYBE
) -c
$< \
203 # Rules building shared libraries.
204 $(LIBNETTLE_FORLINK
): $(nettle_PURE_OBJS
)
205 $(LIBNETTLE_LINK
) $(nettle_PURE_OBJS
) -o
$@
$(LIBNETTLE_LIBS
)
206 -mkdir .lib
2>/dev
/null
208 && rm -f
$(LIBNETTLE_FORLINK
) \
209 && $(LN_S
) ..
/$(LIBNETTLE_FORLINK
) $(LIBNETTLE_FORLINK
) \
210 && [ -z
"$(LIBNETTLE_SONAME)" ] \
211 ||
{ rm -f
$(LIBNETTLE_SONAME
) \
212 && $(LN_S
) $(LIBNETTLE_FORLINK
) $(LIBNETTLE_SONAME
) ; } )
214 $(LIBHOGWEED_FORLINK
): $(hogweed_PURE_OBJS
) $(LIBNETTLE_FORLINK
)
215 $(LIBHOGWEED_LINK
) $(hogweed_PURE_OBJS
) -o
$@
$(LIBHOGWEED_LIBS
)
216 -mkdir .lib
2>/dev
/null
218 && rm -f
$(LIBHOGWEED_FORLINK
) \
219 && $(LN_S
) ..
/$(LIBHOGWEED_FORLINK
) $(LIBHOGWEED_FORLINK
) \
220 && [ -z
"$(LIBHOGWEED_SONAME)" ] \
221 ||
{ rm -f
$(LIBHOGWEED_SONAME
) \
222 && $(LN_S
) $(LIBHOGWEED_FORLINK
) $(LIBHOGWEED_SONAME
) ; } )
225 $(COMPILE
) $(SHLIBCFLAGS
) -c
$< -o
$@ \
228 # For Solaris and BSD make, we have to use an explicit rule for each
229 # executable. Avoid object file targets to make it easy to run the
231 aesdata
$(EXEEXT_FOR_BUILD
): aesdata.c
232 $(CC_FOR_BUILD
) `test -f aesdata.c || echo '$(srcdir)/'`aesdata.c \
233 -o aesdata
$(EXEEXT_FOR_BUILD
)
235 desdata
$(EXEEXT_FOR_BUILD
): desdata.c
236 $(CC_FOR_BUILD
) `test -f desdata.c || echo '$(srcdir)/'`desdata.c \
237 -o desdata
$(EXEEXT_FOR_BUILD
)
239 twofishdata
$(EXEEXT_FOR_BUILD
): twofishdata.c
240 $(CC_FOR_BUILD
) `test -f twofishdata.c || echo '$(srcdir)/'`twofishdata.c \
241 -o twofishdata
$(EXEEXT_FOR_BUILD
)
243 shadata
$(EXEEXT_FOR_BUILD
): shadata.c
244 $(CC_FOR_BUILD
) `test -f shadata.c || echo '$(srcdir)/'`shadata.c
-lm \
245 -o shadata
$(EXEEXT_FOR_BUILD
)
247 gcmdata
$(EXEEXT_FOR_BUILD
): gcmdata.c
248 $(CC_FOR_BUILD
) `test -f gcmdata.c || echo '$(srcdir)/'`gcmdata.c \
249 -o gcmdata
$(EXEEXT_FOR_BUILD
)
251 eccdata
$(EXEEXT_FOR_BUILD
): eccdata.c mini-gmp.c mini-gmp.h
252 $(CC_FOR_BUILD
) `test -f eccdata.c || echo '$(srcdir)/'`eccdata.c \
253 -o eccdata
$(EXEEXT_FOR_BUILD
)
256 # It seems using $(srcdir)/ doesn't work with GNU make 3.79.1
257 # des_headers = $(srcdir)/rotors.h $(srcdir)/keymap.h
258 des_headers
= rotors.h keymap.h
260 # Generate DES headers.
261 $(des_headers
): desdata.c
262 $(MAKE
) desdata
$(EXEEXT
)
263 f
="$(srcdir)/`basename $@`"; \
264 .
/desdata
$(EXEEXT
) $(@F
) > $${f}T
; \
265 test -s
$${f}T
&& mv
-f
$${f}T
$$f
267 des.
$(OBJEXT
): des.c des.h
$(des_headers
)
269 # Generate ECC files.
270 # Some possible choices for 192:
271 # k = 15, c = 4, 64 entries, ~3 KB
272 # k = 20, c = 6, 128 entries, ~6 KB
273 # k = 10, c = 6, 256 entries, ~12 KB
274 # k = 7, c = 6, 320 entries, ~15 KB
275 # k = 9, c = 7, 512 entries, ~24 KB
276 ecc-192.h
: eccdata.stamp
277 .
/eccdata
$(EXEEXT_FOR_BUILD
) 192 7 6 $(GMP_NUMB_BITS
) > $@T
&& mv
$@T
$@
278 # Some possible choices for 224:
279 # k = 18, c = 4, 64 entries, ~4 KB
280 # k = 24, c = 6, 128 entries, ~8 KB
281 # k = 12, c = 6, 256 entries, ~16 KB
282 # k = 8, c = 6, 320 entries, ~20 KB
283 # k = 10, c = 7, 512 entries, ~32 KB
284 ecc-224.h
: eccdata.stamp
285 .
/eccdata
$(EXEEXT_FOR_BUILD
) 224 12 6 $(GMP_NUMB_BITS
) > $@T
&& mv
$@T
$@
286 # Some possible choices for 256:
287 # k = 20, c = 4, 64 entries, ~4 KB
288 # k = 27, c = 6, 128 entries, ~8 KB
289 # k = 14, c = 6, 256 entries, ~16 KB
290 # k = 9, c = 6, 320 entries, ~20 KB
291 # k = 12, c = 7, 512 entries, ~32 KB
292 ecc-256.h
: eccdata.stamp
293 .
/eccdata
$(EXEEXT_FOR_BUILD
) 256 14 6 $(GMP_NUMB_BITS
) > $@T
&& mv
$@T
$@
294 # Some possible choices for 384:
295 # k = 31, c = 4, 64 entries, ~6 KB
296 # k = 41, c = 6, 128 entries, ~12 KB
297 # k = 20, c = 6, 256 entries, ~24 KB
298 # k = 14, c = 6, 320 entries, ~30 KB
299 # k = 18, c = 7, 512 entries, ~48 KB
300 ecc-384.h
: eccdata.stamp
301 .
/eccdata
$(EXEEXT_FOR_BUILD
) 384 41 6 $(GMP_NUMB_BITS
) > $@T
&& mv
$@T
$@
302 # Some possible choices for 521:
303 # k = 42, c = 4, 64 entries, ~9 KB
304 # k = 56, c = 6, 128 entries, ~18 KB
305 # k = 28, c = 6, 256 entries, ~35 KB
306 # k = 19, c = 6, 320 entries, ~44 KB
307 # k = 24, c = 7, 512 entries, ~70 KB
308 ecc-521.h
: eccdata.stamp
309 .
/eccdata
$(EXEEXT_FOR_BUILD
) 521 56 6 $(GMP_NUMB_BITS
) > $@T
&& mv
$@T
$@
311 eccdata.stamp
: eccdata.c
312 $(MAKE
) eccdata
$(EXEEXT_FOR_BUILD
)
313 echo stamp
> eccdata.stamp
315 ecc-192.
$(OBJEXT
): ecc-192.h
316 ecc-224.
$(OBJEXT
): ecc-224.h
317 ecc-256.
$(OBJEXT
): ecc-256.h
318 ecc-384.
$(OBJEXT
): ecc-384.h
319 ecc-521.
$(OBJEXT
): ecc-521.h
321 ecc-192.p
$(OBJEXT
): ecc-192.h
322 ecc-224.p
$(OBJEXT
): ecc-224.h
323 ecc-256.p
$(OBJEXT
): ecc-256.h
324 ecc-384.p
$(OBJEXT
): ecc-384.h
325 ecc-521.p
$(OBJEXT
): ecc-521.h
328 $(M4
) $(srcdir)/asm.m4 machine.m4 config.m4
$< >$@T \
329 && test -s
$@T
&& mv
-f
$@T
$@
332 $(COMPILE
) $(CCPIC_MAYBE
) -c
$<
335 $(COMPILE
) $(SHLIBCFLAGS
) -c
$< -o
$@
339 cd
$(srcdir) && $(MAKEINFO
) --output
$@
`basename "$<"`
342 cd
$(srcdir) && $(MAKEINFO
) --html
--no-split \
343 --output
$@T
`basename "$<"` \
344 && test -s
$@T
&& mv
-f
$@T
$@
347 cd
$(srcdir) && texi2dvi -b
`basename "$<"`
350 cd
$(srcdir) && dvips
-Ppdf
-G0
-o
`basename "$<" .dvi`.ps
`basename "$<"`
352 # Avoid rebuilding .dvi and .ps files when the .texinfo source is unchanged.
353 PS2PDFFLAGS
=-dCompatibilityLevel
=1.3 -dMAxSubsetPct
=100 -dSubsetFonts
=true
-dEmbedAllFonts
=true
355 $(MAKE
) `basename "$<" .texinfo`.ps
356 cd
$(srcdir) && ps2pdf
$(PS2PDFFLAGS
) `basename "$<" .texinfo`.ps
358 # Configure-related rules, mostly copied from the autoconf manual. No
359 # $(srcdir) prefixes on the targets, though.
361 configure
: configure.ac aclocal.m4
362 cd
$(srcdir) && $(AUTOCONF
)
364 # autoheader might not change config.h.in, so touch a stamp file.
365 config.h.in
: stamp-h.in
366 stamp-h.in
: configure.ac aclocal.m4
367 cd
$(srcdir) && $(AUTOHEADER
)
368 echo timestamp
> $(srcdir)/stamp-h.in
370 config.status
: configure
371 .
/config.status
--recheck
374 stamp-h
: config.h.in config.status
375 .
/config.status config.h
376 echo timestamp
> stamp-h
378 Makefile
: Makefile.in config.status
381 config.make
: config.make.in config.status
384 config.m4
: config.m4.in config.status
387 nettle.
pc: nettle.
pc.in config.status
390 hogweed.
pc: hogweed.
pc.in config.status
394 install-doc
: @IF_DOCUMENTATION@ install-info
395 install-here
: install-doc install-headers install-static install-pkgconfig \
396 @IF_SHARED@ install-shared-nettle @IF_HOGWEED@ install-shared-hogweed
398 install-static
: $(LIBTARGETS
)
399 $(MKDIR_P
) $(DESTDIR
)$(libdir)
400 for f in
$(LIBTARGETS
); do \
401 $(INSTALL_DATA
) $$f $(DESTDIR
)$(libdir) ; \
405 $(MKDIR_P
) $(DESTDIR
)$(bindir)
406 $(INSTALL_DATA
) $(LIBNETTLE_FORLINK
) $(DESTDIR
)$(bindir)/$(LIBNETTLE_FORLINK
)
408 install-shared-nettle
: $(LIBNETTLE_FORLINK
) @IF_DLL@ install-dll-nettle
409 $(MKDIR_P
) $(DESTDIR
)$(libdir)
410 $(INSTALL_DATA
) $(LIBNETTLE_FILE_SRC
) $(DESTDIR
)$(libdir)/$(LIBNETTLE_FILE
)
411 [ -z
"$(LIBNETTLE_SONAME)" ] \
412 ||
(cd
$(DESTDIR
)$(libdir) \
413 && rm -f
$(LIBNETTLE_SONAME
) $(LIBNETTLE_FORLINK
) \
414 && $(LN_S
) $(LIBNETTLE_FILE
) $(LIBNETTLE_SONAME
) \
415 && $(LN_S
) $(LIBNETTLE_FILE
) $(LIBNETTLE_FORLINK
))
418 $(MKDIR_P
) $(DESTDIR
)$(bindir)
419 $(INSTALL_DATA
) $(LIBHOGWEED_FORLINK
) $(DESTDIR
)$(bindir)/$(LIBHOGWEED_FORLINK
)
421 install-shared-hogweed
: $(LIBHOGWEED_FORLINK
) @IF_DLL@ install-dll-hogweed
422 $(MKDIR_P
) $(DESTDIR
)$(libdir)
423 $(INSTALL_DATA
) $(LIBHOGWEED_FILE_SRC
) $(DESTDIR
)$(libdir)/$(LIBHOGWEED_FILE
)
424 [ -z
"$(LIBHOGWEED_SONAME)" ] \
425 ||
(cd
$(DESTDIR
)$(libdir) \
426 && rm -f
$(LIBHOGWEED_SONAME
) $(LIBHOGWEED_FORLINK
) \
427 && $(LN_S
) $(LIBHOGWEED_FILE
) $(LIBHOGWEED_SONAME
) \
428 && $(LN_S
) $(LIBHOGWEED_FILE
) $(LIBHOGWEED_FORLINK
))
430 # I'd like to use makes VPATH search to locate the files to be
431 # installed. But it seems most make programs don't set $<, $^, $? and
432 # friends for ordinary explicit rules.
434 install-info
: nettle.
info
435 $(MKDIR_P
) $(DESTDIR
)$(infodir)
437 [ -f
$$f ] || f
="$(srcdir)/$$f" ; \
438 $(INSTALL_DATA
) "$$f" $(DESTDIR
)$(infodir) ; \
439 if
(install-info
--version
&& \
440 install-info
--version
2>&1 | sed
1q | grep
-i
-v debian
) >/dev
/null
2>&1; then \
441 install-info
--info-dir
="$(DESTDIR)$(infodir)" "$$f" ; \
444 # NOTE: I'd like to use $^, but that's a GNU extension. $? should be
445 # more portable, and equivalent for phony targets.
446 install-headers
: $(INSTALL_HEADERS
)
447 $(MKDIR_P
) $(DESTDIR
)$(includedir)/nettle
448 for f in
$(INSTALL_HEADERS
) ; do \
449 if
[ -f
"$$f" ] ; then \
450 $(INSTALL_DATA
) "$$f" $(DESTDIR
)$(includedir)/nettle
; \
452 $(INSTALL_DATA
) "$(srcdir)/$$f" $(DESTDIR
)$(includedir)/nettle
; \
455 install-pkgconfig
: $(PKGCONFIG_FILES
)
456 $(MKDIR_P
) $(DESTDIR
)$(pkgconfigdir
)
457 for f in
$(PKGCONFIG_FILES
) ; do \
458 $(INSTALL_DATA
) "$$f" $(DESTDIR
)$(pkgconfigdir
) ; \
462 uninstall-here
: uninstall-info uninstall-headers uninstall-static \
463 uninstall-pkgconfig @IF_SHARED@ uninstall-shared
466 for f in
$(LIBTARGETS
) ; do \
467 rm -f
$(DESTDIR
)$(libdir)/$$f ; \
471 for f in
$(INSTALL_HEADERS
) ; do \
472 rm -f
$(DESTDIR
)$(includedir)/nettle
/$$f ; \
476 if
(install-info
--version
&& \
477 install-info
--version
2>&1 | sed
1q | grep
-i
-v debian
) >/dev
/null
2>&1; then \
478 install-info
--info-dir
="$(DESTDIR)$(infodir)" --remove
"$(DESTDIR)$(infodir)"/nettle.
info ; \
480 -rm -f
$(DESTDIR
)$(infodir)/nettle.
info
482 # FIXME: Leaves the links around
483 uninstall-shared
: uninstall-shared-nettle @IF_HOGWEED@ uninstall-shared-hogweed
485 uninstall-dll-nettle
:
486 rm -f
$(DESTDIR
)$(bindir)/$(LIBNETTLE_FORLINK
)
488 uninstall-shared-nettle
: @IF_DLL@ uninstall-dll-nettle
489 rm -f
$(DESTDIR
)$(libdir)/$(LIBNETTLE_FILE
)
490 [ -z
"$(LIBNETTLE_SONAME)" ] \
491 ||
rm -f
$(LIBNETTLE_SONAME
) $(LIBNETTLE_FORLINK
)
493 uninstall-dll-hogweed
:
494 rm -f
$(DESTDIR
)$(bindir)/$(LIBHOGWEED_FORLINK
)
496 uninstall-shared-hogweed
: @IF_DLL@ uninstall-dll-hogweed
497 rm -f
$(DESTDIR
)$(libdir)/$(LIBHOGWEED_FILE
)
498 [ -z
"$(LIBHOGWEED_SONAME)" ] \
499 ||
rm -f
$(LIBHOGWEED_SONAME
) $(LIBHOGWEED_FORLINK
)
502 for f in
$(PKGCONFIG_FILES
) ; do \
503 rm -f
$(DESTDIR
)$(pkgconfigdir
)/$$f ; \
507 distdir
= $(PACKAGE_NAME
)-$(PACKAGE_VERSION
)
508 top_distdir
= $(distdir
)
510 # NOTE: We should handle both absolute and relative $destdir.
512 distdir
: $(DISTFILES
)
515 set
-e
; for f in
$(DISTFILES
) ; do \
516 if
[ -f
"$$f" ] ; then cp
"$$f" "$(distdir)" ; \
517 else cp
"$(srcdir)/$$f" "$(distdir)" ; \
520 set
-e
; for d in sparc32 sparc64 x86 x86_64 arm arm
/neon arm
/v6
; do \
521 mkdir
"$(distdir)/$$d" ; \
522 find
"$(srcdir)/$$d" -maxdepth
1 '(' -name
'*.asm' -o
-name
'*.m4' ')' \
523 -exec cp
'{}' "$(distdir)/$$d" ';' ; \
525 set
-e
; for d in
$(SUBDIRS
); do \
526 sd
="$(distdir)/$$d" ; \
527 mkdir
"$$sd" && $(MAKE
) -C
$$d distdir
="`cd $$sd && pwd`" $@
; \
531 tar cf
- $(distdir
) | gzip
-c
>$(distdir
).
tar.gz
534 rm_distcheck
= test ! -d distcheck-tmp \
535 ||
{ find distcheck-tmp
-type d
! -perm
-200 -exec chmod u
+w
{} ';' \
536 && rm -fr distcheck-tmp
; };
541 gzip
-d
< $(distdir
).
tar.gz \
542 |
{ cd distcheck-tmp
&& tar xf
- && chmod
-R a-w
$(distdir
) ; }
543 mkdir distcheck-tmp
/build
544 mkdir distcheck-tmp
/install
545 cd distcheck-tmp
/build
&& ..
/$(distdir
)/configure
--prefix="`cd ../install && pwd`"
546 cd distcheck-tmp
/build
&& $(MAKE
)
547 cd distcheck-tmp
/build
&& $(MAKE
) check
548 cd distcheck-tmp
/build
&& $(MAKE
) install
549 cd distcheck-tmp
/build
&& $(MAKE
) uninstall
550 cd distcheck-tmp
&& find
install -type f
-print > leftover-install-files
551 @
test `cat distcheck-tmp/leftover-install-files | wc -l` -le
1 \
552 ||
{ echo
"ERROR: files left after uninstall:" ; \
553 cat distcheck-tmp
/leftover-install-files
; \
555 chmod
-R a-w distcheck-tmp
/install
556 mkdir distcheck-tmp
/destdir
557 destdir
="`cd distcheck-tmp/destdir && pwd`" \
558 && cd distcheck-tmp
/build \
559 && $(MAKE
) install DESTDIR
="$$destdir" \
560 && $(MAKE
) uninstall DESTDIR
="$$destdir"
561 cd distcheck-tmp
&& find destdir
-type f
-print > leftover-destdir-files
562 @
test `cat distcheck-tmp/leftover-destdir-files | wc -l` -le
1 \
563 ||
{ echo
"ERROR: destdir files left after uninstall:" ; \
564 cat distcheck-tmp
/leftover-destdir-files
; \
566 cd distcheck-tmp
/build
&& $(MAKE
) dist
567 cd distcheck-tmp
/build
&& rm *.gz
568 cd distcheck-tmp
/build
&& $(MAKE
) distclean
569 cd distcheck-tmp
&& find build
-type f
-print > leftover-build-files
570 @
test `cat distcheck-tmp/leftover-build-files | wc -l` -eq
0 \
571 ||
{ echo
"ERROR: files left in build directory after distclean:" ; \
572 cat distcheck-tmp
/leftover-build-files
; \
577 -rm -f
$(TARGETS
) $(IMPLICIT_TARGETS
) *.
$(OBJEXT
) *.p
$(OBJEXT
) *.s \
578 ecc-192.h ecc-224.h ecc-256.h ecc-384.h ecc-521.h \
579 eccdata
$(EXEEXT_FOR_BUILD
) eccdata.stamp
582 distclean-here
: clean-here
583 -rm -f config.h stamp-h config.log config.status machine.m4 \
584 config.make config.m4 Makefile nettle-stdint.h \
585 nettle.
pc hogweed.
pc \
588 maintainer-clean-here
:
589 -rm -f
$(DOCTARGETS
) *.
dvi *.ps
592 etags
-o
$(srcdir)/TAGS
$(srcdir)/*.c
$(srcdir)/*.h
594 DEP_FILES
= $(SOURCES
:.c
=.
$(OBJEXT
).d
) $(SOURCES
:.c
=.p
$(OBJEXT
).d
) asm.d
595 @DEP_INCLUDE@
$(DEP_FILES
)