Makefile.am.in 2.16 KB
Newer Older
1 2 3
## Process this file with make_am to produce Makefile.am
SUBDIRS: lib include
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 11
SUBDIRS = lib include

# To remake all Makefile.am-files, run
#
Niels Möller's avatar
Niels Möller committed
12
# 	./make_am
13 14 15 16
#
# You should run this 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?
Niels Möller's avatar
Niels Möller committed
17

Niels Möller's avatar
Niels Möller committed
18 19 20 21 22 23 24 25 26
Makefile.am: Makefile.am.in
	./make_am

lib/Makefile.am: lib/Makefile.am.in
	./make_am

include/Makefile.am: include/Makefile.am.in
	./make_am

Niels Möller's avatar
Niels Möller committed
27 28 29 30 31 32 33
bin_PROGRAMS = lsh lshd

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

generated_sources = atoms_defines.h atoms_gperf.c atoms_table.c

34 35 36 37
common_sources = abstract_io.c abstract_crypto.c alist.c atoms.c \
	bignum.c channel.c charset.c connection.c crypto.c \
	debug.c disconnect.c encrypt.c format.c gc.c getopt.c io.c keyexchange.c \
	list.c packet_ignore.c pad.c parse.c password.c publickey_crypto.c \
Niels Möller's avatar
Niels Möller committed
38 39
	randomness.c \
	read_data.c read_line.c read_packet.c service.c \
40
	translate_signal.c unpad.c userauth.c \
41
	werror.c write_buffer.c xalloc.c 
Niels Möller's avatar
Niels Möller committed
42 43 44 45 46 47 48 49

lsh_SOURCES = $(common_sources) lsh.c client.c client_keyexchange.c \
	client_password.c client_userauth.c

lshd_SOURCES = $(common_sources) lshd.c reaper.c server.c server_keyexchange.c \
	server_password.c server_userauth.c

atoms_defines.h: atoms.in process_atoms
Niels Möller's avatar
Niels Möller committed
50
	bash $(srcdir)/process_atoms header <$(srcdir)/atoms.in >$@
Niels Möller's avatar
Niels Möller committed
51

Niels Möller's avatar
Niels Möller committed
52 53 54
atoms_gperf.c: atoms.in process_atoms
	bash $(srcdir)/process_atoms gperf <$(srcdir)/atoms.in \
             | gperf -t -c -l -k1,7,$$ -N gperf_atom >$@
Niels Möller's avatar
Niels Möller committed
55 56

atoms_table.c: atoms.in process_atoms
Niels Möller's avatar
Niels Möller committed
57
	bash $(srcdir)/process_atoms table <$(srcdir)/atoms.in >$@
Niels Möller's avatar
Niels Möller committed
58 59 60

LDADD = @LIBOBJS@ lib/libsymmetric.a

61 62 63 64 65 66 67
lsh_DEPENDENCIES = @LIBOBJS@ symmetric
lshd_DEPENDENCIES = @LIBOBJS@ symmetric

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

68
EXTRA_DIST = atoms.in process_atoms $(generated_sources) HACKING \
69
	$(cvs_headers) $(dist_x_files) Makefile.am.in
Niels Möller's avatar
Niels Möller committed
70

Niels Möller's avatar
Niels Möller committed
71 72 73 74 75 76 77 78
# Class files
# SUFFIXES = .xh .xc

# This is GNU make specific

%.x: % $(srcdir)/make_class
	$(srcdir)/make_class <$< >$@