Mercurial > dropbear
annotate Makefile.in @ 1546:bb8eaa26bc93 fuzz
merge from main
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Mon, 26 Feb 2018 22:44:48 +0800 |
parents | 5916af64acd4 198e2ee0f4b1 |
children | 61a793b6e471 |
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 | 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: |
1447
8f88f4290b22
document --enable-static in place of STATIC=1
Matt Johnston <matt@ucc.asn.au>
parents:
1446
diff
changeset
|
5 # make PROGRAMS="dropbear dbclient scp" MULTI=1 SCPPROGRESS=1 |
281
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
6 # |
1447
8f88f4290b22
document --enable-static in place of STATIC=1
Matt Johnston <matt@ucc.asn.au>
parents:
1446
diff
changeset
|
7 # to make a multiple-program binary "dropbearmulti". |
82
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. |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
10 |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
11 ifndef PROGRAMS |
73
0bf5cebe622c
Dropbearkey can now print out pubkey portions
Matt Johnston <matt@ucc.asn.au>
parents:
68
diff
changeset
|
12 PROGRAMS=dropbear dbclient dropbearkey dropbearconvert |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
13 endif |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
14 |
898
4f1988cb79ce
Fix building with system libtomcrypt/libtommath
Matt Johnston <matt@ucc.asn.au>
parents:
890
diff
changeset
|
15 STATIC_LTC=libtomcrypt/libtomcrypt.a |
4f1988cb79ce
Fix building with system libtomcrypt/libtommath
Matt Johnston <matt@ucc.asn.au>
parents:
890
diff
changeset
|
16 STATIC_LTM=libtommath/libtommath.a |
4f1988cb79ce
Fix building with system libtomcrypt/libtommath
Matt Johnston <matt@ucc.asn.au>
parents:
890
diff
changeset
|
17 |
4f1988cb79ce
Fix building with system libtomcrypt/libtommath
Matt Johnston <matt@ucc.asn.au>
parents:
890
diff
changeset
|
18 LIBTOM_LIBS=@LIBTOM_LIBS@ |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
19 |
585
d194db6f9453
Use system libtomcrypt/libtommath if available. Doesn't currently
Matt Johnston <matt@ucc.asn.au>
parents:
570
diff
changeset
|
20 ifeq (@BUNDLED_LIBTOM@, 1) |
898
4f1988cb79ce
Fix building with system libtomcrypt/libtommath
Matt Johnston <matt@ucc.asn.au>
parents:
890
diff
changeset
|
21 LIBTOM_DEPS=$(STATIC_LTC) $(STATIC_LTM) |
761
ac2158e3e403
ecc kind of works, needs fixing/testing
Matt Johnston <matt@ucc.asn.au>
parents:
756
diff
changeset
|
22 CFLAGS+=-I$(srcdir)/libtomcrypt/src/headers/ |
1499
2d450c1056e3
options: Complete the transition to numeric toggles (`#if')
Michael Witten <mfwitten@gmail.com>
parents:
1492
diff
changeset
|
23 LIBTOM_LIBS=$(STATIC_LTC) $(STATIC_LTM) |
585
d194db6f9453
Use system libtomcrypt/libtommath if available. Doesn't currently
Matt Johnston <matt@ucc.asn.au>
parents:
570
diff
changeset
|
24 endif |
d194db6f9453
Use system libtomcrypt/libtommath if available. Doesn't currently
Matt Johnston <matt@ucc.asn.au>
parents:
570
diff
changeset
|
25 |
1521
198e2ee0f4b1
- Fix dependencies and remove old default_options.h from version control
Matt Johnston <matt@ucc.asn.au>
parents:
1499
diff
changeset
|
26 OPTION_HEADERS = default_options_guard.h sysoptions.h |
1295
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
1283
diff
changeset
|
27 ifneq ($(wildcard localoptions.h),) |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
1283
diff
changeset
|
28 CFLAGS+=-DLOCALOPTIONS_H_EXISTS |
1521
198e2ee0f4b1
- Fix dependencies and remove old default_options.h from version control
Matt Johnston <matt@ucc.asn.au>
parents:
1499
diff
changeset
|
29 OPTION_HEADERS += localoptions.h |
1295
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
1283
diff
changeset
|
30 endif |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
1283
diff
changeset
|
31 |
1283
3017bc7d6238
move m_burn and function attributes to dbhelpers
Matt Johnston <matt@ucc.asn.au>
parents:
1224
diff
changeset
|
32 COMMONOBJS=dbutil.o buffer.o dbhelpers.o \ |
30
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
33 dss.o bignum.o \ |
858
220f55d540ae
rename random.h to dbrandom.h since some OSes have a system random.h
Matt Johnston <matt@ucc.asn.au>
parents:
849
diff
changeset
|
34 signkey.o rsa.o dbrandom.o \ |
30
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
35 queue.o \ |
766 | 36 atomicio.o compat.o fake-rfc2553.o \ |
846
b298bb438625
refactor key generation, make it generate as required.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
37 ltc_prng.o ecc.o ecdsa.o crypto_desc.o \ |
1361
f9f930e1a516
add dbmalloc epoch cleanup
Matt Johnston <matt@ucc.asn.au>
parents:
1356
diff
changeset
|
38 dbmalloc.o \ |
846
b298bb438625
refactor key generation, make it generate as required.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
39 gensignkey.o gendss.o genrsa.o |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
40 |
741
eafdf8b363f5
Get rid of client/server specific buf_match_algo, use single
Matt Johnston <matt@ucc.asn.au>
parents:
635
diff
changeset
|
41 SVROBJS=svr-kex.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
|
42 svr-authpasswd.o svr-authpubkey.o svr-authpubkeyoptions.o svr-session.o svr-service.o \ |
62 | 43 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
|
44 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
|
45 |
741
eafdf8b363f5
Get rid of client/server specific buf_match_algo, use single
Matt Johnston <matt@ucc.asn.au>
parents:
635
diff
changeset
|
46 CLIOBJS=cli-main.o cli-auth.o cli-authpasswd.o cli-kex.o \ |
727
00bc3df3a9c3
Don't bother waiting for a ssh-connection service reply - the server
Matt Johnston <matt@ucc.asn.au>
parents:
635
diff
changeset
|
47 cli-session.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
|
48 cli-authpubkey.o cli-tcpfwd.o cli-channel.o cli-authinteract.o \ |
1032
0da8ba489c23
Move generic network routines to netio.c
Matt Johnston <matt@ucc.asn.au>
parents:
993
diff
changeset
|
49 cli-agentfwd.o |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
50 |
30
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
51 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
|
52 common-channel.o common-chansession.o termcodes.o loginrec.o \ |
1224
82e2037d34ea
Move dh group constants to a separate file
Matt Johnston <matt@ucc.asn.au>
parents:
1049
diff
changeset
|
53 tcp-accept.o listener.o process-packet.o dh_groups.o \ |
1032
0da8ba489c23
Move generic network routines to netio.c
Matt Johnston <matt@ucc.asn.au>
parents:
993
diff
changeset
|
54 common-runopts.o circbuffer.o curve25519-donna.o list.o netio.o |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
55 |
846
b298bb438625
refactor key generation, make it generate as required.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
56 KEYOBJS=dropbearkey.o |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
57 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
58 CONVERTOBJS=dropbearconvert.o keyimport.o |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
59 |
570
fb9a341e4454
- scp progressbar needs strlcat(), so add compat.o
Matt Johnston <matt@ucc.asn.au>
parents:
551
diff
changeset
|
60 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
|
61 |
1356
3677a510f545
add wrapfd. improve fuzzer in makefile
Matt Johnston <matt@ucc.asn.au>
parents:
1355
diff
changeset
|
62 ifeq (@DROPBEAR_FUZZ@, 1) |
3677a510f545
add wrapfd. improve fuzzer in makefile
Matt Johnston <matt@ucc.asn.au>
parents:
1355
diff
changeset
|
63 COMMONOBJS += fuzz-common.o fuzz-wrapfd.o |
3677a510f545
add wrapfd. improve fuzzer in makefile
Matt Johnston <matt@ucc.asn.au>
parents:
1355
diff
changeset
|
64 endif |
3677a510f545
add wrapfd. improve fuzzer in makefile
Matt Johnston <matt@ucc.asn.au>
parents:
1355
diff
changeset
|
65 |
890
d50c17fe57d7
Fix linking -lcrypt for systems without libcrypt in /usr/lib
Nicolas Boos <nicolas.boos@wanadoo.fr>
parents:
889
diff
changeset
|
66 dropbearobjs=$(COMMONOBJS) $(CLISVROBJS) $(SVROBJS) |
30
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
67 dbclientobjs=$(COMMONOBJS) $(CLISVROBJS) $(CLIOBJS) |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
68 dropbearkeyobjs=$(COMMONOBJS) $(KEYOBJS) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
69 dropbearconvertobjs=$(COMMONOBJS) $(CONVERTOBJS) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
70 scpobjs=$(SCPOBJS) |
281
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
71 |
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
72 VPATH=@srcdir@ |
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
73 srcdir=@srcdir@ |
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
74 |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
75 prefix=@prefix@ |
827
4a788a3162a1
Add @exec_prefix@ that was missing
Matt Johnston <matt@ucc.asn.au>
parents:
820
diff
changeset
|
76 exec_prefix=@exec_prefix@ |
820
830fae485d40
Add manpage for dropbearconvert
Matt Johnston <matt@ucc.asn.au>
parents:
743
diff
changeset
|
77 datarootdir = @datarootdir@ |
830fae485d40
Add manpage for dropbearconvert
Matt Johnston <matt@ucc.asn.au>
parents:
743
diff
changeset
|
78 bindir=@bindir@ |
830fae485d40
Add manpage for dropbearconvert
Matt Johnston <matt@ucc.asn.au>
parents:
743
diff
changeset
|
79 sbindir=@sbindir@ |
830fae485d40
Add manpage for dropbearconvert
Matt Johnston <matt@ucc.asn.au>
parents:
743
diff
changeset
|
80 mandir=@mandir@ |
281
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
81 |
1295
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
1283
diff
changeset
|
82 .DELETE_ON_ERROR: |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
1283
diff
changeset
|
83 |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
84 CC=@CC@ |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
85 AR=@AR@ |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
86 RANLIB=@RANLIB@ |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
87 STRIP=@STRIP@ |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
88 INSTALL=@INSTALL@ |
319 | 89 CPPFLAGS=@CPPFLAGS@ |
587
1151059c5eff
Work properly again with bundled libtom*. autoconf is a hassle.
Matt Johnston <matt@ucc.asn.au>
parents:
585
diff
changeset
|
90 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
|
91 LIBS+=@LIBS@ |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
92 LDFLAGS=@LDFLAGS@ |
281
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
93 |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
94 EXEEXT=@EXEEXT@ |
281
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
95 |
1446
b8764eee6bdb
add --enable-static configure argument. disable conflicting harden flags
Matt Johnston <matt@ucc.asn.au>
parents:
1297
diff
changeset
|
96 STATIC=@STATIC@ |
b8764eee6bdb
add --enable-static configure argument. disable conflicting harden flags
Matt Johnston <matt@ucc.asn.au>
parents:
1297
diff
changeset
|
97 |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
98 # 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
|
99 # evilness so we detect 'dropbear' by itself as a word |
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
100 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
|
101 CFLAGS+= -DDROPBEAR_SERVER |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
102 endif |
30
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
103 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
|
104 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
|
105 endif |
999a5eb4ed10
propagate from branch 'au.asn.ucc.matt.ltc.orig' (head 52840647ac7f5c707c3bd158d119a15734a7ef28)
Matt Johnston <matt@ucc.asn.au>
parents:
281
diff
changeset
|
106 |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
107 # 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
|
108 export CC |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
109 export CFLAGS |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
110 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
|
111 |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
112 ifeq ($(STATIC), 1) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
113 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
|
114 endif |
999a5eb4ed10
propagate from branch 'au.asn.ucc.matt.ltc.orig' (head 52840647ac7f5c707c3bd158d119a15734a7ef28)
Matt Johnston <matt@ucc.asn.au>
parents:
281
diff
changeset
|
115 |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
116 ifeq ($(MULTI), 1) |
1448
7dddc4dd7063
EXEEXT for a few more targets, dropbearmulti in particular for Cygwin
Matt Johnston <matt@ucc.asn.au>
parents:
1447
diff
changeset
|
117 TARGETS=dropbearmulti$(EXEEXT) |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
118 else |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
119 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
|
120 endif |
281
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
121 |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
122 # 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
|
123 ifeq ($(SCPPROGRESS), 1) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
124 CFLAGS+=-DPROGRESS_METER |
281
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
125 endif |
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
126 |
30
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
127 all: $(TARGETS) |
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
128 |
1521
198e2ee0f4b1
- Fix dependencies and remove old default_options.h from version control
Matt Johnston <matt@ucc.asn.au>
parents:
1499
diff
changeset
|
129 # for simplicity assume all source depends on all headers |
198e2ee0f4b1
- Fix dependencies and remove old default_options.h from version control
Matt Johnston <matt@ucc.asn.au>
parents:
1499
diff
changeset
|
130 HEADERS=$(wildcard $(srcdir)/*.h *.h) $(OPTION_HEADERS) |
198e2ee0f4b1
- Fix dependencies and remove old default_options.h from version control
Matt Johnston <matt@ucc.asn.au>
parents:
1499
diff
changeset
|
131 %.o : %.c $(HEADERS) |
198e2ee0f4b1
- Fix dependencies and remove old default_options.h from version control
Matt Johnston <matt@ucc.asn.au>
parents:
1499
diff
changeset
|
132 $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@ |
198e2ee0f4b1
- Fix dependencies and remove old default_options.h from version control
Matt Johnston <matt@ucc.asn.au>
parents:
1499
diff
changeset
|
133 |
198e2ee0f4b1
- Fix dependencies and remove old default_options.h from version control
Matt Johnston <matt@ucc.asn.au>
parents:
1499
diff
changeset
|
134 default_options_guard.h: default_options.h |
198e2ee0f4b1
- Fix dependencies and remove old default_options.h from version control
Matt Johnston <matt@ucc.asn.au>
parents:
1499
diff
changeset
|
135 @echo Creating $@ |
198e2ee0f4b1
- Fix dependencies and remove old default_options.h from version control
Matt Johnston <matt@ucc.asn.au>
parents:
1499
diff
changeset
|
136 @printf "/*\n > > > Do not edit this file (default_options_guard.h) < < <\nGenerated from "$^"\nLocal customisation goes in localoptions.h\n*/\n\n" > $@.tmp |
198e2ee0f4b1
- Fix dependencies and remove old default_options.h from version control
Matt Johnston <matt@ucc.asn.au>
parents:
1499
diff
changeset
|
137 @$(srcdir)/ifndef_wrapper.sh < $^ >> $@.tmp |
198e2ee0f4b1
- Fix dependencies and remove old default_options.h from version control
Matt Johnston <matt@ucc.asn.au>
parents:
1499
diff
changeset
|
138 @mv $@.tmp $@ |
1492 | 139 |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
140 strip: $(TARGETS) |
174
c753db8eb446
* don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents:
161
diff
changeset
|
141 $(STRIP) $(addsuffix $(EXEEXT), $(TARGETS)) |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
142 |
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 install: $(addprefix inst_, $(TARGETS)) |
82
8f26145a0997
do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents:
81
diff
changeset
|
144 |
1448
7dddc4dd7063
EXEEXT for a few more targets, dropbearmulti in particular for Cygwin
Matt Johnston <matt@ucc.asn.au>
parents:
1447
diff
changeset
|
145 insmultidropbear: dropbearmulti$(EXEEXT) |
820
830fae485d40
Add manpage for dropbearconvert
Matt Johnston <matt@ucc.asn.au>
parents:
743
diff
changeset
|
146 $(INSTALL) -d $(DESTDIR)$(sbindir) |
174
c753db8eb446
* don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents:
161
diff
changeset
|
147 -rm -f $(DESTDIR)$(sbindir)/dropbear$(EXEEXT) |
635
c95860b53363
Fix symlink target created by installdropbearmulti
Matt Johnston <matt@ucc.asn.au>
parents:
624
diff
changeset
|
148 -ln -s $(bindir)/dropbearmulti$(EXEEXT) $(DESTDIR)$(sbindir)/dropbear$(EXEEXT) |
828
93e04b9ff676
- Fix "inst_scp" target since there isn't a manpage
Matt Johnston <matt@ucc.asn.au>
parents:
827
diff
changeset
|
149 $(INSTALL) -d $(DESTDIR)$(mandir)/man8 |
993
1e496ad473bd
Fix installing dropbear.8 error when building in a separate directory.
Like Ma <likemartinma@gmail.com>
parents:
916
diff
changeset
|
150 $(INSTALL) -m 644 $(srcdir)/dropbear.8 $(DESTDIR)$(mandir)/man8/dropbear.8 |
82
8f26145a0997
do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents:
81
diff
changeset
|
151 |
1448
7dddc4dd7063
EXEEXT for a few more targets, dropbearmulti in particular for Cygwin
Matt Johnston <matt@ucc.asn.au>
parents:
1447
diff
changeset
|
152 insmulti%: dropbearmulti$(EXEEXT) |
820
830fae485d40
Add manpage for dropbearconvert
Matt Johnston <matt@ucc.asn.au>
parents:
743
diff
changeset
|
153 $(INSTALL) -d $(DESTDIR)$(bindir) |
174
c753db8eb446
* don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents:
161
diff
changeset
|
154 -rm -f $(DESTDIR)$(bindir)/$*$(EXEEXT) |
635
c95860b53363
Fix symlink target created by installdropbearmulti
Matt Johnston <matt@ucc.asn.au>
parents:
624
diff
changeset
|
155 -ln -s $(bindir)/dropbearmulti$(EXEEXT) $(DESTDIR)$(bindir)/$*$(EXEEXT) |
828
93e04b9ff676
- Fix "inst_scp" target since there isn't a manpage
Matt Johnston <matt@ucc.asn.au>
parents:
827
diff
changeset
|
156 $(INSTALL) -d $(DESTDIR)$(mandir)/man1 |
882
f05107560aa9
Fix so that "make install" for multi target won't fail on scp which doesn't
Mike Frysinger <vapier@gentoo.org>
parents:
881
diff
changeset
|
157 if test -e $*.1; then $(INSTALL) -m 644 $*.1 $(DESTDIR)$(mandir)/man1/$*.1; fi |
281
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
158 |
1037
7c899f24a85b
Some minor typo fixes, found by codespell.
Thorsten Horstmann <thorsten.horstmann@web.de>
parents:
993
diff
changeset
|
159 # dropbear should go in sbin, so it needs a separate 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
|
160 inst_dropbear: dropbear |
820
830fae485d40
Add manpage for dropbearconvert
Matt Johnston <matt@ucc.asn.au>
parents:
743
diff
changeset
|
161 $(INSTALL) -d $(DESTDIR)$(sbindir) |
830fae485d40
Add manpage for dropbearconvert
Matt Johnston <matt@ucc.asn.au>
parents:
743
diff
changeset
|
162 $(INSTALL) dropbear$(EXEEXT) $(DESTDIR)$(sbindir) |
830fae485d40
Add manpage for dropbearconvert
Matt Johnston <matt@ucc.asn.au>
parents:
743
diff
changeset
|
163 $(INSTALL) -d $(DESTDIR)$(mandir)/man8 |
993
1e496ad473bd
Fix installing dropbear.8 error when building in a separate directory.
Like Ma <likemartinma@gmail.com>
parents:
916
diff
changeset
|
164 $(INSTALL) -m 644 $(srcdir)/dropbear.8 $(DESTDIR)$(mandir)/man8/dropbear.8 |
281
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
165 |
916
803c1f0b019b
Fix "make install" dependency so that it works without prior "make"
Matt Johnston <matt@ucc.asn.au>
parents:
898
diff
changeset
|
166 inst_%: % |
820
830fae485d40
Add manpage for dropbearconvert
Matt Johnston <matt@ucc.asn.au>
parents:
743
diff
changeset
|
167 $(INSTALL) -d $(DESTDIR)$(bindir) |
830fae485d40
Add manpage for dropbearconvert
Matt Johnston <matt@ucc.asn.au>
parents:
743
diff
changeset
|
168 $(INSTALL) $*$(EXEEXT) $(DESTDIR)$(bindir) |
830fae485d40
Add manpage for dropbearconvert
Matt Johnston <matt@ucc.asn.au>
parents:
743
diff
changeset
|
169 $(INSTALL) -d $(DESTDIR)$(mandir)/man1 |
828
93e04b9ff676
- Fix "inst_scp" target since there isn't a manpage
Matt Johnston <matt@ucc.asn.au>
parents:
827
diff
changeset
|
170 if test -e $*.1; then $(INSTALL) -m 644 $*.1 $(DESTDIR)$(mandir)/man1/$*.1; fi |
93e04b9ff676
- Fix "inst_scp" target since there isn't a manpage
Matt Johnston <matt@ucc.asn.au>
parents:
827
diff
changeset
|
171 |
93e04b9ff676
- Fix "inst_scp" target since there isn't a manpage
Matt Johnston <matt@ucc.asn.au>
parents:
827
diff
changeset
|
172 inst_dropbearmulti: $(addprefix insmulti, $(PROGRAMS)) |
281
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
173 |
30
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
174 # 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
|
175 dropbear: $(dropbearobjs) |
30
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
176 dbclient: $(dbclientobjs) |
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
177 dropbearkey: $(dropbearkeyobjs) |
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
178 dropbearconvert: $(dropbearconvertobjs) |
281
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
179 |
890
d50c17fe57d7
Fix linking -lcrypt for systems without libcrypt in /usr/lib
Nicolas Boos <nicolas.boos@wanadoo.fr>
parents:
889
diff
changeset
|
180 dropbear: $(HEADERS) $(LIBTOM_DEPS) Makefile |
d50c17fe57d7
Fix linking -lcrypt for systems without libcrypt in /usr/lib
Nicolas Boos <nicolas.boos@wanadoo.fr>
parents:
889
diff
changeset
|
181 $(CC) $(LDFLAGS) -o $@$(EXEEXT) $($@objs) $(LIBTOM_LIBS) $(LIBS) @CRYPTLIB@ |
d50c17fe57d7
Fix linking -lcrypt for systems without libcrypt in /usr/lib
Nicolas Boos <nicolas.boos@wanadoo.fr>
parents:
889
diff
changeset
|
182 |
d50c17fe57d7
Fix linking -lcrypt for systems without libcrypt in /usr/lib
Nicolas Boos <nicolas.boos@wanadoo.fr>
parents:
889
diff
changeset
|
183 dbclient: $(HEADERS) $(LIBTOM_DEPS) Makefile |
889
3899ca4b65fd
Avoid linking dropbearconvert and dropbearkey to libz or libutil
Nicolas Boos <nicolas.boos@wanadoo.fr>
parents:
882
diff
changeset
|
184 $(CC) $(LDFLAGS) -o $@$(EXEEXT) $($@objs) $(LIBTOM_LIBS) $(LIBS) |
3899ca4b65fd
Avoid linking dropbearconvert and dropbearkey to libz or libutil
Nicolas Boos <nicolas.boos@wanadoo.fr>
parents:
882
diff
changeset
|
185 |
3899ca4b65fd
Avoid linking dropbearconvert and dropbearkey to libz or libutil
Nicolas Boos <nicolas.boos@wanadoo.fr>
parents:
882
diff
changeset
|
186 dropbearkey dropbearconvert: $(HEADERS) $(LIBTOM_DEPS) Makefile |
3899ca4b65fd
Avoid linking dropbearconvert and dropbearkey to libz or libutil
Nicolas Boos <nicolas.boos@wanadoo.fr>
parents:
882
diff
changeset
|
187 $(CC) $(LDFLAGS) -o $@$(EXEEXT) $($@objs) $(LIBTOM_LIBS) |
281
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
188 |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
189 # scp doesn't use the libs so is special. |
33 | 190 scp: $(SCPOBJS) $(HEADERS) Makefile |
366
59531221b846
Fix up separate-directory building for libtomcrypt
Matt Johnston <matt@ucc.asn.au>
parents:
319
diff
changeset
|
191 $(CC) $(LDFLAGS) -o $@$(EXEEXT) $(SCPOBJS) |
281
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
192 |
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
193 |
30
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
194 # multi-binary compilation. |
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
195 MULTIOBJS= |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
196 ifeq ($(MULTI),1) |
890
d50c17fe57d7
Fix linking -lcrypt for systems without libcrypt in /usr/lib
Nicolas Boos <nicolas.boos@wanadoo.fr>
parents:
889
diff
changeset
|
197 MULTIOBJS=dbmulti.o $(sort $(foreach prog, $(PROGRAMS), $($(prog)objs))) |
30
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
198 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
|
199 endif |
281
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
200 |
881
77972dc491ca
Turn dropbearmulti into a real target so we don't constantly re-link it
Mike Frysinger <vapier@gentoo.org>
parents:
858
diff
changeset
|
201 dropbearmulti$(EXEEXT): $(HEADERS) $(MULTIOBJS) $(LIBTOM_DEPS) Makefile |
890
d50c17fe57d7
Fix linking -lcrypt for systems without libcrypt in /usr/lib
Nicolas Boos <nicolas.boos@wanadoo.fr>
parents:
889
diff
changeset
|
202 $(CC) $(LDFLAGS) -o $@ $(MULTIOBJS) $(LIBTOM_LIBS) $(LIBS) @CRYPTLIB@ |
82
8f26145a0997
do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents:
81
diff
changeset
|
203 |
881
77972dc491ca
Turn dropbearmulti into a real target so we don't constantly re-link it
Mike Frysinger <vapier@gentoo.org>
parents:
858
diff
changeset
|
204 multibinary: dropbearmulti$(EXEEXT) |
82
8f26145a0997
do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents:
81
diff
changeset
|
205 |
8f26145a0997
do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents:
81
diff
changeset
|
206 multilink: multibinary $(addprefix link, $(PROGRAMS)) |
281
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
207 |
82
8f26145a0997
do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents:
81
diff
changeset
|
208 link%: |
174
c753db8eb446
* don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents:
161
diff
changeset
|
209 -rm -f $*$(EXEEXT) |
c753db8eb446
* don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents:
161
diff
changeset
|
210 -ln -s dropbearmulti$(EXEEXT) $*$(EXEEXT) |
281
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
211 |
1521
198e2ee0f4b1
- Fix dependencies and remove old default_options.h from version control
Matt Johnston <matt@ucc.asn.au>
parents:
1499
diff
changeset
|
212 $(STATIC_LTC): $(OPTION_HEADERS) |
1297
5abbecdecba4
Add generated header default_options.h to version control.
Matt Johnston <matt@ucc.asn.au>
parents:
1295
diff
changeset
|
213 $(MAKE) -C libtomcrypt |
281
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
214 |
1521
198e2ee0f4b1
- Fix dependencies and remove old default_options.h from version control
Matt Johnston <matt@ucc.asn.au>
parents:
1499
diff
changeset
|
215 $(STATIC_LTM): $(OPTION_HEADERS) |
1297
5abbecdecba4
Add generated header default_options.h to version control.
Matt Johnston <matt@ucc.asn.au>
parents:
1295
diff
changeset
|
216 $(MAKE) -C libtommath |
1295
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
1283
diff
changeset
|
217 |
366
59531221b846
Fix up separate-directory building for libtomcrypt
Matt Johnston <matt@ucc.asn.au>
parents:
319
diff
changeset
|
218 .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
|
219 |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
220 ltc-clean: |
1297
5abbecdecba4
Add generated header default_options.h to version control.
Matt Johnston <matt@ucc.asn.au>
parents:
1295
diff
changeset
|
221 $(MAKE) -C libtomcrypt clean |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
222 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
223 ltm-clean: |
1297
5abbecdecba4
Add generated header default_options.h to version control.
Matt Johnston <matt@ucc.asn.au>
parents:
1295
diff
changeset
|
224 $(MAKE) -C libtommath clean |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
225 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
226 sizes: dropbear |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
227 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
|
228 |
86 | 229 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
|
230 |
86 | 231 thisclean: |
1448
7dddc4dd7063
EXEEXT for a few more targets, dropbearmulti in particular for Cygwin
Matt Johnston <matt@ucc.asn.au>
parents:
1447
diff
changeset
|
232 -rm -f dropbear$(EXEEXT) dbclient$(EXEEXT) dropbearkey$(EXEEXT) \ |
7dddc4dd7063
EXEEXT for a few more targets, dropbearmulti in particular for Cygwin
Matt Johnston <matt@ucc.asn.au>
parents:
1447
diff
changeset
|
233 dropbearconvert$(EXEEXT) scp$(EXEEXT) scp-progress$(EXEEXT) \ |
7dddc4dd7063
EXEEXT for a few more targets, dropbearmulti in particular for Cygwin
Matt Johnston <matt@ucc.asn.au>
parents:
1447
diff
changeset
|
234 dropbearmulti$(EXEEXT) *.o *.da *.bb *.bbg *.prof |
281
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
235 |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
236 distclean: clean tidy |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
237 -rm -f config.h |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
238 -rm -f Makefile |
1521
198e2ee0f4b1
- Fix dependencies and remove old default_options.h from version control
Matt Johnston <matt@ucc.asn.au>
parents:
1499
diff
changeset
|
239 -rm -f default_options_guard.h |
281
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
240 |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
241 tidy: |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
242 -rm -f *~ *.gcov */*~ |
1295
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
1283
diff
changeset
|
243 |
1348 | 244 ## Fuzzing targets |
245 | |
1352
66c1cfd5e100
rename fuzzer -> fuzz-target, add list-fuzz-targets
Matt Johnston <matt@ucc.asn.au>
parents:
1351
diff
changeset
|
246 # list of fuzz targets |
1456
a90fdd2d2ed8
add fuzzer-preauth_nomaths
Matt Johnston <matt@ucc.asn.au>
parents:
1455
diff
changeset
|
247 FUZZ_TARGETS=fuzzer-preauth fuzzer-pubkey fuzzer-verify fuzzer-preauth_nomaths |
1352
66c1cfd5e100
rename fuzzer -> fuzz-target, add list-fuzz-targets
Matt Johnston <matt@ucc.asn.au>
parents:
1351
diff
changeset
|
248 |
1370
dd5d7b7141b9
create fuzzer .options files
Matt Johnston <matt@ucc.asn.au>
parents:
1369
diff
changeset
|
249 FUZZER_OPTIONS = $(addsuffix .options, $(FUZZ_TARGETS)) |
dd5d7b7141b9
create fuzzer .options files
Matt Johnston <matt@ucc.asn.au>
parents:
1369
diff
changeset
|
250 |
1352
66c1cfd5e100
rename fuzzer -> fuzz-target, add list-fuzz-targets
Matt Johnston <matt@ucc.asn.au>
parents:
1351
diff
changeset
|
251 list-fuzz-targets: |
66c1cfd5e100
rename fuzzer -> fuzz-target, add list-fuzz-targets
Matt Johnston <matt@ucc.asn.au>
parents:
1351
diff
changeset
|
252 @echo $(FUZZ_TARGETS) |
1348 | 253 |
254 # fuzzers that don't use libfuzzer, just a standalone harness that feeds inputs | |
1351
68e0e396af80
Use CXX to link fuzzer, also link with $FUZZLIB
Matt Johnston <matt@ucc.asn.au>
parents:
1348
diff
changeset
|
255 fuzzstandalone: FUZZLIB=fuzz-harness.o |
1352
66c1cfd5e100
rename fuzzer -> fuzz-target, add list-fuzz-targets
Matt Johnston <matt@ucc.asn.au>
parents:
1351
diff
changeset
|
256 fuzzstandalone: fuzz-harness.o fuzz-targets |
66c1cfd5e100
rename fuzzer -> fuzz-target, add list-fuzz-targets
Matt Johnston <matt@ucc.asn.au>
parents:
1351
diff
changeset
|
257 |
66c1cfd5e100
rename fuzzer -> fuzz-target, add list-fuzz-targets
Matt Johnston <matt@ucc.asn.au>
parents:
1351
diff
changeset
|
258 # exclude svr-main.o to avoid duplicate main |
66c1cfd5e100
rename fuzzer -> fuzz-target, add list-fuzz-targets
Matt Johnston <matt@ucc.asn.au>
parents:
1351
diff
changeset
|
259 svrfuzzobjs=$(subst svr-main.o, ,$(dropbearobjs)) |
1348 | 260 |
261 # build all the fuzzers. This will require fail to link unless built with | |
262 # make fuzzers LIBS=-lFuzzer.a | |
263 # or similar - the library provides main(). | |
1370
dd5d7b7141b9
create fuzzer .options files
Matt Johnston <matt@ucc.asn.au>
parents:
1369
diff
changeset
|
264 fuzz-targets: $(FUZZ_TARGETS) $(FUZZER_OPTIONS) |
1348 | 265 |
266 fuzzer-preauth: fuzzer-preauth.o $(HEADERS) $(LIBTOM_DEPS) Makefile $(svrfuzzobjs) | |
1351
68e0e396af80
Use CXX to link fuzzer, also link with $FUZZLIB
Matt Johnston <matt@ucc.asn.au>
parents:
1348
diff
changeset
|
267 $(CXX) $(CXXFLAGS) $@.o $(LDFLAGS) $(svrfuzzobjs) -o $@$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) $(FUZZLIB) @CRYPTLIB@ |
1348 | 268 |
1456
a90fdd2d2ed8
add fuzzer-preauth_nomaths
Matt Johnston <matt@ucc.asn.au>
parents:
1455
diff
changeset
|
269 fuzzer-preauth_nomaths: fuzzer-preauth_nomaths.o $(HEADERS) $(LIBTOM_DEPS) Makefile $(svrfuzzobjs) |
a90fdd2d2ed8
add fuzzer-preauth_nomaths
Matt Johnston <matt@ucc.asn.au>
parents:
1455
diff
changeset
|
270 $(CXX) $(CXXFLAGS) $@.o $(LDFLAGS) $(svrfuzzobjs) -o $@$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) $(FUZZLIB) @CRYPTLIB@ |
a90fdd2d2ed8
add fuzzer-preauth_nomaths
Matt Johnston <matt@ucc.asn.au>
parents:
1455
diff
changeset
|
271 |
a90fdd2d2ed8
add fuzzer-preauth_nomaths
Matt Johnston <matt@ucc.asn.au>
parents:
1455
diff
changeset
|
272 |
1369 | 273 fuzzer-pubkey: fuzzer-pubkey.o $(HEADERS) $(LIBTOM_DEPS) Makefile $(svrfuzzobjs) |
274 $(CXX) $(CXXFLAGS) $@.o $(LDFLAGS) $(svrfuzzobjs) -o $@$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) $(FUZZLIB) @CRYPTLIB@ | |
275 | |
1380 | 276 fuzzer-verify: fuzzer-verify.o $(HEADERS) $(LIBTOM_DEPS) Makefile $(svrfuzzobjs) |
277 $(CXX) $(CXXFLAGS) $@.o $(LDFLAGS) $(svrfuzzobjs) -o $@$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) $(FUZZLIB) @CRYPTLIB@ | |
278 | |
1370
dd5d7b7141b9
create fuzzer .options files
Matt Johnston <matt@ucc.asn.au>
parents:
1369
diff
changeset
|
279 fuzzer-%.options: Makefile |
dd5d7b7141b9
create fuzzer .options files
Matt Johnston <matt@ucc.asn.au>
parents:
1369
diff
changeset
|
280 echo "[libfuzzer]" > $@ |
dd5d7b7141b9
create fuzzer .options files
Matt Johnston <matt@ucc.asn.au>
parents:
1369
diff
changeset
|
281 echo "max_len = 50000" >> $@ |
dd5d7b7141b9
create fuzzer .options files
Matt Johnston <matt@ucc.asn.au>
parents:
1369
diff
changeset
|
282 |
1348 | 283 # run this to update hardcoded hostkeys for for fuzzing. |
284 # hostkeys.c is checked in to hg. | |
285 fuzz-hostkeys: | |
1347
b28624698130
copy over some fuzzing code from AFL branch
Matt Johnston <matt@ucc.asn.au>
parents:
1283
diff
changeset
|
286 dropbearkey -t rsa -f keyr |
b28624698130
copy over some fuzzing code from AFL branch
Matt Johnston <matt@ucc.asn.au>
parents:
1283
diff
changeset
|
287 dropbearkey -t dss -f keyd |
b28624698130
copy over some fuzzing code from AFL branch
Matt Johnston <matt@ucc.asn.au>
parents:
1283
diff
changeset
|
288 dropbearkey -t ecdsa -size 256 -f keye |
b28624698130
copy over some fuzzing code from AFL branch
Matt Johnston <matt@ucc.asn.au>
parents:
1283
diff
changeset
|
289 echo > hostkeys.c |
b28624698130
copy over some fuzzing code from AFL branch
Matt Johnston <matt@ucc.asn.au>
parents:
1283
diff
changeset
|
290 /usr/bin/xxd -i -a keyr >> hostkeys.c |
b28624698130
copy over some fuzzing code from AFL branch
Matt Johnston <matt@ucc.asn.au>
parents:
1283
diff
changeset
|
291 /usr/bin/xxd -i -a keye >> hostkeys.c |
b28624698130
copy over some fuzzing code from AFL branch
Matt Johnston <matt@ucc.asn.au>
parents:
1283
diff
changeset
|
292 /usr/bin/xxd -i -a keyd >> hostkeys.c |