Makefile.am.in 5.37 KB
Newer Older
1
## Process this file with make_am to produce Makefile.am -*-makefile-*-
2
SUBDIRS: argp rsync symmetric scm . testsuite
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

25
26
SCHEME = $(SCHEME_PROGRAM) -l $(srcdir)/scm/$(SCHEME_NAME)-compat.scm

27
28
EXTRA_PROGRAMS = lsh-krb-checkpw

29
bin_PROGRAMS = lsh lshg lsh-keygen lsh-writekey lsh-decode-key lsh-export-key sexp-conv srp-gen @KRB_PROGRAM@
30
sbin_PROGRAMS = lshd lsh_proxy
31
bin_SCRIPTS = lsh-authorize ssh-conv
32
noinst_PROGRAMS = prime_table digit_table pkcs5-test
33
noinst_SCRIPTS = lcp
Niels Möller's avatar
Niels Möller committed
34
noinst_LIBRARIES = liblsh.a
Niels Möller's avatar
Niels Möller committed
35
# noinst_HEADERS = $(dist_x_files) $(cvs_headers)
Niels Möller's avatar
Niels Möller committed
36
37
38
39

# 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
40
generated_sources = atoms_defines.h atoms_gperf.c atoms_table.c \
41
	prime_table.h sexp_table.h digit_table.h packet_types.h
Niels Möller's avatar
Niels Möller committed
42

Niels Möller's avatar
Niels Möller committed
43
44
45
46
47
48
49
50
51
POTENTIAL_X_FILES = $(addsuffix .x,$(wildcard $(srcdir)/*.[ch]))

.PHONY: bootstrap

bootstrap: $(generated_sources)
	# Not all potential .x files can be generated
	-$(MAKE) -k $(POTENTIAL_X_FILES)
	@rm -f $(addsuffix T,$(POTENTIAL_X_FILES))

Niels Möller's avatar
Niels Möller committed
52
liblsh_a_SOURCES = abstract_io.c abstract_crypto.c abstract_compress.c \
Niels Möller's avatar
Niels Möller committed
53
	algorithms.c alist.c arcfour.c atoms.c \
54
	bignum.c blowfish.c \
55
	cascade.c cast.c cbc.c channel.c channel_commands.c charset.c \
56
	client.c client_keyexchange.c \
57
	client_pty.c client_session.c client_userauth.c \
58
	combinators.c command.c compress.c connection.c connection_commands.c \
59
	daemon.c \
60
61
	debug.c des.c digits.c disconnect.c dh_exchange.c \
	dsa.c dsa_keygen.c encrypt.c \
62
	exception.c \
63
64
	format.c gc.c \
	gateway.c gateway_channel.c gateway_commands.c \
65
	handshake.c \
66
	hmac.c idea.c interact.c io.c io_commands.c \
67
	keyexchange.c \
68
	list.c lookup_verifier.c md5.c \
69
	pad.c parse.c \
70
	pkcs5.c \
71
	proxy.c proxy_agentforward.c proxy_session.c \
72
	proxy_tcpforward.c proxy_userauth.c proxy_x11forward.c \
73
	publickey_crypto.c queue.c \
Niels Möller's avatar
Niels Möller committed
74
	randomness.c \
75
76
	read_base64.c read_data.c read_file.c read_line.c read_packet.c \
	reaper.c resource.c \
77
	rijndael.c rsa.c rsa_keygen.c serpent.c \
78
79
	server.c server_authorization.c server_keyexchange.c \
	server_password.c server_publickey.c \
Niels Möller's avatar
Niels Möller committed
80
	server_pty.c server_session.c server_userauth.c \
81
	sexp.c sexp_commands.c sexp_parser.c sexp_streamed_parser.c \
82
	sha.c spki.c spki_commands.c srp_exchange.c ssh1_fallback.c \
Niels Möller's avatar
Niels Möller committed
83
	string_buffer.c tcpforward.c tcpforward_commands.c \
84
	translate_signal.c tty.c twofish.c \
85
86
	unix_interact.c unix_random.c unix_user.c \
	unpad.c userauth.c \
Niels Möller's avatar
Niels Möller committed
87
	werror.c write_buffer.c xalloc.c zlib.c
Niels Möller's avatar
Niels Möller committed
88

89
90
liblsh_a_LIBADD = @LIBOBJS@

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

Niels Möller's avatar
Niels Möller committed
95
# With the next version of gperf, add -F ", 0"
96
97
GPERF_FLAGS = -LANSI-C -t -c -C -l -k1,3,6,10,$$ -N gperf_atom 
atoms_gperf.c: atoms.in process_atoms
Niels Möller's avatar
Niels Möller committed
98
	$(BASH) $(srcdir)/process_atoms gperf <$< \
99
             | gperf >$@T $(GPERF_FLAGS)
Niels Möller's avatar
Niels Möller committed
100
	test -s $@T && mv -f $@T $@
Niels Möller's avatar
Niels Möller committed
101

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

Niels Möller's avatar
Niels Möller committed
106
107
PRIME_LIMIT = 1024

108
prime_table.h: prime_table
109
	./prime_table $(PRIME_LIMIT) >$@T
Niels Möller's avatar
Niels Möller committed
110
	test -s $@T && mv -f $@T $@
Niels Möller's avatar
Niels Möller committed
111

Niels Möller's avatar
Niels Möller committed
112
113
prime_table_LDADD =

114
sexp_table.h: sexp_chars.in $(srcdir)/scm/make-char-classes.scm
115
	$(SCHEME) -e main -s $(srcdir)/scm/make-char-classes.scm <$< >$@T
Niels Möller's avatar
Niels Möller committed
116
	test -s $@T && mv -f $@T $@
Niels Möller's avatar
Niels Möller committed
117

Niels Möller's avatar
Niels Möller committed
118
119
digit_table_LDADD =

120
digit_table.h: digit_table
121
	./digit_table >$@T
Niels Möller's avatar
Niels Möller committed
122
	test -s $@T && mv -f $@T $@
Niels Möller's avatar
Niels Möller committed
123

124
packet_types.h: ssh.h invert-defs
125
	$(srcdir)/invert-defs <ssh.h >$@T
Niels Möller's avatar
Niels Möller committed
126
	test -s $@T && mv -f $@T $@
127

128
129
lsh_krb_checkpw_LDADD=@KRB_LIBS@

130
131
132
# 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
133

134
LDADD = liblsh.a symmetric/libsymmetric.a @LIBARGP@
135
# lshg_LDFLAGS = -Wl,-Map,lshg.map
136
lshg_LDADD = liblsh.a @LIBARGP@
137

138
139
class-map: $(srcdir)/make-class-map $(dist_x_files)
	cat $(dist_x_files) | grep '^CLASS:' \
140
	| sort | awk -f $(srcdir)/make-class-map > $@
141

142
# Is this rule needed?
Niels Möller's avatar
Niels Möller committed
143
# all-recursive check-recursive: config.h
144
145
146
147

# .PHONY: symmetric
# symmetric:
# 	  (cd lib && $(MAKE) libsymmetric.a)
148

149
EXTRA_DIST = lsh-authorize ssh-conv lcp \
150
	atoms.in process_atoms \
151
	invert-defs \
Niels Möller's avatar
Niels Möller committed
152
	$(generated_sources) \
153
	sexp_chars.in \
154
	jpoll.h jpoll.c \
155
	$(cvs_headers) $(dist_x_files) Makefile.am.in
Niels Möller's avatar
Niels Möller committed
156

157
CLEANFILES = *.hT *.cT *.xT
158
159
MAINTAINERCLEANFILES += $(dist_x_files)

Niels Möller's avatar
Niels Möller committed
160
161
# Class files
# SUFFIXES = .xh .xc
162
163
164
165
166
167
168
169
 
.PHONY: depend
depend:
	rm -f $(DEP_FILES)
	make $(DEP_FILES)

MAINTAINERCLEANFILES += $(DEP_FILES)

Niels Möller's avatar
Niels Möller committed
170
171
# This is GNU make specific

172
%.x: % $(srcdir)/scm/gaba.scm $(srcdir)/scm/compiler.scm
173
	$(SCHEME) -e main -l $(srcdir)/scm/compiler.scm \
174
		  -s $(srcdir)/scm/gaba.scm <$< >$@T
Niels Möller's avatar
Niels Möller committed
175
	test -s $@T && mv -f $@T $@
Niels Möller's avatar
Niels Möller committed
176

177
178
179
ETAGS_ARGS = -r '/     (name[ \t]+\([a-zA-Z0-9_]+\)/\1/' \
             -r '/DEFINE[^(]*(\([a-zA-Z0-9_]+\)/\1/'

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