Makefile.am.in 2.73 KB
Newer Older
1
## Process this file with make_am to produce Makefile.am
2
CVS_HEADERS: cvs_headers
3
4
5
6
7
BODY:

AUTOMAKE_OPTIONS = foreign

noinst_LIBRARIES = libsymmetric.a
Niels Möller's avatar
Niels Möller committed
8
noinst_PROGRAMS = desTest desdata bf_test
9
10
11
12

# When compiling with lsh, this is set to to -DLSH -I/path/to/lsh/include
# INCLUDES = @crypto_cpp_flags@

Niels Möller's avatar
Niels Möller committed
13
14
LDADD = libsymmetric.a
desdata_LDADD =
15
16
17
18
19
20
21

des_headers = parity.h rotors.h keymap.h 
BUILT_SOURCES =	desSmallFips.c desSmallCore.c desQuickFips.c desQuickCore.c \
	$(des_headers)

libsymmetric_a_SOURCES = desCode.h desKerb.c desUtil.c desQuick.c \
      $(BUILT_SOURCES) \
Niels Möller's avatar
Niels Möller committed
22
      sha.c md5.c idea.c arcfour.c cast.c blowfish.c
23
24
25
26
27

# Generate DES headers.
$(des_headers): desdata
	./desdata $@ > $@

28
29
desUtil.o: desUtil.c $(des_headers)

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
# Generate DES sources. Slowest to quickest.
desSmallFips.c:
		@echo > $@ '#include "desCode.h"' 
		@echo >> $@ 'ENCRYPT(DesSmallFipsEncrypt,TEMPSMALL,\
			     LOADFIPS,KEYMAPSMALL,SAVEFIPS)' 
		@echo >> $@ 'DECRYPT(DesSmallFipsDecrypt,TEMPSMALL,\
			     LOADFIPS,KEYMAPSMALL,SAVEFIPS)' 
desSmallCore.c:
		@echo > $@ '#include "desCode.h"' 
		@echo >> $@ 'ENCRYPT(DesSmallCoreEncrypt,TEMPSMALL,\
			     LOADCORE,KEYMAPSMALL,SAVECORE)' 
		@echo >> $@ 'DECRYPT(DesSmallCoreDecrypt,TEMPSMALL,\
			     LOADCORE,KEYMAPSMALL,SAVECORE)' 
desQuickFips.c:
		@echo > $@ '#include "desCode.h"' 
		@echo >> $@ 'ENCRYPT(DesQuickFipsEncrypt,TEMPQUICK,\
			     LOADFIPS,KEYMAPQUICK,SAVEFIPS)' 
		@echo >> $@ 'DECRYPT(DesQuickFipsDecrypt,TEMPQUICK,\
			     LOADFIPS,KEYMAPQUICK,SAVEFIPS)' 
desQuickCore.c:
		@echo > $@ '#include "desCode.h"' 
		@echo >> $@ 'ENCRYPT(DesQuickCoreEncrypt,TEMPQUICK,\
			     LOADCORE,KEYMAPQUICK,SAVECORE)' 
		@echo >> $@ 'DECRYPT(DesQuickCoreDecrypt,TEMPQUICK,\
			     LOADCORE,KEYMAPQUICK,SAVECORE)' 
55

56
EXTRA_DIST = $(cvs_headers) Makefile.am.in descore.README
57
58
59
60
61
62

.PHONY: depend
depend:
	rm -f $(DEP_FILES)
	make $(DEP_FILES)

63
64
# .deps/%.P : %.c
# 	$(CC) $(CPPFLAGS) $(DEFS) -M -MG $< > $@
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

MAINTAINERCLEANFILES += $(DEP_FILES)

.PHONY: ctags-recursive ctags

ctags-recursive:
	list='$(SUBDIRS)'; for subdir in $$list; do \
	  (cd $$subdir && $(MAKE) ctags); \
	done

ctags: ctags-recursive $(HEADERS) $(SOURCES) $(CONFIG_HEADER) $(TAGS_DEPENDENCIES) $(LISP)
	tags=; \
	here=`pwd`; \
	list='$(SUBDIRS)'; for subdir in $$list; do \
	  test -f $$subdir/tags && tags="$$tags $$here/$$subdir/tags"; \
	done; \
	list='$(SOURCES) $(HEADERS)'; \
	unique=`for i in $$list; do echo $$i; done | \
	  awk '    { files[$$0] = 1; } \
	       END { for (i in files) print i; }'`; \
	test -z "$(CTAGS_ARGS)$(CONFIG_HEADER)$$unique$(LISP)$$tags" \
	  || (cd $(srcdir) && ctags -o $$here/tags $(CTAGS_ARGS) $$tags $(CONFIG_HEADER) $$unique $(LISP))

# Override the standard distclean-tags target, as this doesn't support `tags'
distclean-tags:
	-rm -f TAGS ID tags