Makefile.am.in 4.86 KB
Newer Older
1
## Process this file with make_am to produce Makefile.am -*-makefile-*-
Niels Möller's avatar
Niels Möller committed
2
SUBDIRS: symmetric
3
CVS_HEADERS: cvs_headers
4
CLASS_FILES: dist_x_files
5
BODY:
Niels Möller's avatar
Niels Möller committed
6
7

AUTOMAKE_OPTIONS = foreign
8
9
10

# To remake all Makefile.am-files, run
#
Niels Möller's avatar
Niels Möller committed
11
# 	./make_am
12
#
Niels Möller's avatar
Niels Möller committed
13
14
15
16
17
# You should run ./make_am --rethink after recompiling, but before
# making a dist, as it uses dependency information to figure out which
# header files should be included in th dist. How to tell this to
# make? FIXME: These rules won't remake Makefile.am files in
# subdrectries.
Niels Möller's avatar
Niels Möller committed
18

Niels Möller's avatar
Niels Möller committed
19
# FIXME: Use the BASH variable to execute the script. The problem is
Niels Möller's avatar
Niels Möller committed
20
# that the script attempts to start itself with "$0 args".
Niels Möller's avatar
Niels Möller committed
21

Niels Möller's avatar
Niels Möller committed
22
Makefile.am: Makefile.am.in
Niels Möller's avatar
Niels Möller committed
23
	(cd $(top_srcdir) && $(MAKE) src/Makefile.am)
Niels Möller's avatar
Niels Möller committed
24

Niels Möller's avatar
Niels Möller committed
25
26
bin_PROGRAMS = lsh lsh_keygen lsh_writekey
sbin_PROGRAMS = lshd
Niels Möller's avatar
Niels Möller committed
27
noinst_PROGRAMS = prime_table digit_table sexp_test
Niels Möller's avatar
Niels Möller committed
28
noinst_LIBRARIES = liblsh.a
Niels Möller's avatar
Niels Möller committed
29
# noinst_HEADERS = $(dist_x_files) $(cvs_headers)
Niels Möller's avatar
Niels Möller committed
30
31
32
33

# Don't use BUILT_SOURCES, as all these files are #included, and can't be
# compiled or dependency checked independently.

Niels Möller's avatar
Niels Möller committed
34
generated_sources = atoms_defines.h atoms_gperf.c atoms_table.c \
35
	prime_table.h sexp_table.h digit_table.h packet_types.h
Niels Möller's avatar
Niels Möller committed
36

Niels Möller's avatar
Niels Möller committed
37
liblsh_a_SOURCES = abstract_io.c abstract_crypto.c abstract_compress.c \
Niels Möller's avatar
Niels Möller committed
38
	algorithms.c alist.c arcfour.c atoms.c \
39
	bignum.c blocking_write.c blowfish.c \
40
	cascade.c cast.c cbc.c channel.c channel_commands.c charset.c \
Niels Möller's avatar
Niels Möller committed
41
42
	client.c client_keyexchange.c client_password.c client_pty.c \
	client_userauth.c \
43
	combinators.c command.c compress.c connection.c connection_commands.c \
44
	debug.c des.c disconnect.c dsa.c dsa_keygen.c encrypt.c \
45
	format.c gc.c hmac.c idea.c io.c io_commands.c keyexchange.c \
Niels Möller's avatar
Niels Möller committed
46
47
	list.c md5.c \
	packet_ignore.c pad.c parse.c password.c publickey_crypto.c \
Niels Möller's avatar
Niels Möller committed
48
	queue.c \
Niels Möller's avatar
Niels Möller committed
49
	randomness.c \
50
51
	read_scan.c read_data.c read_line.c read_packet.c reaper.c resource.c \
	server.c server_keyexchange.c server_password.c \
Niels Möller's avatar
Niels Möller committed
52
	server_pty.c server_session.c server_userauth.c \
Niels Möller's avatar
Niels Möller committed
53
	sexp.c sexp_parser.c sexp_streamed_parser.c \
Niels Möller's avatar
Niels Möller committed
54
	sha.c service.c ssh1_fallback.c \
Niels Möller's avatar
Niels Möller committed
55
	string_buffer.c tcpforward.c tcpforward_commands.c \
J.H.M. Dassen's avatar
J.H.M. Dassen committed
56
	translate_signal.c tty.c twofish.c unpad.c userauth.c \
Niels Möller's avatar
Niels Möller committed
57
	werror.c write_buffer.c xalloc.c zlib.c
Niels Möller's avatar
Niels Möller committed
58
59

atoms_defines.h: atoms.in process_atoms
60
	$(BASH) $(srcdir)/process_atoms header <$(srcdir)/atoms.in >$@T
Niels Möller's avatar
Niels Möller committed
61
	test -s $@T && mv -f $@T $@
Niels Möller's avatar
Niels Möller committed
62

Niels Möller's avatar
Niels Möller committed
63
atoms_gperf.c: atoms.in process_atoms
Niels Möller's avatar
Niels Möller committed
64
	$(BASH) $(srcdir)/process_atoms gperf <$(srcdir)/atoms.in \
65
             | gperf >$@T -LANSI-C -t -c -l -k1,7,$$ -N gperf_atom 
Niels Möller's avatar
Niels Möller committed
66
	test -s $@T && mv -f $@T $@
Niels Möller's avatar
Niels Möller committed
67
68

atoms_table.c: atoms.in process_atoms
69
	$(BASH) $(srcdir)/process_atoms table <$(srcdir)/atoms.in >$@T
Niels Möller's avatar
Niels Möller committed
70
	test -s $@T && mv -f $@T $@
Niels Möller's avatar
Niels Möller committed
71

Niels Möller's avatar
Niels Möller committed
72
73
74
PRIME_LIMIT = 1024

prime_table.h: prime_table
75
	./prime_table $(PRIME_LIMIT) >$@T
Niels Möller's avatar
Niels Möller committed
76
	test -s $@T && mv -f $@T $@
Niels Möller's avatar
Niels Möller committed
77

Niels Möller's avatar
Niels Möller committed
78
79
prime_table_LDADD =

Niels Möller's avatar
Niels Möller committed
80
sexp_table.h: sexp_chars.in $(srcdir)/make_char_classes
Niels Möller's avatar
Niels Möller committed
81
82
	$(SCHEME) -e main -s $(srcdir)/make_char_classes <$< >$@T
	test -s $@T && mv -f $@T $@
Niels Möller's avatar
Niels Möller committed
83

Niels Möller's avatar
Niels Möller committed
84
85
digit_table_LDADD =

86
87
digit_table.h: digit_table
	./digit_table >$@T
Niels Möller's avatar
Niels Möller committed
88
	test -s $@T && mv -f $@T $@
Niels Möller's avatar
Niels Möller committed
89

90
91
92
93
94
95
96
packet_types.h: ssh.h invert-defs
	$(srcdir)/invert-defs <ssh.h >$@T
	test -s $@T && mv -f $@T $@

# typedescr.h: ssh.h $(top_srcdir)/misc/mk-reverse-table
# 	  $(PERL) $(top_srcdir)/misc/mk-reverse-table ssh.h >$@T
# 	  if test -s $@T ; then mv -f $@T $@ ; else touch $@ ; fi
Niels Möller's avatar
Niels Möller committed
97

Niels Möller's avatar
Niels Möller committed
98
LDADD = @LIBOBJS@ liblsh.a symmetric/libsymmetric.a 
99
100

# Is this rule needed?
Niels Möller's avatar
Niels Möller committed
101
# all-recursive check-recursive: config.h
102

Niels Möller's avatar
Niels Möller committed
103
104
105
# lsh_LDADD = @LIBOBJS@ liblsh.a lib/libsymmetric.a 
# lshd_LDADD = @LIBOBJS@ liblsh.a lib/libsymmetric.a 
# lsh_keygen_LDADD = @LIBOBJS@ liblsh.a lib/libsymmetric.a 
Niels Möller's avatar
Niels Möller committed
106

107
108
109
110
111
112
113
114
# lsh_DEPENDENCIES = @LIBOBJS@ symmetric liblsh.a
# lshd_DEPENDENCIES = @LIBOBJS@ symmetric liblsh.a
# lsh_keygen_DEPENDENCIES = @LIBOBJS@ symmetric liblsh.a
# lsh_writekey_DEPENDENCIES = @LIBOBJS@ symmetric liblsh.a
# 
# .PHONY: symmetric
# symmetric:
# 	  (cd lib && $(MAKE) libsymmetric.a)
115

116
117
EXTRA_DIST = atoms.in process_atoms make_class compiler.scm \
	invert-defs \
Niels Möller's avatar
Niels Möller committed
118
	$(generated_sources) \
119
	make_char_classes sexp_chars.in \
120
	getopt.h getopt.c getopt1.c \
121
	jpoll.h jpoll.c \
Niels Möller's avatar
Niels Möller committed
122
	$(cvs_headers) $(dist_x_files) Makefile.am.in 
Niels Möller's avatar
Niels Möller committed
123

124
CLEANFILES = *.hT *.cT *.xT
125
126
MAINTAINERCLEANFILES += $(dist_x_files)

Niels Möller's avatar
Niels Möller committed
127
128
# Class files
# SUFFIXES = .xh .xc
129
130
131
132
133
134
 
.PHONY: depend
depend:
	rm -f $(DEP_FILES)
	make $(DEP_FILES)

135
136
137
# There are three problems with this rule:

# 1. It causes the dependency files to be created twice. It would be
Niels Möller's avatar
Niels Möller committed
138
# better to add .deps/%.P as an extra target to compilation rule.
139
140
141
142
143
144
145
146
147
# I.e, %.o .deps/%.P : %.c

# 2. It should not depend on the .c.x file.

# 3. It requires GNU-make. We'll have to figure out how to include
# some rules only in developer mode.

# .deps/%.P : %.c %.c.x
# 	  $(CC) $(CPPFLAGS) $(DEFS) -M -MG $< > $@
148
149
150

MAINTAINERCLEANFILES += $(DEP_FILES)

Niels Möller's avatar
Niels Möller committed
151
152
# This is GNU make specific

153
%.x: % $(srcdir)/make_class $(srcdir)/compiler.scm
154
155
	$(SCHEME) -e main -l $(srcdir)/compiler.scm \
		  -s $(srcdir)/make_class <$< >$@T
Niels Möller's avatar
Niels Möller committed
156
	test -s $@T && mv -f $@T $@
Niels Möller's avatar
Niels Möller committed
157

Niels Möller's avatar
Niels Möller committed
158
include $(top_srcdir)/misc/ctags.mk