Makefile.am.in 5.49 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
bin_PROGRAMS = lsh lsh_keygen lsh_writekey lsh-decode-key sexp-conv srp-gen
28
sbin_PROGRAMS = lshd lsh_proxy
29
bin_SCRIPTS = lsh-authorize ssh-conv
30
noinst_PROGRAMS = prime_table digit_table pkcs5-test
Niels Möller's avatar
Niels Möller committed
31
noinst_LIBRARIES = liblsh.a
Niels Möller's avatar
Niels Möller committed
32
# noinst_HEADERS = $(dist_x_files) $(cvs_headers)
Niels Möller's avatar
Niels Möller committed
33
34
35
36

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

Niels Möller's avatar
Niels Möller committed
40
liblsh_a_SOURCES = abstract_io.c abstract_crypto.c abstract_compress.c \
Niels Möller's avatar
Niels Möller committed
41
	algorithms.c alist.c arcfour.c atoms.c \
42
	bignum.c blocking_write.c blowfish.c \
43
	cascade.c cast.c cbc.c channel.c channel_commands.c charset.c \
Niels Möller's avatar
Niels Möller committed
44
45
	client.c client_keyexchange.c client_password.c client_pty.c \
	client_userauth.c \
46
	combinators.c command.c compress.c connection.c connection_commands.c \
47
	daemon.c \
48
49
	debug.c des.c digits.c disconnect.c dh_exchange.c \
	dsa.c dsa_keygen.c encrypt.c \
50
	exception.c \
51
52
	format.c gc.c gateway_channel.c \
	hmac.c idea.c interact.c io.c io_commands.c \
53
	keyexchange.c \
54
	list.c lookup_verifier.c md5.c \
55
	packet_ignore.c pad.c parse.c \
56
	pkcs5.c \
57
	proxy.c proxy_agentforward.c proxy_session.c \
58
	proxy_tcpforward.c proxy_userauth.c proxy_x11forward.c \
59
	publickey_crypto.c queue.c \
Niels Möller's avatar
Niels Möller committed
60
	randomness.c \
61
62
	read_base64.c read_data.c read_file.c read_line.c read_packet.c \
	reaper.c resource.c \
63
	rsa.c \
64
65
	server.c server_authorization.c server_keyexchange.c \
	server_password.c server_publickey.c \
Niels Möller's avatar
Niels Möller committed
66
	server_pty.c server_session.c server_userauth.c \
67
	sexp.c sexp_commands.c sexp_parser.c sexp_streamed_parser.c \
68
	sha.c service.c spki.c spki_commands.c srp_exchange.c ssh1_fallback.c \
Niels Möller's avatar
Niels Möller committed
69
	string_buffer.c tcpforward.c tcpforward_commands.c \
70
	translate_signal.c tty.c twofish.c unix_user.c unpad.c userauth.c \
Niels Möller's avatar
Niels Möller committed
71
	werror.c write_buffer.c xalloc.c zlib.c
Niels Möller's avatar
Niels Möller committed
72

73
74
liblsh_a_LIBADD = @LIBOBJS@

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

Niels Möller's avatar
Niels Möller committed
79
# With the next version of gperf, add -F ", 0"
80
GPERF_FLAGS = -LANSI-C -t -c -C -l -k1,3,7,$$ -N gperf_atom 
Niels Möller's avatar
Niels Möller committed
81
atoms_gperf.c: atoms.in process_atoms
Niels Möller's avatar
Niels Möller committed
82
	$(BASH) $(srcdir)/process_atoms gperf <$(srcdir)/atoms.in \
83
             | gperf >$@T $(GPERF_FLAGS)
Niels Möller's avatar
Niels Möller committed
84
	test -s $@T && mv -f $@T $@
Niels Möller's avatar
Niels Möller committed
85
86

atoms_table.c: atoms.in process_atoms
87
	$(BASH) $(srcdir)/process_atoms table <$(srcdir)/atoms.in >$@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

Niels Möller's avatar
Niels Möller committed
90
91
92
PRIME_LIMIT = 1024

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

Niels Möller's avatar
Niels Möller committed
96
97
prime_table_LDADD =

98
99
sexp_table.h: sexp_chars.in $(srcdir)/scm/make-char-classes.scm
	$(SCHEME) -e main -s $(srcdir)/scm/make-char-classes.scm <$< >$@T
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

Niels Möller's avatar
Niels Möller committed
102
103
digit_table_LDADD =

104
105
digit_table.h: digit_table
	./digit_table >$@T
Niels Möller's avatar
Niels Möller committed
106
	test -s $@T && mv -f $@T $@
Niels Möller's avatar
Niels Möller committed
107

108
109
110
111
112
113
114
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
115

116
LDADD = liblsh.a symmetric/libsymmetric.a 
117
118

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

Niels Möller's avatar
Niels Möller committed
121
122
123
# 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
124

125
126
127
128
129
130
131
132
# 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)
133

Niels Möller's avatar
Niels Möller committed
134
EXTRA_DIST = lsh-authorize ssh-conv \
135
	atoms.in process_atoms \
136
	invert-defs \
Niels Möller's avatar
Niels Möller committed
137
	$(generated_sources) \
138
	sexp_chars.in \
139
	getopt.h getopt.c getopt1.c \
140
	jpoll.h jpoll.c \
Niels Möller's avatar
Niels Möller committed
141
	$(cvs_headers) $(dist_x_files) Makefile.am.in 
Niels Möller's avatar
Niels Möller committed
142

143
CLEANFILES = *.hT *.cT *.xT
144
145
MAINTAINERCLEANFILES += $(dist_x_files)

Niels Möller's avatar
Niels Möller committed
146
147
# Class files
# SUFFIXES = .xh .xc
148
149
150
151
152
153
 
.PHONY: depend
depend:
	rm -f $(DEP_FILES)
	make $(DEP_FILES)

154
155
156
# 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
157
# better to add .deps/%.P as an extra target to compilation rule.
158
159
160
161
162
163
164
165
166
# 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 $< > $@
167
168
169

MAINTAINERCLEANFILES += $(DEP_FILES)

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

172
173
%.x: % $(srcdir)/scm/gaba.scm $(srcdir)/scm/compiler.scm
	$(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

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