Makefile.am 2.93 KB
Newer Older
1
SUBDIRS = . testsuite examples
Niels Möller's avatar
Niels Möller committed
2

Niels Möller's avatar
Niels Möller committed
3
noinst_PROGRAMS = aesdata desdata shadata
4

5 6
libnettleincludedir = $(includedir)/nettle

Niels Möller's avatar
Niels Möller committed
7
lib_LIBRARIES = libnettle.a
Niels Möller's avatar
Niels Möller committed
8
libnettleinclude_HEADERS = aes.h arcfour.h blowfish.h \
9
			   base64.h buffer.h cast128.h \
10
			   cbc.h \
11
			   des.h des-compat.h \
12
			   hmac.h \
13
			   knuth-lfib.h \
14 15
			   md5.h md5-compat.h \
			   nettle-meta.h rsa.h \
Niels Möller's avatar
Niels Möller committed
16
			   sexp.h \
17 18 19
			   serpent.h sha.h twofish.h \
			   yarrow.h
			   
20 21
libnettle_a_SOURCES = aes.c aes.h aes-internal.h \
		      aes-decrypt-table.c aes-decrypt.c \
22
		      aes-encrypt-table.c aes-encrypt.c \
23
		      aes-set-encrypt-key.c aes-set-decrypt-key.c aes-meta.c \
24 25
		      arcfour.c arcfour.h arcfour-meta.c \
                      base64.c base64-meta.c base64.h \
Niels Möller's avatar
Niels Möller committed
26
		      cast128.c cast128.h cast128_sboxes.h cast128-meta.c \
Niels Möller's avatar
Niels Möller committed
27
		      blowfish.h blowfish.c \
28
		      cbc.c cbc.h \
29 30
		      des.c des.h desinfo.h desCode.h \
		      des3.c des-compat.c des-compat.h \
31 32
		      hmac.c hmac.h hmac-md5.c hmac-sha1.c \
		      knuth-lfib.c knuth-lfib.h \
Niels Möller's avatar
Niels Möller committed
33 34 35 36
		      md5.c md5.h md5-compat.c md5-compat.h md5-meta.c \
		      sha.h sha1.c sha1-meta.c sha256.c sha256-meta.c \
		      serpent.c serpent.h serpent_sboxes.h serpent-meta.c \
		      twofish.c twofish.h twofish-meta.c \
37
		      yarrow.h yarrow256.c yarrow_key_event.c \
38
		      sexp.h sexp.c sexp_format.c \
39
		      bignum.h bignum.c \
40
		      rsa.h rsa.c rsa_md5.c rsa_sha1.c \
41
		      rsa-encrypt.c rsa-decrypt.c \
42
		      rsa-keygen.c rsa-compat.h rsa-compat.c \
43 44
		      rsa2sexp.c sexp2rsa.c \
		      buffer.h buffer.c \
45 46
		      nettle-meta.h \
		      nettle-internal.c nettle-internal.h nettle-openssl.c
Niels Möller's avatar
Niels Möller committed
47

Niels Möller's avatar
Niels Möller committed
48
libnettle_a_LIBADD = @LIBOBJS@
Niels Möller's avatar
Niels Möller committed
49

50 51
shadata_LDADD = -lm

52 53 54 55
info_TEXINFOS = nettle.texinfo

all-local: nettle.html

56
EXTRA_DIST = macros.h memxor.h $(des_headers) descore.README nettle.html \
57 58 59
	.bootstrap $(des_headers) \
	sparc/aes.asm sparc/machine.m4 \
	x86/aes.asm x86/aes_tables.asm
60

61 62
DISTCLEANFILES = aes.asm aes-decrypt.asm aes-encrypt.asm machine.m4

63 64 65 66 67 68
# Using assembler files. Should get precedence before the .c.o rule.
SUFFIXES = .asm

# can be overridden during development, eg. "make RM_TMP=: aes.o"
RM_TMP = rm -f

69
# FIXME: How to write this without using GNU make features?
70 71
# NOTE: We create an empty .deps-file, to make the make/automake
# dependency tracking happier.
72
%.o: %.asm asm.m4 machine.m4 config.m4 
73
	$(M4) $(srcdir)/asm.m4 machine.m4 config.m4 \
74
		`test -f $< || echo '$(srcdir)/'`$< >tmp-$*.s
75 76
	$(COMPILE) -c tmp-$*.s -o $@
	$(RM_TMP) tmp-$*.s
77
	echo >.deps/$*.Po
78

79 80 81 82 83
%.html : %.texinfo
	(cd $(srcdir) \
	 && $(MAKEINFO) --html --no-split --output $@T $(<F) \
	 ; test -s $@T && mv -f $@T $@)

84
# desCore rules
85 86 87
# It seems using $(srcdir)/ doesn't work with GNU make 3.79.1
# des_headers = $(srcdir)/parity.h $(srcdir)/rotors.h $(srcdir)/keymap.h 
des_headers = parity.h rotors.h keymap.h 
88 89

# Generate DES headers.
90 91
$(des_headers): desdata.c
	$(MAKE) desdata
92
	./desdata $(@F) > $@T
93 94 95
	test -s $@T && mv -f $@T $@

des.o: des.c des.h $(des_headers)