Mercurial > dropbear
annotate Makefile.in @ 1794:ed20d805b332
Disable UNAUTH_CLOSE_DELAY by default
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 02 Mar 2021 22:20:14 +0800 |
parents | 918e49decafa |
children | df7bfd2f7d45 |
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) |
1549
5212630893ab
only clean libtom when using bundled libraries
Matt Johnston <matt@ucc.asn.au>
parents:
1521
diff
changeset
|
22 LIBTOM_CLEAN=ltc-clean ltm-clean |
761
ac2158e3e403
ecc kind of works, needs fixing/testing
Matt Johnston <matt@ucc.asn.au>
parents:
756
diff
changeset
|
23 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
|
24 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
|
25 endif |
d194db6f9453
Use system libtomcrypt/libtommath if available. Doesn't currently
Matt Johnston <matt@ucc.asn.au>
parents:
570
diff
changeset
|
26 |
1521
198e2ee0f4b1
- Fix dependencies and remove old default_options.h from version control
Matt Johnston <matt@ucc.asn.au>
parents:
1499
diff
changeset
|
27 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
|
28 ifneq ($(wildcard localoptions.h),) |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
1283
diff
changeset
|
29 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
|
30 OPTION_HEADERS += localoptions.h |
1295
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
1283
diff
changeset
|
31 endif |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
1283
diff
changeset
|
32 |
1283
3017bc7d6238
move m_burn and function attributes to dbhelpers
Matt Johnston <matt@ucc.asn.au>
parents:
1224
diff
changeset
|
33 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
|
34 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
|
35 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
|
36 queue.o \ |
766 | 37 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
|
38 ltc_prng.o ecc.o ecdsa.o crypto_desc.o \ |
1659
d32bcb5c557d
Add Ed25519 support (#91)
Vladislav Grishenko <themiron@users.noreply.github.com>
parents:
1655
diff
changeset
|
39 curve25519.o ed25519.o \ |
1361
f9f930e1a516
add dbmalloc epoch cleanup
Matt Johnston <matt@ucc.asn.au>
parents:
1356
diff
changeset
|
40 dbmalloc.o \ |
1659
d32bcb5c557d
Add Ed25519 support (#91)
Vladislav Grishenko <themiron@users.noreply.github.com>
parents:
1655
diff
changeset
|
41 gensignkey.o gendss.o genrsa.o gened25519.o |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
42 |
741
eafdf8b363f5
Get rid of client/server specific buf_match_algo, use single
Matt Johnston <matt@ucc.asn.au>
parents:
635
diff
changeset
|
43 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
|
44 svr-authpasswd.o svr-authpubkey.o svr-authpubkeyoptions.o svr-session.o svr-service.o \ |
62 | 45 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
|
46 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
|
47 |
741
eafdf8b363f5
Get rid of client/server specific buf_match_algo, use single
Matt Johnston <matt@ucc.asn.au>
parents:
635
diff
changeset
|
48 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
|
49 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
|
50 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
|
51 cli-agentfwd.o |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
52 |
30
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
53 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
|
54 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
|
55 tcp-accept.o listener.o process-packet.o dh_groups.o \ |
1672
3a97f14c0235
Add Chacha20-Poly1305, AES128-GCM and AES256-GCM support (#93)
Vladislav Grishenko <themiron@users.noreply.github.com>
parents:
1659
diff
changeset
|
56 common-runopts.o circbuffer.o list.o netio.o chachapoly.o gcm.o |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
57 |
846
b298bb438625
refactor key generation, make it generate as required.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
58 KEYOBJS=dropbearkey.o |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
59 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
60 CONVERTOBJS=dropbearconvert.o keyimport.o |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
61 |
570
fb9a341e4454
- scp progressbar needs strlcat(), so add compat.o
Matt Johnston <matt@ucc.asn.au>
parents:
551
diff
changeset
|
62 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
|
63 |
1356
3677a510f545
add wrapfd. improve fuzzer in makefile
Matt Johnston <matt@ucc.asn.au>
parents:
1355
diff
changeset
|
64 ifeq (@DROPBEAR_FUZZ@, 1) |
1756
d5680e12ac33
Move fuzzing code to fuzz/ subdirectory, improve Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
1750
diff
changeset
|
65 allobjs = $(COMMONOBJS) fuzz/fuzz-common.o fuzz/fuzz-wrapfd.o $(CLISVROBJS) $(CLIOBJS) $(SVROBJS) @CRYPTLIB@ |
1559
92c93b4a3646
Fix to be able to compile normal(ish) binaries with --enable-fuzz
Matt Johnston <matt@ucc.asn.au>
parents:
1557
diff
changeset
|
66 allobjs:=$(subst svr-main.o, ,$(allobjs)) |
92c93b4a3646
Fix to be able to compile normal(ish) binaries with --enable-fuzz
Matt Johnston <matt@ucc.asn.au>
parents:
1557
diff
changeset
|
67 allobjs:=$(subst cli-main.o, ,$(allobjs)) |
1356
3677a510f545
add wrapfd. improve fuzzer in makefile
Matt Johnston <matt@ucc.asn.au>
parents:
1355
diff
changeset
|
68 |
1559
92c93b4a3646
Fix to be able to compile normal(ish) binaries with --enable-fuzz
Matt Johnston <matt@ucc.asn.au>
parents:
1557
diff
changeset
|
69 dropbearobjs=$(allobjs) svr-main.o |
92c93b4a3646
Fix to be able to compile normal(ish) binaries with --enable-fuzz
Matt Johnston <matt@ucc.asn.au>
parents:
1557
diff
changeset
|
70 dbclientobjs=$(allobjs) cli-main.o |
92c93b4a3646
Fix to be able to compile normal(ish) binaries with --enable-fuzz
Matt Johnston <matt@ucc.asn.au>
parents:
1557
diff
changeset
|
71 dropbearkeyobjs=$(allobjs) $(KEYOBJS) |
92c93b4a3646
Fix to be able to compile normal(ish) binaries with --enable-fuzz
Matt Johnston <matt@ucc.asn.au>
parents:
1557
diff
changeset
|
72 dropbearconvertobjs=$(allobjs) $(CONVERTOBJS) |
1582
68abf717328d
set up CXX for fuzzing build
Matt Johnston <matt@ucc.asn.au>
parents:
1574
diff
changeset
|
73 # CXX only set when fuzzing |
68abf717328d
set up CXX for fuzzing build
Matt Johnston <matt@ucc.asn.au>
parents:
1574
diff
changeset
|
74 CXX=@CXX@ |
1756
d5680e12ac33
Move fuzzing code to fuzz/ subdirectory, improve Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
1750
diff
changeset
|
75 FUZZ_CLEAN=fuzz-clean |
1559
92c93b4a3646
Fix to be able to compile normal(ish) binaries with --enable-fuzz
Matt Johnston <matt@ucc.asn.au>
parents:
1557
diff
changeset
|
76 else |
92c93b4a3646
Fix to be able to compile normal(ish) binaries with --enable-fuzz
Matt Johnston <matt@ucc.asn.au>
parents:
1557
diff
changeset
|
77 dropbearobjs=$(COMMONOBJS) $(CLISVROBJS) $(SVROBJS) |
92c93b4a3646
Fix to be able to compile normal(ish) binaries with --enable-fuzz
Matt Johnston <matt@ucc.asn.au>
parents:
1557
diff
changeset
|
78 dbclientobjs=$(COMMONOBJS) $(CLISVROBJS) $(CLIOBJS) |
92c93b4a3646
Fix to be able to compile normal(ish) binaries with --enable-fuzz
Matt Johnston <matt@ucc.asn.au>
parents:
1557
diff
changeset
|
79 dropbearkeyobjs=$(COMMONOBJS) $(KEYOBJS) |
92c93b4a3646
Fix to be able to compile normal(ish) binaries with --enable-fuzz
Matt Johnston <matt@ucc.asn.au>
parents:
1557
diff
changeset
|
80 dropbearconvertobjs=$(COMMONOBJS) $(CONVERTOBJS) |
92c93b4a3646
Fix to be able to compile normal(ish) binaries with --enable-fuzz
Matt Johnston <matt@ucc.asn.au>
parents:
1557
diff
changeset
|
81 scpobjs=$(SCPOBJS) |
92c93b4a3646
Fix to be able to compile normal(ish) binaries with --enable-fuzz
Matt Johnston <matt@ucc.asn.au>
parents:
1557
diff
changeset
|
82 endif |
281
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
83 |
1654 | 84 ifeq (@DROPBEAR_PLUGIN@, 1) |
1653
76189c9ffea2
External Public-Key Authentication API (#72)
fabriziobertocci <fabriziobertocci@gmail.com>
parents:
1591
diff
changeset
|
85 # rdynamic makes all the global symbols of dropbear available to all the loaded shared libraries |
76189c9ffea2
External Public-Key Authentication API (#72)
fabriziobertocci <fabriziobertocci@gmail.com>
parents:
1591
diff
changeset
|
86 # this allow a plugin to reuse existing crypto/utilities like base64_decode/base64_encode without |
76189c9ffea2
External Public-Key Authentication API (#72)
fabriziobertocci <fabriziobertocci@gmail.com>
parents:
1591
diff
changeset
|
87 # the need to rewrite them. |
1654 | 88 PLUGIN_LIBS=-ldl -rdynamic |
1653
76189c9ffea2
External Public-Key Authentication API (#72)
fabriziobertocci <fabriziobertocci@gmail.com>
parents:
1591
diff
changeset
|
89 else |
1654 | 90 PLUGIN_LIBS= |
1653
76189c9ffea2
External Public-Key Authentication API (#72)
fabriziobertocci <fabriziobertocci@gmail.com>
parents:
1591
diff
changeset
|
91 endif |
76189c9ffea2
External Public-Key Authentication API (#72)
fabriziobertocci <fabriziobertocci@gmail.com>
parents:
1591
diff
changeset
|
92 |
281
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
93 VPATH=@srcdir@ |
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
94 srcdir=@srcdir@ |
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 prefix=@prefix@ |
827
4a788a3162a1
Add @exec_prefix@ that was missing
Matt Johnston <matt@ucc.asn.au>
parents:
820
diff
changeset
|
97 exec_prefix=@exec_prefix@ |
820
830fae485d40
Add manpage for dropbearconvert
Matt Johnston <matt@ucc.asn.au>
parents:
743
diff
changeset
|
98 datarootdir = @datarootdir@ |
830fae485d40
Add manpage for dropbearconvert
Matt Johnston <matt@ucc.asn.au>
parents:
743
diff
changeset
|
99 bindir=@bindir@ |
830fae485d40
Add manpage for dropbearconvert
Matt Johnston <matt@ucc.asn.au>
parents:
743
diff
changeset
|
100 sbindir=@sbindir@ |
830fae485d40
Add manpage for dropbearconvert
Matt Johnston <matt@ucc.asn.au>
parents:
743
diff
changeset
|
101 mandir=@mandir@ |
281
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
102 |
1295
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
1283
diff
changeset
|
103 .DELETE_ON_ERROR: |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
1283
diff
changeset
|
104 |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
105 CC=@CC@ |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
106 AR=@AR@ |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
107 RANLIB=@RANLIB@ |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
108 STRIP=@STRIP@ |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
109 INSTALL=@INSTALL@ |
319 | 110 CPPFLAGS=@CPPFLAGS@ |
587
1151059c5eff
Work properly again with bundled libtom*. autoconf is a hassle.
Matt Johnston <matt@ucc.asn.au>
parents:
585
diff
changeset
|
111 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
|
112 LIBS+=@LIBS@ |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
113 LDFLAGS=@LDFLAGS@ |
281
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
114 |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
115 EXEEXT=@EXEEXT@ |
281
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
116 |
1446
b8764eee6bdb
add --enable-static configure argument. disable conflicting harden flags
Matt Johnston <matt@ucc.asn.au>
parents:
1297
diff
changeset
|
117 STATIC=@STATIC@ |
b8764eee6bdb
add --enable-static configure argument. disable conflicting harden flags
Matt Johnston <matt@ucc.asn.au>
parents:
1297
diff
changeset
|
118 |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
119 # 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
|
120 # 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
|
121 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
|
122 CFLAGS+= -DDROPBEAR_SERVER |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
123 endif |
30
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
124 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
|
125 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
|
126 endif |
999a5eb4ed10
propagate from branch 'au.asn.ucc.matt.ltc.orig' (head 52840647ac7f5c707c3bd158d119a15734a7ef28)
Matt Johnston <matt@ucc.asn.au>
parents:
281
diff
changeset
|
127 |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
128 # 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
|
129 export CC |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
130 export CFLAGS |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
131 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
|
132 |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
133 ifeq ($(STATIC), 1) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
134 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
|
135 endif |
999a5eb4ed10
propagate from branch 'au.asn.ucc.matt.ltc.orig' (head 52840647ac7f5c707c3bd158d119a15734a7ef28)
Matt Johnston <matt@ucc.asn.au>
parents:
281
diff
changeset
|
136 |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
137 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
|
138 TARGETS=dropbearmulti$(EXEEXT) |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
139 else |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
140 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
|
141 endif |
281
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
142 |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
143 # 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
|
144 ifeq ($(SCPPROGRESS), 1) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
145 CFLAGS+=-DPROGRESS_METER |
281
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
146 endif |
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
147 |
30
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
148 all: $(TARGETS) |
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
149 |
1521
198e2ee0f4b1
- Fix dependencies and remove old default_options.h from version control
Matt Johnston <matt@ucc.asn.au>
parents:
1499
diff
changeset
|
150 # 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
|
151 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
|
152 %.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
|
153 $(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
|
154 |
198e2ee0f4b1
- Fix dependencies and remove old default_options.h from version control
Matt Johnston <matt@ucc.asn.au>
parents:
1499
diff
changeset
|
155 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
|
156 @echo Creating $@ |
198e2ee0f4b1
- Fix dependencies and remove old default_options.h from version control
Matt Johnston <matt@ucc.asn.au>
parents:
1499
diff
changeset
|
157 @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
|
158 @$(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
|
159 @mv $@.tmp $@ |
1492 | 160 |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
161 strip: $(TARGETS) |
174
c753db8eb446
* don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents:
161
diff
changeset
|
162 $(STRIP) $(addsuffix $(EXEEXT), $(TARGETS)) |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
163 |
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
|
164 install: $(addprefix inst_, $(TARGETS)) |
82
8f26145a0997
do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents:
81
diff
changeset
|
165 |
1448
7dddc4dd7063
EXEEXT for a few more targets, dropbearmulti in particular for Cygwin
Matt Johnston <matt@ucc.asn.au>
parents:
1447
diff
changeset
|
166 insmultidropbear: dropbearmulti$(EXEEXT) |
820
830fae485d40
Add manpage for dropbearconvert
Matt Johnston <matt@ucc.asn.au>
parents:
743
diff
changeset
|
167 $(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
|
168 -rm -f $(DESTDIR)$(sbindir)/dropbear$(EXEEXT) |
635
c95860b53363
Fix symlink target created by installdropbearmulti
Matt Johnston <matt@ucc.asn.au>
parents:
624
diff
changeset
|
169 -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
|
170 $(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
|
171 $(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
|
172 |
1448
7dddc4dd7063
EXEEXT for a few more targets, dropbearmulti in particular for Cygwin
Matt Johnston <matt@ucc.asn.au>
parents:
1447
diff
changeset
|
173 insmulti%: dropbearmulti$(EXEEXT) |
820
830fae485d40
Add manpage for dropbearconvert
Matt Johnston <matt@ucc.asn.au>
parents:
743
diff
changeset
|
174 $(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
|
175 -rm -f $(DESTDIR)$(bindir)/$*$(EXEEXT) |
635
c95860b53363
Fix symlink target created by installdropbearmulti
Matt Johnston <matt@ucc.asn.au>
parents:
624
diff
changeset
|
176 -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
|
177 $(INSTALL) -d $(DESTDIR)$(mandir)/man1 |
1718
72bb7fb1fced
Fix "make install" for manpages in out-of-tree builds
Gabor Z. Papp <gzp@papp.hu>
parents:
1683
diff
changeset
|
178 if test -e $(srcdir)/$*.1; then $(INSTALL) -m 644 $(srcdir)/$*.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
|
179 |
1037
7c899f24a85b
Some minor typo fixes, found by codespell.
Thorsten Horstmann <thorsten.horstmann@web.de>
parents:
993
diff
changeset
|
180 # 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
|
181 inst_dropbear: dropbear |
820
830fae485d40
Add manpage for dropbearconvert
Matt Johnston <matt@ucc.asn.au>
parents:
743
diff
changeset
|
182 $(INSTALL) -d $(DESTDIR)$(sbindir) |
830fae485d40
Add manpage for dropbearconvert
Matt Johnston <matt@ucc.asn.au>
parents:
743
diff
changeset
|
183 $(INSTALL) dropbear$(EXEEXT) $(DESTDIR)$(sbindir) |
830fae485d40
Add manpage for dropbearconvert
Matt Johnston <matt@ucc.asn.au>
parents:
743
diff
changeset
|
184 $(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
|
185 $(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
|
186 |
916
803c1f0b019b
Fix "make install" dependency so that it works without prior "make"
Matt Johnston <matt@ucc.asn.au>
parents:
898
diff
changeset
|
187 inst_%: % |
820
830fae485d40
Add manpage for dropbearconvert
Matt Johnston <matt@ucc.asn.au>
parents:
743
diff
changeset
|
188 $(INSTALL) -d $(DESTDIR)$(bindir) |
830fae485d40
Add manpage for dropbearconvert
Matt Johnston <matt@ucc.asn.au>
parents:
743
diff
changeset
|
189 $(INSTALL) $*$(EXEEXT) $(DESTDIR)$(bindir) |
830fae485d40
Add manpage for dropbearconvert
Matt Johnston <matt@ucc.asn.au>
parents:
743
diff
changeset
|
190 $(INSTALL) -d $(DESTDIR)$(mandir)/man1 |
1718
72bb7fb1fced
Fix "make install" for manpages in out-of-tree builds
Gabor Z. Papp <gzp@papp.hu>
parents:
1683
diff
changeset
|
191 if test -e $(srcdir)/$*.1; then $(INSTALL) -m 644 $(srcdir)/$*.1 $(DESTDIR)$(mandir)/man1/$*.1; fi |
828
93e04b9ff676
- Fix "inst_scp" target since there isn't a manpage
Matt Johnston <matt@ucc.asn.au>
parents:
827
diff
changeset
|
192 |
93e04b9ff676
- Fix "inst_scp" target since there isn't a manpage
Matt Johnston <matt@ucc.asn.au>
parents:
827
diff
changeset
|
193 inst_dropbearmulti: $(addprefix insmulti, $(PROGRAMS)) |
281
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
194 |
30
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
195 # 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
|
196 dropbear: $(dropbearobjs) |
30
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
197 dbclient: $(dbclientobjs) |
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
198 dropbearkey: $(dropbearkeyobjs) |
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
199 dropbearconvert: $(dropbearconvertobjs) |
281
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
200 |
890
d50c17fe57d7
Fix linking -lcrypt for systems without libcrypt in /usr/lib
Nicolas Boos <nicolas.boos@wanadoo.fr>
parents:
889
diff
changeset
|
201 dropbear: $(HEADERS) $(LIBTOM_DEPS) Makefile |
1654 | 202 $(CC) $(LDFLAGS) -o $@$(EXEEXT) $($@objs) $(LIBTOM_LIBS) $(LIBS) @CRYPTLIB@ $(PLUGIN_LIBS) |
890
d50c17fe57d7
Fix linking -lcrypt for systems without libcrypt in /usr/lib
Nicolas Boos <nicolas.boos@wanadoo.fr>
parents:
889
diff
changeset
|
203 |
d50c17fe57d7
Fix linking -lcrypt for systems without libcrypt in /usr/lib
Nicolas Boos <nicolas.boos@wanadoo.fr>
parents:
889
diff
changeset
|
204 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
|
205 $(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
|
206 |
3899ca4b65fd
Avoid linking dropbearconvert and dropbearkey to libz or libutil
Nicolas Boos <nicolas.boos@wanadoo.fr>
parents:
882
diff
changeset
|
207 dropbearkey dropbearconvert: $(HEADERS) $(LIBTOM_DEPS) Makefile |
1559
92c93b4a3646
Fix to be able to compile normal(ish) binaries with --enable-fuzz
Matt Johnston <matt@ucc.asn.au>
parents:
1557
diff
changeset
|
208 $(CC) $(LDFLAGS) -o $@$(EXEEXT) $($@objs) $(LIBTOM_LIBS) $(LIBS) |
281
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
209 |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
210 # scp doesn't use the libs so is special. |
33 | 211 scp: $(SCPOBJS) $(HEADERS) Makefile |
366
59531221b846
Fix up separate-directory building for libtomcrypt
Matt Johnston <matt@ucc.asn.au>
parents:
319
diff
changeset
|
212 $(CC) $(LDFLAGS) -o $@$(EXEEXT) $(SCPOBJS) |
281
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
213 |
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
214 |
30
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
215 # multi-binary compilation. |
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
216 MULTIOBJS= |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
217 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
|
218 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
|
219 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
|
220 endif |
281
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
221 |
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
|
222 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
|
223 $(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
|
224 |
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
|
225 multibinary: dropbearmulti$(EXEEXT) |
82
8f26145a0997
do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents:
81
diff
changeset
|
226 |
8f26145a0997
do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents:
81
diff
changeset
|
227 multilink: multibinary $(addprefix link, $(PROGRAMS)) |
281
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
228 |
82
8f26145a0997
do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents:
81
diff
changeset
|
229 link%: |
174
c753db8eb446
* don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents:
161
diff
changeset
|
230 -rm -f $*$(EXEEXT) |
c753db8eb446
* don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents:
161
diff
changeset
|
231 -ln -s dropbearmulti$(EXEEXT) $*$(EXEEXT) |
281
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
232 |
1521
198e2ee0f4b1
- Fix dependencies and remove old default_options.h from version control
Matt Johnston <matt@ucc.asn.au>
parents:
1499
diff
changeset
|
233 $(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
|
234 $(MAKE) -C libtomcrypt |
281
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
235 |
1521
198e2ee0f4b1
- Fix dependencies and remove old default_options.h from version control
Matt Johnston <matt@ucc.asn.au>
parents:
1499
diff
changeset
|
236 $(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
|
237 $(MAKE) -C libtommath |
1295
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
1283
diff
changeset
|
238 |
1679 | 239 .PHONY : clean sizes thisclean distclean tidy ltc-clean ltm-clean lint |
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 ltc-clean: |
1297
5abbecdecba4
Add generated header default_options.h to version control.
Matt Johnston <matt@ucc.asn.au>
parents:
1295
diff
changeset
|
242 $(MAKE) -C libtomcrypt clean |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
243 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
244 ltm-clean: |
1297
5abbecdecba4
Add generated header default_options.h to version control.
Matt Johnston <matt@ucc.asn.au>
parents:
1295
diff
changeset
|
245 $(MAKE) -C libtommath clean |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
246 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
247 sizes: dropbear |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
248 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
|
249 |
1756
d5680e12ac33
Move fuzzing code to fuzz/ subdirectory, improve Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
1750
diff
changeset
|
250 clean: $(LIBTOM_CLEAN) $(FUZZ_CLEAN) thisclean |
281
997e6f7dc01e
Just import the Dropbear 0.47 libtomcrypt changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
251 |
86 | 252 thisclean: |
1448
7dddc4dd7063
EXEEXT for a few more targets, dropbearmulti in particular for Cygwin
Matt Johnston <matt@ucc.asn.au>
parents:
1447
diff
changeset
|
253 -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
|
254 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
|
255 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
|
256 |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
257 distclean: clean tidy |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
258 -rm -f config.h |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
259 -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
|
260 -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
|
261 |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
262 tidy: |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
263 -rm -f *~ *.gcov */*~ |
1295
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
1283
diff
changeset
|
264 |
1679 | 265 lint: |
266 cd $(srcdir); ./dropbear_lint.sh | |
267 | |
1348 | 268 ## Fuzzing targets |
269 | |
1352
66c1cfd5e100
rename fuzzer -> fuzz-target, add list-fuzz-targets
Matt Johnston <matt@ucc.asn.au>
parents:
1351
diff
changeset
|
270 # list of fuzz targets |
1741
d1b279aa5ed1
Get client fuzzer building and starting (fails straight away)
Matt Johnston <matt@ucc.asn.au>
parents:
1718
diff
changeset
|
271 FUZZ_TARGETS=fuzzer-preauth fuzzer-pubkey fuzzer-verify fuzzer-preauth_nomaths \ |
1777
97ad26e397a5
Add server postauth fuzzer, wrap connect_remote()
Matt Johnston <matt@ucc.asn.au>
parents:
1775
diff
changeset
|
272 fuzzer-kexdh fuzzer-kexecdh fuzzer-kexcurve25519 fuzzer-client fuzzer-client_nomaths \ |
97ad26e397a5
Add server postauth fuzzer, wrap connect_remote()
Matt Johnston <matt@ucc.asn.au>
parents:
1775
diff
changeset
|
273 fuzzer-postauth_nomaths |
1352
66c1cfd5e100
rename fuzzer -> fuzz-target, add list-fuzz-targets
Matt Johnston <matt@ucc.asn.au>
parents:
1351
diff
changeset
|
274 |
1370
dd5d7b7141b9
create fuzzer .options files
Matt Johnston <matt@ucc.asn.au>
parents:
1369
diff
changeset
|
275 FUZZER_OPTIONS = $(addsuffix .options, $(FUZZ_TARGETS)) |
1765
b688c884dad7
Fix fuzz-sshpacketmutator to work
Matt Johnston <matt@ucc.asn.au>
parents:
1760
diff
changeset
|
276 FUZZ_OBJS = $(addprefix fuzz/,$(addsuffix .o,$(FUZZ_TARGETS))) \ |
b688c884dad7
Fix fuzz-sshpacketmutator to work
Matt Johnston <matt@ucc.asn.au>
parents:
1760
diff
changeset
|
277 fuzz/fuzz-sshpacketmutator.o |
1370
dd5d7b7141b9
create fuzzer .options files
Matt Johnston <matt@ucc.asn.au>
parents:
1369
diff
changeset
|
278 |
1352
66c1cfd5e100
rename fuzzer -> fuzz-target, add list-fuzz-targets
Matt Johnston <matt@ucc.asn.au>
parents:
1351
diff
changeset
|
279 list-fuzz-targets: |
66c1cfd5e100
rename fuzzer -> fuzz-target, add list-fuzz-targets
Matt Johnston <matt@ucc.asn.au>
parents:
1351
diff
changeset
|
280 @echo $(FUZZ_TARGETS) |
1348 | 281 |
282 # fuzzers that don't use libfuzzer, just a standalone harness that feeds inputs | |
1756
d5680e12ac33
Move fuzzing code to fuzz/ subdirectory, improve Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
1750
diff
changeset
|
283 fuzzstandalone: FUZZLIB=fuzz/fuzz-harness.o |
d5680e12ac33
Move fuzzing code to fuzz/ subdirectory, improve Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
1750
diff
changeset
|
284 fuzzstandalone: fuzz/fuzz-harness.o fuzz-targets |
1352
66c1cfd5e100
rename fuzzer -> fuzz-target, add list-fuzz-targets
Matt Johnston <matt@ucc.asn.au>
parents:
1351
diff
changeset
|
285 |
1756
d5680e12ac33
Move fuzzing code to fuzz/ subdirectory, improve Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
1750
diff
changeset
|
286 # Build all the fuzzers. Usually like |
d5680e12ac33
Move fuzzing code to fuzz/ subdirectory, improve Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
1750
diff
changeset
|
287 # make fuzz-targets FUZZLIB=-lFuzzer.a |
d5680e12ac33
Move fuzzing code to fuzz/ subdirectory, improve Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
1750
diff
changeset
|
288 # the library provides main(). Otherwise |
d5680e12ac33
Move fuzzing code to fuzz/ subdirectory, improve Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
1750
diff
changeset
|
289 # make fuzzstandalone |
d5680e12ac33
Move fuzzing code to fuzz/ subdirectory, improve Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
1750
diff
changeset
|
290 # provides a main in fuzz-harness.c |
1370
dd5d7b7141b9
create fuzzer .options files
Matt Johnston <matt@ucc.asn.au>
parents:
1369
diff
changeset
|
291 fuzz-targets: $(FUZZ_TARGETS) $(FUZZER_OPTIONS) |
1348 | 292 |
1756
d5680e12ac33
Move fuzzing code to fuzz/ subdirectory, improve Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
1750
diff
changeset
|
293 $(FUZZ_TARGETS): $(FUZZ_OBJS) $(allobjs) $(LIBTOM_DEPS) |
1775
8179eabe16c9
fuzzing - fix some wrong types and -lcrypt on macos
Matt Johnston <matt@ucc.asn.au>
parents:
1771
diff
changeset
|
294 $(CXX) $(CXXFLAGS) fuzz/$@.o $(LDFLAGS) $(allobjs) -o $@$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) $(FUZZLIB) @CRYPTLIB@ |
1742
6e71440b1e47
Add fuzzer-client_nomaths, fix client fuzzer
Matt Johnston <matt@ucc.asn.au>
parents:
1741
diff
changeset
|
295 |
1771
af9ed0815818
Use SSH packet mutator for preauth too
Matt Johnston <matt@ucc.asn.au>
parents:
1767
diff
changeset
|
296 # fuzzers that use the custom mutator - these expect a SSH network stream |
af9ed0815818
Use SSH packet mutator for preauth too
Matt Johnston <matt@ucc.asn.au>
parents:
1767
diff
changeset
|
297 MUTATOR_FUZZERS=fuzzer-client fuzzer-client_nomaths \ |
1777
97ad26e397a5
Add server postauth fuzzer, wrap connect_remote()
Matt Johnston <matt@ucc.asn.au>
parents:
1775
diff
changeset
|
298 fuzzer-preauth fuzzer-preauth_nomaths fuzzer-postauth_nomaths |
1783
918e49decafa
fuzz: skip custom mutators with -fsanitize=memory
Matt Johnston <matt@ucc.asn.au>
parents:
1777
diff
changeset
|
299 |
918e49decafa
fuzz: skip custom mutators with -fsanitize=memory
Matt Johnston <matt@ucc.asn.au>
parents:
1777
diff
changeset
|
300 # Skip custom mutators for -fsanitize-memory since libfuzzer doesn't initialise memory |
918e49decafa
fuzz: skip custom mutators with -fsanitize=memory
Matt Johnston <matt@ucc.asn.au>
parents:
1777
diff
changeset
|
301 # Pending fix for it https://github.com/google/oss-fuzz/issues/4605 |
918e49decafa
fuzz: skip custom mutators with -fsanitize=memory
Matt Johnston <matt@ucc.asn.au>
parents:
1777
diff
changeset
|
302 ifeq (,$(findstring fsanitize=memory, $(CFLAGS))) |
1771
af9ed0815818
Use SSH packet mutator for preauth too
Matt Johnston <matt@ucc.asn.au>
parents:
1767
diff
changeset
|
303 $(MUTATOR_FUZZERS): allobjs += fuzz/fuzz-sshpacketmutator.o |
1783
918e49decafa
fuzz: skip custom mutators with -fsanitize=memory
Matt Johnston <matt@ucc.asn.au>
parents:
1777
diff
changeset
|
304 endif |
1765
b688c884dad7
Fix fuzz-sshpacketmutator to work
Matt Johnston <matt@ucc.asn.au>
parents:
1760
diff
changeset
|
305 |
1370
dd5d7b7141b9
create fuzzer .options files
Matt Johnston <matt@ucc.asn.au>
parents:
1369
diff
changeset
|
306 fuzzer-%.options: Makefile |
dd5d7b7141b9
create fuzzer .options files
Matt Johnston <matt@ucc.asn.au>
parents:
1369
diff
changeset
|
307 echo "[libfuzzer]" > $@ |
dd5d7b7141b9
create fuzzer .options files
Matt Johnston <matt@ucc.asn.au>
parents:
1369
diff
changeset
|
308 echo "max_len = 50000" >> $@ |
dd5d7b7141b9
create fuzzer .options files
Matt Johnston <matt@ucc.asn.au>
parents:
1369
diff
changeset
|
309 |
1348 | 310 # run this to update hardcoded hostkeys for for fuzzing. |
311 # hostkeys.c is checked in to hg. | |
312 fuzz-hostkeys: | |
1347
b28624698130
copy over some fuzzing code from AFL branch
Matt Johnston <matt@ucc.asn.au>
parents:
1283
diff
changeset
|
313 dropbearkey -t rsa -f keyr |
b28624698130
copy over some fuzzing code from AFL branch
Matt Johnston <matt@ucc.asn.au>
parents:
1283
diff
changeset
|
314 dropbearkey -t dss -f keyd |
b28624698130
copy over some fuzzing code from AFL branch
Matt Johnston <matt@ucc.asn.au>
parents:
1283
diff
changeset
|
315 dropbearkey -t ecdsa -size 256 -f keye |
1659
d32bcb5c557d
Add Ed25519 support (#91)
Vladislav Grishenko <themiron@users.noreply.github.com>
parents:
1655
diff
changeset
|
316 dropbearkey -t ed25519 -f keyed25519 |
1347
b28624698130
copy over some fuzzing code from AFL branch
Matt Johnston <matt@ucc.asn.au>
parents:
1283
diff
changeset
|
317 echo > hostkeys.c |
b28624698130
copy over some fuzzing code from AFL branch
Matt Johnston <matt@ucc.asn.au>
parents:
1283
diff
changeset
|
318 /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
|
319 /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
|
320 /usr/bin/xxd -i -a keyd >> hostkeys.c |
1659
d32bcb5c557d
Add Ed25519 support (#91)
Vladislav Grishenko <themiron@users.noreply.github.com>
parents:
1655
diff
changeset
|
321 /usr/bin/xxd -i -a keyed25519 >> hostkeys.c |
1756
d5680e12ac33
Move fuzzing code to fuzz/ subdirectory, improve Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
1750
diff
changeset
|
322 |
d5680e12ac33
Move fuzzing code to fuzz/ subdirectory, improve Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
1750
diff
changeset
|
323 fuzz-clean: |
d5680e12ac33
Move fuzzing code to fuzz/ subdirectory, improve Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
1750
diff
changeset
|
324 -rm -f fuzz/*.o $(FUZZ_TARGETS) $(FUZZER_OPTIONS) |