Mercurial > dropbear
annotate Makefile.in @ 81:2a798efbb40b
dbclient works as "ssh" too
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Mon, 16 Aug 2004 14:53:49 +0000 |
parents | 0bf5cebe622c |
children | 8f26145a0997 |
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 |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
2 |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
3 # invocation: |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
4 # make PROGRAMS="dropbear dbclient scp" MULTI=1 STATIC=1 SCPPROGRESS=1 |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
5 # |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
6 # to make a single multiple statically linked binary "staticdropbearmulti", |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
7 # which includes dropbear, scp and dbclient functionality, and includes the |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
8 # progress-bar functionality in scp. Hopefully that seems intuitive. |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
9 |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
10 # This makefile is quite evil. |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
11 |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
12 ifndef PROGRAMS |
73
0bf5cebe622c
Dropbearkey can now print out pubkey portions
Matt Johnston <matt@ucc.asn.au>
parents:
68
diff
changeset
|
13 PROGRAMS=dropbear dbclient dropbearkey dropbearconvert |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
14 endif |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
15 |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
16 LTC=libtomcrypt/libtomcrypt.a |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
17 LTM=libtommath/libtommath.a |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
18 |
30
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
19 COMMONOBJS=dbutil.o buffer.o \ |
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
20 dss.o bignum.o \ |
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
21 signkey.o rsa.o random.o \ |
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
22 queue.o \ |
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
23 atomicio.o compat.o |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
24 |
23 | 25 SVROBJS=svr-kex.o svr-algo.o svr-auth.o sshpty.o \ |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
26 svr-authpasswd.o svr-authpubkey.o svr-session.o svr-service.o \ |
62 | 27 svr-chansession.o svr-runopts.o svr-agentfwd.o svr-main.o svr-x11fwd.o\ |
28 svr-tcpfwd.o | |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
29 |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
30 CLIOBJS=cli-algo.o cli-main.o cli-auth.o cli-authpasswd.o cli-kex.o \ |
55 | 31 cli-session.o cli-service.o cli-runopts.o cli-chansession.o \ |
62 | 32 cli-authpubkey.o cli-tcpfwd.o |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
33 |
30
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
34 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
|
35 common-channel.o common-chansession.o termcodes.o loginrec.o \ |
65
02e4a7f614f8
Oops, forgot to call the actual code.
Matt Johnston <matt@ucc.asn.au>
parents:
64
diff
changeset
|
36 tcp-accept.o listener.o process-packet.o \ |
67 | 37 common-runopts.o fake-rfc2553.o |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
38 |
30
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
39 KEYOBJS=dropbearkey.o gendss.o genrsa.o |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
40 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
41 CONVERTOBJS=dropbearconvert.o keyimport.o |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
42 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
43 SCPOBJS=scp.o progressmeter.o atomicio.o scpmisc.o |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
44 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
45 HEADERS=options.h dbutil.h session.h packet.h algo.h ssh.h buffer.h kex.h \ |
68
eee77ac31ccc
cleaning up the pubkey defines
Matt Johnston <matt@ucc.asn.au>
parents:
67
diff
changeset
|
46 dss.h bignum.h signkey.h rsa.h random.h service.h auth.h \ |
23 | 47 debug.h channel.h chansession.h config.h queue.h sshpty.h \ |
68
eee77ac31ccc
cleaning up the pubkey defines
Matt Johnston <matt@ucc.asn.au>
parents:
67
diff
changeset
|
48 termcodes.h gendss.h genrsa.h runopts.h includes.h \ |
64 | 49 loginrec.h atomicio.h x11fwd.h agentfwd.h tcpfwd.h compat.h \ |
67 | 50 listener.h fake-rfc2553.h |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
51 |
30
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
52 dropbearobjs=$(COMMONOBJS) $(CLISVROBJS) $(SVROBJS) |
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
53 dbclientobjs=$(COMMONOBJS) $(CLISVROBJS) $(CLIOBJS) |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
54 dropbearkeyobjs=$(COMMONOBJS) $(KEYOBJS) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
55 dropbearconvertobjs=$(COMMONOBJS) $(CONVERTOBJS) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
56 scpobjs=$(SCPOBJS) |
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 prefix=@prefix@ |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
59 exec_prefix=${prefix} |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
60 bindir=${exec_prefix}/bin |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
61 sbindir=${exec_prefix}/sbin |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
62 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
63 CC=@CC@ |
30
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
64 LD=@LD@ |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
65 AR=@AR@ |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
66 RANLIB=@RANLIB@ |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
67 STRIP=@STRIP@ |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
68 INSTALL=@INSTALL@ |
32
8fd0cdbb5b1b
forgot to include libtomcrypt dir
Matt Johnston <matt@ucc.asn.au>
parents:
31
diff
changeset
|
69 CFLAGS=-Ilibtomcrypt @CFLAGS@ |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
70 LIBS=$(LTC) $(LTM) @LIBS@ |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
71 LDFLAGS=@LDFLAGS@ |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
72 |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
73 EXEEXT=@EXEEXT@ |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
74 |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
75 # 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
|
76 # evilness so we detect 'dropbear' by itself as a word |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
77 space:= $(empty) $(empty) |
30
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
78 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
|
79 CFLAGS+= -DDROPBEAR_SERVER |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
80 endif |
30
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
81 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
|
82 CFLAGS+= -DDROPBEAR_CLIENT |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
83 endif |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
84 |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
85 |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
86 # 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
|
87 export CC |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
88 export CFLAGS |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
89 export RANLIB AR STRIP |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
90 |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
91 ifeq ($(STATIC), 1) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
92 LDFLAGS+=-static |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
93 SPREFIX=static |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
94 else |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
95 SPREFIX= |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
96 endif |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
97 |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
98 ifeq ($(MULTI), 1) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
99 TARGETS=dropbearmulti |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
100 else |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
101 TARGETS=$(PROGRAMS) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
102 endif |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
103 |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
104 # 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
|
105 ifeq ($(SCPPROGRESS), 1) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
106 CFLAGS+=-DPROGRESS_METER |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
107 endif |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
108 |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
109 #%: $(HEADERS) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
110 #%: $(HEADERS) Makefile |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
111 # TODO |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
112 |
30
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
113 all: $(TARGETS) |
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
114 |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
115 strip: $(TARGETS) |
30
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
116 $(STRIP) $(addsuffix $(EXEEXT), $(addprefix $(SPREFIX), $(TARGETS))) |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
117 |
30
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
118 install: $(addprefix install, $(TARGETS)) |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
119 |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
120 # dropbear should go in sbin, so it needs a seperate rule |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
121 installdropbear: dropbear |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
122 $(INSTALL) -d -m 755 $(DESTDIR)$(sbindir) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
123 $(INSTALL) -m 755 $(SPREFIX)dropbear$(EXEEXT) $(DESTDIR)$(sbindir) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
124 -chown root $(DESTDIR)$(sbindir)/$(SPREFIX)dropbear$(EXEEXT) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
125 -chgrp 0 $(DESTDIR)$(sbindir)/$(SPREFIX)dropbear$(EXEEXT) |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
126 |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
127 install%: $* |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
128 $(INSTALL) -d -m 755 $(DESTDIR)$(bindir) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
129 $(INSTALL) -m 755 $(SPREFIX)$*$(EXEEXT) $(DESTDIR)$(bindir) |
81 | 130 -chown root $(DESTDIR)$(bindir)/$(SPREFIX)$*$(EXEEXT) |
131 -chgrp 0 $(DESTDIR)$(bindir)/$(SPREFIX)$*$(EXEEXT) | |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
132 ifeq ($(MULTI), 1) |
30
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
133 @echo |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
134 @echo "You must manually create links for $*" |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
135 endif |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
136 |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
137 |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
138 |
30
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
139 # 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
|
140 dropbear: $(dropbearobjs) |
30
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
141 dbclient: $(dbclientobjs) |
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
142 dropbearkey: $(dropbearkeyobjs) |
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
143 dropbearconvert: $(dropbearconvertobjs) |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
144 |
33 | 145 dropbear dbclient dropbearkey dropbearconvert: $(HEADERS) $(LTC) $(LTM) \ |
146 Makefile | |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
147 $(LD) $(LDFLAGS) -o $(SPREFIX)$@$(EXEEXT) $($@objs) $(LIBS) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
148 |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
149 # scp doesn't use the libs so is special. |
33 | 150 scp: $(SCPOBJS) $(HEADERS) Makefile |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
151 $(LD) $(LDFLAGS) -o $(SPREFIX)$@$(EXEEXT) $(SCPOBJS) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
152 |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
153 |
30
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
154 # multi-binary compilation. |
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
155 MULTIOBJS= |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
156 ifeq ($(MULTI),1) |
30
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
157 MULTIOBJS=dbmulti.o $(sort $(foreach prog, $(PROGRAMS), $($(prog)objs))) |
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
158 CFLAGS+=$(addprefix -DDBMULTI_, $(PROGRAMS)) -DDROPBEAR_MULTI |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
159 endif |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
160 |
33 | 161 dropbearmulti: $(HEADERS) $(MULTIOBJS) $(LTC) $(LTM) Makefile |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
162 $(LD) $(LDFLAGS) -o $(SPREFIX)$@$(EXEEXT) $(MULTIOBJS) $(LIBS) |
30
223b0f5f8dce
Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents:
29
diff
changeset
|
163 @echo |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
164 @echo "You should now create symlinks to the programs you have included" |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
165 @echo "ie 'ln -s dropbearmulti dropbear'" |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
166 |
33 | 167 $(LTC): options.h |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
168 cd libtomcrypt && $(MAKE) clean && $(MAKE) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
169 |
33 | 170 $(LTM): options.h |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
171 cd libtommath && $(MAKE) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
172 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
173 ltc-clean: |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
174 cd libtomcrypt && $(MAKE) clean |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
175 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
176 ltm-clean: |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
177 cd libtommath && $(MAKE) clean |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
178 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
179 sizes: dropbear |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
180 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
|
181 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
182 clean: ltc-clean ltm-clean |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
183 -rm -f dropbear dbclient dropbearkey dropbearconvert scp scp-progress |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
184 -rm -f staticdropbear staticdropbearkey staticdropbearconvert staticscp |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
185 -rm -f dropbearmulti staticdropbearmulti |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
186 -rm -f *.o *.da *.bb *.bbg *.prof |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
187 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
188 distclean: clean tidy |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
189 -rm -f config.h |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
190 -rm -f Makefile |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
191 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
192 tidy: |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
193 -rm -f *~ *.gcov */*~ |