Mercurial > dropbear
annotate Makefile.in @ 29:0fcf63e1cb01
Totally reworked Makefile.in
Doesn't totally work, but getting there
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 27 Jul 2004 13:32:54 +0000 |
parents | 469950e86d0f |
children | 223b0f5f8dce |
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 |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
13 PROGRAMS="dropbear dbclient dropbearkey dropbearmulti" |
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 |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
19 COMMONOBJS=dbutil.o common-session.o packet.o common-algo.o buffer.o \ |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
20 common-kex.o dss.o bignum.o \ |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
21 signkey.o rsa.o random.o common-channel.o \ |
9
7f77962de998
- Reworked non-channel fd handling to listener.c
Matt Johnston <matt@ucc.asn.au>
parents:
4
diff
changeset
|
22 common-chansession.o queue.o termcodes.o \ |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
23 loginrec.o atomicio.o tcpfwd-direct.o compat.o \ |
24 | 24 tcpfwd-remote.o listener.o process-packet.o common-runopts.o |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
25 |
23 | 26 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
|
27 svr-authpasswd.o svr-authpubkey.o svr-session.o svr-service.o \ |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
28 svr-chansession.o svr-runopts.o svr-agentfwd.o svr-main.o svr-x11fwd.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 \ |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
31 cli-session.o cli-service.o |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
32 |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
33 DROPBEAROBJS= |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
34 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
35 DROPBEARKEYOBJS=dropbearkey.o gendss.o genrsa.o |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
36 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
37 CONVERTOBJS=dropbearconvert.o keyimport.o |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
38 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
39 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
|
40 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
41 HEADERS=options.h dbutil.h session.h packet.h algo.h ssh.h buffer.h kex.h \ |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
42 dss.h bignum.h signkey.h rsa.h random.h service.h auth.h authpasswd.h \ |
23 | 43 debug.h channel.h chansession.h config.h queue.h sshpty.h \ |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
44 termcodes.h gendss.h genrsa.h authpubkey.h runopts.h includes.h \ |
9
7f77962de998
- Reworked non-channel fd handling to listener.c
Matt Johnston <matt@ucc.asn.au>
parents:
4
diff
changeset
|
45 loginrec.h atomicio.h x11fwd.h agentfwd.h tcpfwd-direct.h compat.h \ |
7f77962de998
- Reworked non-channel fd handling to listener.c
Matt Johnston <matt@ucc.asn.au>
parents:
4
diff
changeset
|
46 tcpfwd-remote.h listener.h |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
47 |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
48 dropbearobjs=$(COMMONOBJS) $(SVROBJS) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
49 dbclientobjs=$(COMMONOBJS) $(CLIOBJS) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
50 dropbearkeyobjs=$(COMMONOBJS) $(KEYOBJS) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
51 dropbearconvertobjs=$(COMMONOBJS) $(CONVERTOBJS) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
52 scpobjs=$(SCPOBJS) |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
53 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
54 prefix=@prefix@ |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
55 exec_prefix=${prefix} |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
56 bindir=${exec_prefix}/bin |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
57 sbindir=${exec_prefix}/sbin |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
58 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
59 CC=@CC@ |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
60 LD=@CC@ |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
61 AR=@AR@ |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
62 RANLIB=@RANLIB@ |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
63 STRIP=@STRIP@ |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
64 INSTALL=@INSTALL@ |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
65 CFLAGS=@CFLAGS@ |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
66 LIBS=$(LTC) $(LTM) @LIBS@ |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
67 LDFLAGS=@LDFLAGS@ |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
68 |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
69 EXEEXT=@EXEEXT@ |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
70 |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
71 # whether we're building client, server, or both for the common objects. |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
72 space:= $(empty) $(empty) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
73 CLISVRFLAGS= |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
74 # evilness so we detect 'dropbear' by itself as a word |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
75 ifneq (,$(findstring $(space)dropbear$(space), $(space)$(PROGRAMS)$(space))) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
76 CLISVRFLAGS+= -DDROPBEAR_SERVER |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
77 endif |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
78 ifneq (,$(findstring $(space)dbclient$(space), $(space)$(PROGRAMS)$(space))) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
79 CLISVRFLAGS+= -DDROPBEAR_CLIENT |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
80 endif |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
81 |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
82 CFLAGS+=$(CLISVRFLAGS) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
83 |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
84 # 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
|
85 export CC |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
86 export CFLAGS |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
87 export RANLIB AR STRIP |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
88 |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
89 ifeq ($(STATIC), 1) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
90 LDFLAGS+=-static |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
91 SPREFIX=static |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
92 else |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
93 SPREFIX= |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
94 endif |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
95 |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
96 ifeq ($(MULTI), 1) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
97 TARGETS=dropbearmulti |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
98 else |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
99 TARGETS=$(PROGRAMS) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
100 endif |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
101 |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
102 # 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
|
103 ifeq ($(SCPPROGRESS), 1) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
104 CFLAGS+=-DPROGRESS_METER |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
105 endif |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
106 |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
107 #%: $(HEADERS) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
108 #%: $(HEADERS) Makefile |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
109 # TODO |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
110 |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
111 |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
112 strip: $(TARGETS) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
113 $(STRIP) $(foreach prog, $(TARGETS), $(SPREFIX)$(prog)$(EXEEXT)) |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
114 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
115 |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
116 install: $(foreach prog, $(TARGETS), install$prog) |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
117 |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
118 # 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
|
119 installdropbear: dropbear |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
120 $(INSTALL) -d -m 755 $(DESTDIR)$(sbindir) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
121 $(INSTALL) -m 755 $(SPREFIX)dropbear$(EXEEXT) $(DESTDIR)$(sbindir) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
122 -chown root $(DESTDIR)$(sbindir)/$(SPREFIX)dropbear$(EXEEXT) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
123 -chgrp 0 $(DESTDIR)$(sbindir)/$(SPREFIX)dropbear$(EXEEXT) |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
124 |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
125 install%: $* |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
126 $(INSTALL) -d -m 755 $(DESTDIR)$(bindir) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
127 $(INSTALL) -m 755 $(SPREFIX)$*$(EXEEXT) $(DESTDIR)$(bindir) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
128 -chown root $(DESTDIR)$(sbindir)/$(SPREFIX)$*$(EXEEXT) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
129 -chgrp 0 $(DESTDIR)$(sbindir)/$(SPREFIX)$*$(EXEEXT) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
130 ifeq ($(MULTI), 1) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
131 @echo "You must manually create links for $*" |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
132 endif |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
133 |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
134 |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
135 |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
136 # The actual binaries |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
137 dropbear: $(dropbearobjs) |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
138 |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
139 dropbear dbclient dropbearkey dropbearconvert: $($($@objs)) $(HEADERS) \ |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
140 $(LTC) $(LTM) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
141 @echo $(CLISVRFLAGS) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
142 $(LD) $(LDFLAGS) -o $(SPREFIX)$@$(EXEEXT) $($@objs) $(LIBS) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
143 |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
144 |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
145 # scp doesn't use the libs so is special. |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
146 scp: $(SCPOBJS) $(HEADERS) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
147 $(LD) $(LDFLAGS) -o $(SPREFIX)$@$(EXEEXT) $(SCPOBJS) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
148 |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
149 |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
150 MULTIOBJS=dbmulti.o |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
151 ifeq ($(MULTI),1) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
152 deftarget=multi |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
153 MULTIOBJS=$(foreach prog, $(PROGRAMS), $($(prog)objs)) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
154 endif |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
155 |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
156 dropbearmulti: $(HEADERS) $(MULTIOBJS) $(LTC) $(LTM) |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
157 $(LD) $(LDFLAGS) -o $(SPREFIX)$@$(EXEEXT) $(MULTIOBJS) $(LIBS) |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
158 @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
|
159 @echo "ie 'ln -s dropbearmulti dropbear'" |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
160 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
161 $(LTC): $(HEADERS) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
162 cd libtomcrypt && $(MAKE) clean && $(MAKE) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
163 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
164 $(LTM): $(HEADERS) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
165 cd libtommath && $(MAKE) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
166 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
167 ltc-clean: |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
168 cd libtomcrypt && $(MAKE) clean |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
169 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
170 ltm-clean: |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
171 cd libtommath && $(MAKE) clean |
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 sizes: dropbear |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
174 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
|
175 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
176 clean: ltc-clean ltm-clean |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
177 -rm -f dropbear dbclient dropbearkey dropbearconvert scp scp-progress |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
178 -rm -f staticdropbear staticdropbearkey staticdropbearconvert staticscp |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
179 -rm -f dropbearmulti staticdropbearmulti |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
180 -rm -f *.o *.da *.bb *.bbg *.prof |
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 distclean: clean tidy |
29
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
183 -rm -f config.h |
0fcf63e1cb01
Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
24
diff
changeset
|
184 -rm -f Makefile |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
185 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
186 tidy: |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
187 -rm -f *~ *.gcov */*~ |