annotate Makefile.in @ 759:76fba0856749 ecc

More changes for KEX and ECDH. Set up hash descriptors, make ECC code work, ses.hash and ses.session_id are now buffers (doesn't compile)
author Matt Johnston <matt@ucc.asn.au>
date Fri, 29 Mar 2013 00:28:09 +0800
parents bf9dc2d9c2b1
children ac2158e3e403
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
1 # This Makefile is for Dropbear SSH Server and Client
161
b9d3f725e00b 0.44 release changes
Matt Johnston <matt@ucc.asn.au>
parents: 137
diff changeset
2 # @configure_input@
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
3
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
4 # invocation:
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
5 # make PROGRAMS="dropbear dbclient scp" MULTI=1 STATIC=1 SCPPROGRESS=1
281
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
6 #
82
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
7 # to make a multiple-program statically linked binary "staticdropbearmulti".
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
8 # This example will include dropbear, scp, dropbearkey, dropbearconvert, and
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
9 # dbclient functionality, and includes the progress-bar functionality in scp.
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
10 # Hopefully that seems intuitive.
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
11
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
12 ifndef PROGRAMS
73
0bf5cebe622c Dropbearkey can now print out pubkey portions
Matt Johnston <matt@ucc.asn.au>
parents: 68
diff changeset
13 PROGRAMS=dropbear dbclient dropbearkey dropbearconvert
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
14 endif
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
15
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
16 LTC=libtomcrypt/libtomcrypt.a
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
17 LTM=libtommath/libtommath.a
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
18
585
d194db6f9453 Use system libtomcrypt/libtommath if available. Doesn't currently
Matt Johnston <matt@ucc.asn.au>
parents: 570
diff changeset
19 ifeq (@BUNDLED_LIBTOM@, 1)
d194db6f9453 Use system libtomcrypt/libtommath if available. Doesn't currently
Matt Johnston <matt@ucc.asn.au>
parents: 570
diff changeset
20 LIBTOM_DEPS=$(LTC) $(LTM)
d194db6f9453 Use system libtomcrypt/libtommath if available. Doesn't currently
Matt Johnston <matt@ucc.asn.au>
parents: 570
diff changeset
21 CFLAGS+=-I$(srcdir)/libtomcrypt/src/headers/
d194db6f9453 Use system libtomcrypt/libtommath if available. Doesn't currently
Matt Johnston <matt@ucc.asn.au>
parents: 570
diff changeset
22 LIBS+=$(LTC) $(LTM)
d194db6f9453 Use system libtomcrypt/libtommath if available. Doesn't currently
Matt Johnston <matt@ucc.asn.au>
parents: 570
diff changeset
23 endif
d194db6f9453 Use system libtomcrypt/libtommath if available. Doesn't currently
Matt Johnston <matt@ucc.asn.au>
parents: 570
diff changeset
24
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
25 COMMONOBJS=dbutil.o buffer.o \
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
26 dss.o bignum.o \
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
27 signkey.o rsa.o random.o \
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
28 queue.o \
756
bf9dc2d9c2b1 more bits on ecc branch
Matt Johnston <matt@ucc.asn.au>
parents: 755
diff changeset
29 atomicio.o compat.o fake-rfc2553.o ltc_prng.o ecc.o
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
30
624
fa41341f3b09 Hopefully fix -lcrypt problem
Matt Johnston <matt@ucc.asn.au>
parents: 600
diff changeset
31 SVROBJS=svr-kex.o svr-algo.o svr-auth.o sshpty.o \
475
52a644e7b8e1 * Patch from Frédéric Moulins adding options to authorized_keys.
Matt Johnston <matt@ucc.asn.au>
parents: 389
diff changeset
32 svr-authpasswd.o svr-authpubkey.o svr-authpubkeyoptions.o svr-session.o svr-service.o \
62
20563735e8b5 just checkpointing
Matt Johnston <matt@ucc.asn.au>
parents: 55
diff changeset
33 svr-chansession.o svr-runopts.o svr-agentfwd.o svr-main.o svr-x11fwd.o\
600
a86044b99989 -lcrypt needs to be before object files when static linking
Matt Johnston <matt@ucc.asn.au>
parents: 587
diff changeset
34 svr-tcpfwd.o svr-authpam.o
281
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
35
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
36 CLIOBJS=cli-algo.o cli-main.o cli-auth.o cli-authpasswd.o cli-kex.o \
55
0a88488a949a add cli-authpubkey
Matt Johnston <matt@ucc.asn.au>
parents: 49
diff changeset
37 cli-session.o cli-service.o cli-runopts.o cli-chansession.o \
547
cf376c696dfc Make it compile, update for changes in channel structure.
Matt Johnston <matt@ucc.asn.au>
parents: 520
diff changeset
38 cli-authpubkey.o cli-tcpfwd.o cli-channel.o cli-authinteract.o \
551
c3f2ec71e3d4 New standard linked list to use, rather than adhoc SignKeyList or TCPFwdList
Matt Johnston <matt@ucc.asn.au>
parents: 547
diff changeset
39 cli-agentfwd.o list.o
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
40
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
41 CLISVROBJS=common-session.o packet.o common-algo.o common-kex.o \
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
42 common-channel.o common-chansession.o termcodes.o loginrec.o \
65
02e4a7f614f8 Oops, forgot to call the actual code.
Matt Johnston <matt@ucc.asn.au>
parents: 64
diff changeset
43 tcp-accept.o listener.o process-packet.o \
107
Matt Johnston <matt@ucc.asn.au>
parents: 86
diff changeset
44 common-runopts.o circbuffer.o
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
45
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
46 KEYOBJS=dropbearkey.o gendss.o genrsa.o
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
47
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
48 CONVERTOBJS=dropbearconvert.o keyimport.o
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
49
570
fb9a341e4454 - scp progressbar needs strlcat(), so add compat.o
Matt Johnston <matt@ucc.asn.au>
parents: 551
diff changeset
50 SCPOBJS=scp.o progressmeter.o atomicio.o scpmisc.o compat.o
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
51
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
52 HEADERS=options.h dbutil.h session.h packet.h algo.h ssh.h buffer.h kex.h \
68
eee77ac31ccc cleaning up the pubkey defines
Matt Johnston <matt@ucc.asn.au>
parents: 67
diff changeset
53 dss.h bignum.h signkey.h rsa.h random.h service.h auth.h \
23
c896a4dd65da Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 10
diff changeset
54 debug.h channel.h chansession.h config.h queue.h sshpty.h \
68
eee77ac31ccc cleaning up the pubkey defines
Matt Johnston <matt@ucc.asn.au>
parents: 67
diff changeset
55 termcodes.h gendss.h genrsa.h runopts.h includes.h \
64
efb5e0b335cf TCP forwarding works.
Matt Johnston <matt@ucc.asn.au>
parents: 62
diff changeset
56 loginrec.h atomicio.h x11fwd.h agentfwd.h tcpfwd.h compat.h \
67
86725004a0ea fake-rfc stuff
Matt Johnston <matt@ucc.asn.au>
parents: 65
diff changeset
57 listener.h fake-rfc2553.h
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
58
624
fa41341f3b09 Hopefully fix -lcrypt problem
Matt Johnston <matt@ucc.asn.au>
parents: 600
diff changeset
59 dropbearobjs=$(COMMONOBJS) $(CLISVROBJS) $(SVROBJS) @CRYPTLIB@
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
60 dbclientobjs=$(COMMONOBJS) $(CLISVROBJS) $(CLIOBJS)
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
61 dropbearkeyobjs=$(COMMONOBJS) $(KEYOBJS)
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
62 dropbearconvertobjs=$(COMMONOBJS) $(CONVERTOBJS)
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
63 scpobjs=$(SCPOBJS)
281
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
64
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
65 VPATH=@srcdir@
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
66 srcdir=@srcdir@
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
67
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
68 prefix=@prefix@
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
69 exec_prefix=${prefix}
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
70 bindir=${exec_prefix}/bin
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
71 sbindir=${exec_prefix}/sbin
281
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
72
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
73 CC=@CC@
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
74 AR=@AR@
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
75 RANLIB=@RANLIB@
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
76 STRIP=@STRIP@
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
77 INSTALL=@INSTALL@
319
7a11f8de297c Include CPPFLAGS in CFLAGS
Matt Johnston <matt@ucc.asn.au>
parents: 285
diff changeset
78 CPPFLAGS=@CPPFLAGS@
587
1151059c5eff Work properly again with bundled libtom*. autoconf is a hassle.
Matt Johnston <matt@ucc.asn.au>
parents: 585
diff changeset
79 CFLAGS+=-I. -I$(srcdir) $(CPPFLAGS) @CFLAGS@
585
d194db6f9453 Use system libtomcrypt/libtommath if available. Doesn't currently
Matt Johnston <matt@ucc.asn.au>
parents: 570
diff changeset
80 LIBS+=@LIBS@
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
81 LDFLAGS=@LDFLAGS@
281
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
82
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
83 EXEEXT=@EXEEXT@
281
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
84
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
85 # whether we're building client, server, or both for the common objects.
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
86 # evilness so we detect 'dropbear' by itself as a word
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
87 space:= $(empty) $(empty)
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
88 ifneq (,$(strip $(foreach prog, $(PROGRAMS), $(findstring ZdropbearZ, Z$(prog)Z))))
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
89 CFLAGS+= -DDROPBEAR_SERVER
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
90 endif
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
91 ifneq (,$(strip $(foreach prog, $(PROGRAMS), $(findstring ZdbclientZ, Z$(prog)Z))))
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
92 CFLAGS+= -DDROPBEAR_CLIENT
381
999a5eb4ed10 propagate from branch 'au.asn.ucc.matt.ltc.orig' (head 52840647ac7f5c707c3bd158d119a15734a7ef28)
Matt Johnston <matt@ucc.asn.au>
parents: 281
diff changeset
93 endif
999a5eb4ed10 propagate from branch 'au.asn.ucc.matt.ltc.orig' (head 52840647ac7f5c707c3bd158d119a15734a7ef28)
Matt Johnston <matt@ucc.asn.au>
parents: 281
diff changeset
94
281
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
95
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
96 # these are exported so that libtomcrypt's makefile will use them
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
97 export CC
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
98 export CFLAGS
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
99 export RANLIB AR STRIP
381
999a5eb4ed10 propagate from branch 'au.asn.ucc.matt.ltc.orig' (head 52840647ac7f5c707c3bd158d119a15734a7ef28)
Matt Johnston <matt@ucc.asn.au>
parents: 281
diff changeset
100
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
101 ifeq ($(STATIC), 1)
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
102 LDFLAGS+=-static
381
999a5eb4ed10 propagate from branch 'au.asn.ucc.matt.ltc.orig' (head 52840647ac7f5c707c3bd158d119a15734a7ef28)
Matt Johnston <matt@ucc.asn.au>
parents: 281
diff changeset
103 endif
999a5eb4ed10 propagate from branch 'au.asn.ucc.matt.ltc.orig' (head 52840647ac7f5c707c3bd158d119a15734a7ef28)
Matt Johnston <matt@ucc.asn.au>
parents: 281
diff changeset
104
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
105 ifeq ($(MULTI), 1)
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
106 TARGETS=dropbearmulti
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
107 else
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
108 TARGETS=$(PROGRAMS)
381
999a5eb4ed10 propagate from branch 'au.asn.ucc.matt.ltc.orig' (head 52840647ac7f5c707c3bd158d119a15734a7ef28)
Matt Johnston <matt@ucc.asn.au>
parents: 281
diff changeset
109 endif
281
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
110
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
111 # for the scp progress meter. The -D doesn't affect anything else.
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
112 ifeq ($(SCPPROGRESS), 1)
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
113 CFLAGS+=-DPROGRESS_METER
281
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
114 endif
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
115
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
116 all: $(TARGETS)
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
117
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
118 strip: $(TARGETS)
174
c753db8eb446 * don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents: 161
diff changeset
119 $(STRIP) $(addsuffix $(EXEEXT), $(TARGETS))
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
120
132
c56d40d54538 use inst_ rather than inst, so it doesn't try to install "all".
Matt Johnston <matt@ucc.asn.au>
parents: 119
diff changeset
121 install: $(addprefix inst_, $(TARGETS))
82
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
122
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
123 installdropbearmulti: insdbmulti $(addprefix insmulti, $(PROGRAMS))
281
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
124
82
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
125 insdbmulti: dropbearmulti
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
126 $(INSTALL) -d -m 755 $(DESTDIR)$(bindir)
174
c753db8eb446 * don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents: 161
diff changeset
127 $(INSTALL) -m 755 dropbearmulti$(EXEEXT) $(DESTDIR)$(bindir)
c753db8eb446 * don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents: 161
diff changeset
128 -chown root $(DESTDIR)$(bindir)/dropbearmulti$(EXEEXT)
c753db8eb446 * don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents: 161
diff changeset
129 -chgrp 0 $(DESTDIR)$(bindir)/dropbearmulti$(EXEEXT)
381
999a5eb4ed10 propagate from branch 'au.asn.ucc.matt.ltc.orig' (head 52840647ac7f5c707c3bd158d119a15734a7ef28)
Matt Johnston <matt@ucc.asn.au>
parents: 281
diff changeset
130
82
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
131 insmultidropbear: dropbearmulti
635
c95860b53363 Fix symlink target created by installdropbearmulti
Matt Johnston <matt@ucc.asn.au>
parents: 624
diff changeset
132 $(INSTALL) -d -m 755 $(DESTDIR)$(sbindir)
174
c753db8eb446 * don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents: 161
diff changeset
133 -rm -f $(DESTDIR)$(sbindir)/dropbear$(EXEEXT)
635
c95860b53363 Fix symlink target created by installdropbearmulti
Matt Johnston <matt@ucc.asn.au>
parents: 624
diff changeset
134 -ln -s $(bindir)/dropbearmulti$(EXEEXT) $(DESTDIR)$(sbindir)/dropbear$(EXEEXT)
82
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
135
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
136 insmulti%: dropbearmulti
635
c95860b53363 Fix symlink target created by installdropbearmulti
Matt Johnston <matt@ucc.asn.au>
parents: 624
diff changeset
137 $(INSTALL) -d -m 755 $(DESTDIR)$(bindir)
174
c753db8eb446 * don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents: 161
diff changeset
138 -rm -f $(DESTDIR)$(bindir)/$*$(EXEEXT)
635
c95860b53363 Fix symlink target created by installdropbearmulti
Matt Johnston <matt@ucc.asn.au>
parents: 624
diff changeset
139 -ln -s $(bindir)/dropbearmulti$(EXEEXT) $(DESTDIR)$(bindir)/$*$(EXEEXT)
281
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
140
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
141 # dropbear should go in sbin, so it needs a seperate rule
132
c56d40d54538 use inst_ rather than inst, so it doesn't try to install "all".
Matt Johnston <matt@ucc.asn.au>
parents: 119
diff changeset
142 inst_dropbear: dropbear
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
143 $(INSTALL) -d -m 755 $(DESTDIR)$(sbindir)
174
c753db8eb446 * don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents: 161
diff changeset
144 $(INSTALL) -m 755 dropbear$(EXEEXT) $(DESTDIR)$(sbindir)
c753db8eb446 * don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents: 161
diff changeset
145 -chown root $(DESTDIR)$(sbindir)/dropbear$(EXEEXT)
c753db8eb446 * don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents: 161
diff changeset
146 -chgrp 0 $(DESTDIR)$(sbindir)/dropbear$(EXEEXT)
281
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
147
132
c56d40d54538 use inst_ rather than inst, so it doesn't try to install "all".
Matt Johnston <matt@ucc.asn.au>
parents: 119
diff changeset
148 inst_%: $*
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
149 $(INSTALL) -d -m 755 $(DESTDIR)$(bindir)
174
c753db8eb446 * don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents: 161
diff changeset
150 $(INSTALL) -m 755 $*$(EXEEXT) $(DESTDIR)$(bindir)
c753db8eb446 * don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents: 161
diff changeset
151 -chown root $(DESTDIR)$(bindir)/$*$(EXEEXT)
c753db8eb446 * don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents: 161
diff changeset
152 -chgrp 0 $(DESTDIR)$(bindir)/$*$(EXEEXT)
281
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
153
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
154
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
155 # for some reason the rule further down doesn't like $($@objs) as a prereq.
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
156 dropbear: $(dropbearobjs)
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
157 dbclient: $(dbclientobjs)
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
158 dropbearkey: $(dropbearkeyobjs)
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
159 dropbearconvert: $(dropbearconvertobjs)
281
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
160
585
d194db6f9453 Use system libtomcrypt/libtommath if available. Doesn't currently
Matt Johnston <matt@ucc.asn.au>
parents: 570
diff changeset
161 dropbear dbclient dropbearkey dropbearconvert: $(HEADERS) $(LIBTOM_DEPS) Makefile
366
59531221b846 Fix up separate-directory building for libtomcrypt
Matt Johnston <matt@ucc.asn.au>
parents: 319
diff changeset
162 $(CC) $(LDFLAGS) -o $@$(EXEEXT) $($@objs) $(LIBS)
281
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
163
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
164 # scp doesn't use the libs so is special.
33
f789045062e6 Progressing client support
Matt Johnston <matt@ucc.asn.au>
parents: 32
diff changeset
165 scp: $(SCPOBJS) $(HEADERS) Makefile
366
59531221b846 Fix up separate-directory building for libtomcrypt
Matt Johnston <matt@ucc.asn.au>
parents: 319
diff changeset
166 $(CC) $(LDFLAGS) -o $@$(EXEEXT) $(SCPOBJS)
281
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
167
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
168
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
169 # multi-binary compilation.
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
170 MULTIOBJS=
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
171 ifeq ($(MULTI),1)
624
fa41341f3b09 Hopefully fix -lcrypt problem
Matt Johnston <matt@ucc.asn.au>
parents: 600
diff changeset
172 MULTIOBJS=dbmulti.o $(sort $(foreach prog, $(PROGRAMS), $($(prog)objs))) @CRYPTLIB@
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
173 CFLAGS+=$(addprefix -DDBMULTI_, $(PROGRAMS)) -DDROPBEAR_MULTI
381
999a5eb4ed10 propagate from branch 'au.asn.ucc.matt.ltc.orig' (head 52840647ac7f5c707c3bd158d119a15734a7ef28)
Matt Johnston <matt@ucc.asn.au>
parents: 281
diff changeset
174 endif
281
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
175
82
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
176 dropbearmulti: multilink
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
177
585
d194db6f9453 Use system libtomcrypt/libtommath if available. Doesn't currently
Matt Johnston <matt@ucc.asn.au>
parents: 570
diff changeset
178 multibinary: $(HEADERS) $(MULTIOBJS) $(LIBTOM_DEPS) Makefile
366
59531221b846 Fix up separate-directory building for libtomcrypt
Matt Johnston <matt@ucc.asn.au>
parents: 319
diff changeset
179 $(CC) $(LDFLAGS) -o dropbearmulti$(EXEEXT) $(MULTIOBJS) $(LIBS)
82
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
180
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
181 multilink: multibinary $(addprefix link, $(PROGRAMS))
281
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
182
82
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
183 link%:
174
c753db8eb446 * don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents: 161
diff changeset
184 -rm -f $*$(EXEEXT)
c753db8eb446 * don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents: 161
diff changeset
185 -ln -s dropbearmulti$(EXEEXT) $*$(EXEEXT)
281
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
186
33
f789045062e6 Progressing client support
Matt Johnston <matt@ucc.asn.au>
parents: 32
diff changeset
187 $(LTC): options.h
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
188 cd libtomcrypt && $(MAKE) clean && $(MAKE)
281
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
189
33
f789045062e6 Progressing client support
Matt Johnston <matt@ucc.asn.au>
parents: 32
diff changeset
190 $(LTM): options.h
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
191 cd libtommath && $(MAKE)
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
192
366
59531221b846 Fix up separate-directory building for libtomcrypt
Matt Johnston <matt@ucc.asn.au>
parents: 319
diff changeset
193 .PHONY : clean sizes thisclean distclean tidy ltc-clean ltm-clean
281
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
194
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
195 ltc-clean:
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
196 cd libtomcrypt && $(MAKE) clean
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
197
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
198 ltm-clean:
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
199 cd libtommath && $(MAKE) clean
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
200
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
201 sizes: dropbear
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
202 objdump -t dropbear|grep ".text"|cut -d "." -f 2|sort -rn
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
203
86
ace512d2ad5d Small fixes
Matt Johnston <matt@ucc.asn.au>
parents: 82
diff changeset
204 clean: ltc-clean ltm-clean thisclean
281
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
205
86
ace512d2ad5d Small fixes
Matt Johnston <matt@ucc.asn.au>
parents: 82
diff changeset
206 thisclean:
174
c753db8eb446 * don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents: 161
diff changeset
207 -rm -f dropbear dbclient dropbearkey dropbearconvert scp scp-progress \
c753db8eb446 * don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents: 161
diff changeset
208 dropbearmulti *.o *.da *.bb *.bbg *.prof
281
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
209
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
210 distclean: clean tidy
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
211 -rm -f config.h
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
212 -rm -f Makefile
281
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
213
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
214 tidy:
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
215 -rm -f *~ *.gcov */*~