Makefile.am.in 2.81 KB
Newer Older
1
## Process this file with make_am to produce Makefile.am
Niels Möller's avatar
Niels Möller committed
2
SUBDIRS: include
3
CVS_HEADERS: cvs_headers
4
5
6
7
8
BODY:

AUTOMAKE_OPTIONS = foreign

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

Niels Möller's avatar
Niels Möller committed
11
12
13
Makefile.am: Makefile.am.in
	(cd $(top_srcdir); $(BASH) make_am)

14
15
16
# 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
17
18
LDADD = libsymmetric.a
desdata_LDADD =
19
20
21
22
23
24
25

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
26
      sha.c md5.c idea.c arcfour.c cast.c blowfish.c
27
28
29
30
31

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

32
33
desUtil.o: desUtil.c $(des_headers)

34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# 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)' 
59

60
EXTRA_DIST = $(cvs_headers) Makefile.am.in descore.README
61
62
63
64
65
66

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

67
68
# .deps/%.P : %.c
# 	$(CC) $(CPPFLAGS) $(DEFS) -M -MG $< > $@
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94

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