annotate Makefile.in @ 82:8f26145a0997

do the symlinks for multi-binary compiles
author Matt Johnston <matt@ucc.asn.au>
date Tue, 17 Aug 2004 04:35:01 +0000
parents 2a798efbb40b
children ace512d2ad5d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
1 # This Makefile is for Dropbear SSH Server and Client
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 #
82
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
6 # to make a multiple-program statically linked binary "staticdropbearmulti".
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
7 # 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
8 # dbclient functionality, and includes the progress-bar functionality in scp.
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
9 # Hopefully that seems intuitive.
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
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
15 LTC=libtomcrypt/libtomcrypt.a
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
16 LTM=libtommath/libtommath.a
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
17
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
18 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
19 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
20 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
21 queue.o \
82
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
22 atomicio.o compat.o fake-rfc2553.o
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
23
23
c896a4dd65da Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 10
diff changeset
24 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
25 svr-authpasswd.o svr-authpubkey.o svr-session.o svr-service.o \
62
20563735e8b5 just checkpointing
Matt Johnston <matt@ucc.asn.au>
parents: 55
diff changeset
26 svr-chansession.o svr-runopts.o svr-agentfwd.o svr-main.o svr-x11fwd.o\
20563735e8b5 just checkpointing
Matt Johnston <matt@ucc.asn.au>
parents: 55
diff changeset
27 svr-tcpfwd.o
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
28
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
29 CLIOBJS=cli-algo.o cli-main.o cli-auth.o cli-authpasswd.o cli-kex.o \
55
0a88488a949a add cli-authpubkey
Matt Johnston <matt@ucc.asn.au>
parents: 49
diff changeset
30 cli-session.o cli-service.o cli-runopts.o cli-chansession.o \
62
20563735e8b5 just checkpointing
Matt Johnston <matt@ucc.asn.au>
parents: 55
diff changeset
31 cli-authpubkey.o cli-tcpfwd.o
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
32
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
33 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
34 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
35 tcp-accept.o listener.o process-packet.o \
82
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
36 common-runopts.o
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
37
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
38 KEYOBJS=dropbearkey.o gendss.o genrsa.o
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
39
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
40 CONVERTOBJS=dropbearconvert.o keyimport.o
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
41
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
42 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
43
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
44 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
45 dss.h bignum.h signkey.h rsa.h random.h service.h auth.h \
23
c896a4dd65da Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 10
diff changeset
46 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
47 termcodes.h gendss.h genrsa.h runopts.h includes.h \
64
efb5e0b335cf TCP forwarding works.
Matt Johnston <matt@ucc.asn.au>
parents: 62
diff changeset
48 loginrec.h atomicio.h x11fwd.h agentfwd.h tcpfwd.h compat.h \
67
86725004a0ea fake-rfc stuff
Matt Johnston <matt@ucc.asn.au>
parents: 65
diff changeset
49 listener.h fake-rfc2553.h
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
50
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
51 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
52 dbclientobjs=$(COMMONOBJS) $(CLISVROBJS) $(CLIOBJS)
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
53 dropbearkeyobjs=$(COMMONOBJS) $(KEYOBJS)
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
54 dropbearconvertobjs=$(COMMONOBJS) $(CONVERTOBJS)
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
55 scpobjs=$(SCPOBJS)
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
56
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
57 prefix=@[email protected]
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
58 exec_prefix=${prefix}
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
59 bindir=${exec_prefix}/bin
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
60 sbindir=${exec_prefix}/sbin
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
61
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
62 CC=@[email protected]
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
63 LD=@[email protected]
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
64 AR=@[email protected]
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
65 RANLIB=@[email protected]
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
66 STRIP=@[email protected]
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
67 INSTALL=@[email protected]
32
8fd0cdbb5b1b forgot to include libtomcrypt dir
Matt Johnston <matt@ucc.asn.au>
parents: 31
diff changeset
68 CFLAGS=-Ilibtomcrypt @[email protected]
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
69 LIBS=$(LTC) $(LTM) @[email protected]
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
70 LDFLAGS=@[email protected]
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
71
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
72 EXEEXT=@[email protected]
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
73
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
74 # 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
75 # 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
76 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
77 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
78 CFLAGS+= -DDROPBEAR_SERVER
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
79 endif
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
80 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
81 CFLAGS+= -DDROPBEAR_CLIENT
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
82 endif
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
83
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
84
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
85 # 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
86 export CC
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
87 export CFLAGS
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
88 export RANLIB AR STRIP
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
89
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
90 ifeq ($(STATIC), 1)
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
91 LDFLAGS+=-static
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
92 SPREFIX=static
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
93 else
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
94 SPREFIX=
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
95 endif
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
96
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
97 ifeq ($(MULTI), 1)
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
98 TARGETS=dropbearmulti
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
99 else
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
100 TARGETS=$(PROGRAMS)
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
101 endif
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
102
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
103 # 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
104 ifeq ($(SCPPROGRESS), 1)
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
105 CFLAGS+=-DPROGRESS_METER
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
106 endif
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
107
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
108 #%: $(HEADERS)
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
109 #%: $(HEADERS) Makefile
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
110 # TODO
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
111
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
112 all: $(TARGETS)
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
113
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
114 strip: $(TARGETS)
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
115 $(STRIP) $(addsuffix $(EXEEXT), $(addprefix $(SPREFIX), $(TARGETS)))
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
116
82
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
117 install: $(addprefix inst, $(TARGETS))
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
118
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
119 installdropbearmulti: insdbmulti $(addprefix insmulti, $(PROGRAMS))
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
120
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
121 insdbmulti: dropbearmulti
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
122 $(INSTALL) -d -m 755 $(DESTDIR)$(bindir)
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
123 $(INSTALL) -m 755 $(SPREFIX)dropbearmulti$(EXEEXT) $(DESTDIR)$(bindir)
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
124 -chown root $(DESTDIR)$(bindir)/$(SPREFIX)dropbearmulti$(EXEEXT)
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
125 -chgrp 0 $(DESTDIR)$(bindir)/$(SPREFIX)dropbearmulti$(EXEEXT)
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
126
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
127 insmultidropbear: dropbearmulti
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
128 -rm -f $(DESTDIR)$(sbindir)/$(SPREFIX)dropbear$(EXEEXT)
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
129 -ln -s $(DESTDIR)$(bindir)/$(SPREFIX)dropbearmulti$(EXEEXT) $(DESTDIR)$(sbindir)/$(SPREFIX)dropbear$(EXEEXT)
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
130
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
131 insmulti%: dropbearmulti
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
132 -rm -f $(DESTDIR)$(bindir)/$(SPREFIX)$*$(EXEEXT)
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
133 -ln -s $(DESTDIR)$(bindir)/$(SPREFIX)dropbearmulti$(EXEEXT) $(DESTDIR)$(bindir)/$(SPREFIX)$*$(EXEEXT)
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
134
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
135 # dropbear should go in sbin, so it needs a seperate rule
82
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
136 instdropbear: dropbear
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
137 $(INSTALL) -d -m 755 $(DESTDIR)$(sbindir)
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
138 $(INSTALL) -m 755 $(SPREFIX)dropbear$(EXEEXT) $(DESTDIR)$(sbindir)
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
139 -chown root $(DESTDIR)$(sbindir)/$(SPREFIX)dropbear$(EXEEXT)
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
140 -chgrp 0 $(DESTDIR)$(sbindir)/$(SPREFIX)dropbear$(EXEEXT)
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
141
82
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
142 inst%: $*
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
143 $(INSTALL) -d -m 755 $(DESTDIR)$(bindir)
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
144 $(INSTALL) -m 755 $(SPREFIX)$*$(EXEEXT) $(DESTDIR)$(bindir)
81
2a798efbb40b dbclient works as "ssh" too
Matt Johnston <matt@ucc.asn.au>
parents: 73
diff changeset
145 -chown root $(DESTDIR)$(bindir)/$(SPREFIX)$*$(EXEEXT)
2a798efbb40b dbclient works as "ssh" too
Matt Johnston <matt@ucc.asn.au>
parents: 73
diff changeset
146 -chgrp 0 $(DESTDIR)$(bindir)/$(SPREFIX)$*$(EXEEXT)
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
147
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
148
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
149 # for some reason the rule further down doesn't like $([email protected]) as a prereq.
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
150 dropbear: $(dropbearobjs)
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
151 dbclient: $(dbclientobjs)
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
152 dropbearkey: $(dropbearkeyobjs)
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
153 dropbearconvert: $(dropbearconvertobjs)
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
154
33
f789045062e6 Progressing client support
Matt Johnston <matt@ucc.asn.au>
parents: 32
diff changeset
155 dropbear dbclient dropbearkey dropbearconvert: $(HEADERS) $(LTC) $(LTM) \
f789045062e6 Progressing client support
Matt Johnston <matt@ucc.asn.au>
parents: 32
diff changeset
156 Makefile
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
157 $(LD) $(LDFLAGS) -o $(SPREFIX)[email protected]$(EXEEXT) $([email protected]objs) $(LIBS)
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
158
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
159 # scp doesn't use the libs so is special.
33
f789045062e6 Progressing client support
Matt Johnston <matt@ucc.asn.au>
parents: 32
diff changeset
160 scp: $(SCPOBJS) $(HEADERS) Makefile
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
161 $(LD) $(LDFLAGS) -o $(SPREFIX)[email protected]$(EXEEXT) $(SCPOBJS)
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
162
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
163
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
164 # multi-binary compilation.
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
165 MULTIOBJS=
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
166 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
167 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
168 CFLAGS+=$(addprefix -DDBMULTI_, $(PROGRAMS)) -DDROPBEAR_MULTI
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
169 endif
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
170
82
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
171 dropbearmulti: multilink
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
172
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
173 multibinary: $(HEADERS) $(MULTIOBJS) $(LTC) $(LTM) Makefile
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
174 $(LD) $(LDFLAGS) -o $(SPREFIX)dropbearmulti$(EXEEXT) $(MULTIOBJS) $(LIBS)
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
175
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
176 multilink: multibinary $(addprefix link, $(PROGRAMS))
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
177
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
178 link%:
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
179 -rm -f $(SPREFIX)$*$(EXEEXT)
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
180 -ln -s $(SPREFIX)dropbearmulti$(EXEEXT) $(SPREFIX)$*$(EXEEXT)
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
181
33
f789045062e6 Progressing client support
Matt Johnston <matt@ucc.asn.au>
parents: 32
diff changeset
182 $(LTC): options.h
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
183 cd libtomcrypt && $(MAKE) clean && $(MAKE)
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
184
33
f789045062e6 Progressing client support
Matt Johnston <matt@ucc.asn.au>
parents: 32
diff changeset
185 $(LTM): options.h
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
186 cd libtommath && $(MAKE)
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 ltc-clean:
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
189 cd libtomcrypt && $(MAKE) clean
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
190
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
191 ltm-clean:
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
192 cd libtommath && $(MAKE) clean
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
193
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
194 sizes: dropbear
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
195 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
196
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
197 clean: ltc-clean ltm-clean
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
198 -rm -f dropbear dbclient dropbearkey dropbearconvert scp scp-progress
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
199 -rm -f staticdropbear staticdropbearkey staticdropbearconvert staticscp
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
200 -rm -f dropbearmulti staticdropbearmulti
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
201 -rm -f *.o *.da *.bb *.bbg *.prof
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
202
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
203 distclean: clean tidy
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
204 -rm -f config.h
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
205 -rm -f Makefile
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
206
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
207 tidy:
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
208 -rm -f *~ *.gcov */*~