annotate Makefile.in @ 798:30f7bad5e748 ecc

merge
author Matt Johnston <matt@ucc.asn.au>
date Thu, 09 May 2013 23:25:39 +0800
parents d1575fdc29a6
children 7dcb46da72d9
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)
761
ac2158e3e403 ecc kind of works, needs fixing/testing
Matt Johnston <matt@ucc.asn.au>
parents: 756
diff changeset
20 LIBTOM_DEPS=$(LTM) $(LTC)
ac2158e3e403 ecc kind of works, needs fixing/testing
Matt Johnston <matt@ucc.asn.au>
parents: 756
diff changeset
21 CFLAGS+=-I$(srcdir)/libtomcrypt/src/headers/
ac2158e3e403 ecc kind of works, needs fixing/testing
Matt Johnston <matt@ucc.asn.au>
parents: 756
diff changeset
22 LIBS+=$(LTM) $(LTC)
585
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 \
766
d1575fdc29a6 start on ecdsa keys
Matt Johnston <matt@ucc.asn.au>
parents: 761
diff changeset
29 atomicio.o compat.o fake-rfc2553.o \
d1575fdc29a6 start on ecdsa keys
Matt Johnston <matt@ucc.asn.au>
parents: 761
diff changeset
30 ltc_prng.o ecc.o ecdsa.o crypto_desc.o
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
31
624
fa41341f3b09 Hopefully fix -lcrypt problem
Matt Johnston <matt@ucc.asn.au>
parents: 600
diff changeset
32 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
33 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
34 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
35 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
36
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
37 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
38 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
39 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
40 cli-agentfwd.o list.o
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
41
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
42 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
43 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
44 tcp-accept.o listener.o process-packet.o \
107
Matt Johnston <matt@ucc.asn.au>
parents: 86
diff changeset
45 common-runopts.o circbuffer.o
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
46
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
47 KEYOBJS=dropbearkey.o gendss.o genrsa.o
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
48
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
49 CONVERTOBJS=dropbearconvert.o keyimport.o
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
50
570
fb9a341e4454 - scp progressbar needs strlcat(), so add compat.o
Matt Johnston <matt@ucc.asn.au>
parents: 551
diff changeset
51 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
52
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
53 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
54 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
55 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
56 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
57 loginrec.h atomicio.h x11fwd.h agentfwd.h tcpfwd.h compat.h \
766
d1575fdc29a6 start on ecdsa keys
Matt Johnston <matt@ucc.asn.au>
parents: 761
diff changeset
58 listener.h fake-rfc2553.h ecc.h ecdsa.h
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
59
624
fa41341f3b09 Hopefully fix -lcrypt problem
Matt Johnston <matt@ucc.asn.au>
parents: 600
diff changeset
60 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
61 dbclientobjs=$(COMMONOBJS) $(CLISVROBJS) $(CLIOBJS)
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
62 dropbearkeyobjs=$(COMMONOBJS) $(KEYOBJS)
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
63 dropbearconvertobjs=$(COMMONOBJS) $(CONVERTOBJS)
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
64 scpobjs=$(SCPOBJS)
281
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
65
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
66 VPATH=@srcdir@
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
67 srcdir=@srcdir@
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
68
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
69 prefix=@prefix@
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
70 exec_prefix=${prefix}
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
71 bindir=${exec_prefix}/bin
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
72 sbindir=${exec_prefix}/sbin
281
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
73
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
74 CC=@CC@
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
75 AR=@AR@
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
76 RANLIB=@RANLIB@
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
77 STRIP=@STRIP@
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
78 INSTALL=@INSTALL@
319
7a11f8de297c Include CPPFLAGS in CFLAGS
Matt Johnston <matt@ucc.asn.au>
parents: 285
diff changeset
79 CPPFLAGS=@CPPFLAGS@
587
1151059c5eff Work properly again with bundled libtom*. autoconf is a hassle.
Matt Johnston <matt@ucc.asn.au>
parents: 585
diff changeset
80 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
81 LIBS+=@LIBS@
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
82 LDFLAGS=@LDFLAGS@
281
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
83
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
84 EXEEXT=@EXEEXT@
281
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
85
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
86 # 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
87 # 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
88 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
89 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
90 CFLAGS+= -DDROPBEAR_SERVER
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
91 endif
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
92 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
93 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
94 endif
999a5eb4ed10 propagate from branch 'au.asn.ucc.matt.ltc.orig' (head 52840647ac7f5c707c3bd158d119a15734a7ef28)
Matt Johnston <matt@ucc.asn.au>
parents: 281
diff changeset
95
281
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
96
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
97 # 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
98 export CC
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
99 export CFLAGS
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
100 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
101
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
102 ifeq ($(STATIC), 1)
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
103 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
104 endif
999a5eb4ed10 propagate from branch 'au.asn.ucc.matt.ltc.orig' (head 52840647ac7f5c707c3bd158d119a15734a7ef28)
Matt Johnston <matt@ucc.asn.au>
parents: 281
diff changeset
105
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
106 ifeq ($(MULTI), 1)
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
107 TARGETS=dropbearmulti
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
108 else
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
109 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
110 endif
281
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
111
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
112 # 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
113 ifeq ($(SCPPROGRESS), 1)
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
114 CFLAGS+=-DPROGRESS_METER
281
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
115 endif
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
116
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
117 all: $(TARGETS)
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
118
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
119 strip: $(TARGETS)
174
c753db8eb446 * don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents: 161
diff changeset
120 $(STRIP) $(addsuffix $(EXEEXT), $(TARGETS))
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
121
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
122 install: $(addprefix inst_, $(TARGETS))
82
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
123
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
124 installdropbearmulti: insdbmulti $(addprefix insmulti, $(PROGRAMS))
281
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
125
82
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
126 insdbmulti: dropbearmulti
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
127 $(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
128 $(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
129 -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
130 -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
131
82
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
132 insmultidropbear: dropbearmulti
635
c95860b53363 Fix symlink target created by installdropbearmulti
Matt Johnston <matt@ucc.asn.au>
parents: 624
diff changeset
133 $(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
134 -rm -f $(DESTDIR)$(sbindir)/dropbear$(EXEEXT)
635
c95860b53363 Fix symlink target created by installdropbearmulti
Matt Johnston <matt@ucc.asn.au>
parents: 624
diff changeset
135 -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
136
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
137 insmulti%: dropbearmulti
635
c95860b53363 Fix symlink target created by installdropbearmulti
Matt Johnston <matt@ucc.asn.au>
parents: 624
diff changeset
138 $(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
139 -rm -f $(DESTDIR)$(bindir)/$*$(EXEEXT)
635
c95860b53363 Fix symlink target created by installdropbearmulti
Matt Johnston <matt@ucc.asn.au>
parents: 624
diff changeset
140 -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
141
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
142 # 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
143 inst_dropbear: dropbear
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
144 $(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
145 $(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
146 -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
147 -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
148
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
149 inst_%: $*
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
150 $(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
151 $(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
152 -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
153 -chgrp 0 $(DESTDIR)$(bindir)/$*$(EXEEXT)
281
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
154
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
155
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
156 # 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
157 dropbear: $(dropbearobjs)
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
158 dbclient: $(dbclientobjs)
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
159 dropbearkey: $(dropbearkeyobjs)
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
160 dropbearconvert: $(dropbearconvertobjs)
281
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
161
585
d194db6f9453 Use system libtomcrypt/libtommath if available. Doesn't currently
Matt Johnston <matt@ucc.asn.au>
parents: 570
diff changeset
162 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
163 $(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
164
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
165 # scp doesn't use the libs so is special.
33
f789045062e6 Progressing client support
Matt Johnston <matt@ucc.asn.au>
parents: 32
diff changeset
166 scp: $(SCPOBJS) $(HEADERS) Makefile
366
59531221b846 Fix up separate-directory building for libtomcrypt
Matt Johnston <matt@ucc.asn.au>
parents: 319
diff changeset
167 $(CC) $(LDFLAGS) -o $@$(EXEEXT) $(SCPOBJS)
281
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
168
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
169
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
170 # multi-binary compilation.
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
171 MULTIOBJS=
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
172 ifeq ($(MULTI),1)
624
fa41341f3b09 Hopefully fix -lcrypt problem
Matt Johnston <matt@ucc.asn.au>
parents: 600
diff changeset
173 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
174 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
175 endif
281
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
176
82
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
177 dropbearmulti: multilink
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
178
585
d194db6f9453 Use system libtomcrypt/libtommath if available. Doesn't currently
Matt Johnston <matt@ucc.asn.au>
parents: 570
diff changeset
179 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
180 $(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
181
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
182 multilink: multibinary $(addprefix link, $(PROGRAMS))
281
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
183
82
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
184 link%:
174
c753db8eb446 * don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents: 161
diff changeset
185 -rm -f $*$(EXEEXT)
c753db8eb446 * don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents: 161
diff changeset
186 -ln -s dropbearmulti$(EXEEXT) $*$(EXEEXT)
281
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
187
33
f789045062e6 Progressing client support
Matt Johnston <matt@ucc.asn.au>
parents: 32
diff changeset
188 $(LTC): options.h
761
ac2158e3e403 ecc kind of works, needs fixing/testing
Matt Johnston <matt@ucc.asn.au>
parents: 756
diff changeset
189 cd libtomcrypt && $(MAKE)
281
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
190
33
f789045062e6 Progressing client support
Matt Johnston <matt@ucc.asn.au>
parents: 32
diff changeset
191 $(LTM): options.h
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
192 cd libtommath && $(MAKE)
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
193
366
59531221b846 Fix up separate-directory building for libtomcrypt
Matt Johnston <matt@ucc.asn.au>
parents: 319
diff changeset
194 .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
195
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
196 ltc-clean:
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
197 cd libtomcrypt && $(MAKE) clean
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
198
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
199 ltm-clean:
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
200 cd libtommath && $(MAKE) clean
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
201
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
202 sizes: dropbear
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
203 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
204
86
ace512d2ad5d Small fixes
Matt Johnston <matt@ucc.asn.au>
parents: 82
diff changeset
205 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
206
86
ace512d2ad5d Small fixes
Matt Johnston <matt@ucc.asn.au>
parents: 82
diff changeset
207 thisclean:
174
c753db8eb446 * don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents: 161
diff changeset
208 -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
209 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
210
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
211 distclean: clean tidy
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
212 -rm -f config.h
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
213 -rm -f Makefile
281
997e6f7dc01e Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
214
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
215 tidy:
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
216 -rm -f *~ *.gcov */*~