annotate Makefile.in @ 254:8b62b0ea8f3b

* include netinet/in_systm.h if available before netinet/ip.h, since netbsd seems to require it for some reason. hooray for many unices.
author Matt Johnston <matt@ucc.asn.au>
date Mon, 31 Oct 2005 07:49:57 +0000
parents efbaf6b03837
children eed26cff980b
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
161
b9d3f725e00b 0.44 release changes
Matt Johnston <matt@ucc.asn.au>
parents: 137
diff changeset
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:
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
5 # 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
6 #
82
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
7 # 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
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.
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
10 # Hopefully that seems intuitive.
29
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 \
82
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
23 atomicio.o compat.o fake-rfc2553.o
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
24
23
c896a4dd65da Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 10
diff changeset
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
20563735e8b5 just checkpointing
Matt Johnston <matt@ucc.asn.au>
parents: 55
diff changeset
27 svr-chansession.o svr-runopts.o svr-agentfwd.o svr-main.o svr-x11fwd.o\
119
3394a7cb30cd propagate of 08347df3bca787bd3621602fe2b466c85c9dc3e2 and 717950f4061f1123659ee87c7c168805af920ab7 from branch 'matt.dbclient.rez' to 'matt.dbclient.authpam'
Matt Johnston <matt@ucc.asn.au>
parents: 118
diff changeset
28 svr-tcpfwd.o svr-authpam.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
0a88488a949a add cli-authpubkey
Matt Johnston <matt@ucc.asn.au>
parents: 49
diff changeset
31 cli-session.o cli-service.o cli-runopts.o cli-chansession.o \
249
efbaf6b03837 added keyboard-interactive client support
Matt Johnston <matt@ucc.asn.au>
parents: 197
diff changeset
32 cli-authpubkey.o cli-tcpfwd.o cli-channel.o cli-authinteract.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 \
107
Matt Johnston <matt@ucc.asn.au>
parents: 86
diff changeset
37 common-runopts.o circbuffer.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
c896a4dd65da Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 10
diff changeset
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
efb5e0b335cf TCP forwarding works.
Matt Johnston <matt@ucc.asn.au>
parents: 62
diff changeset
49 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
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
137
a3b58707122b Pristine compilation works.
Matt Johnston <matt@ucc.asn.au>
parents: 132
diff changeset
58 VPATH=@srcdir@
a3b58707122b Pristine compilation works.
Matt Johnston <matt@ucc.asn.au>
parents: 132
diff changeset
59 srcdir=@srcdir@
a3b58707122b Pristine compilation works.
Matt Johnston <matt@ucc.asn.au>
parents: 132
diff changeset
60
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
61 prefix=@prefix@
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
62 exec_prefix=${prefix}
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
63 bindir=${exec_prefix}/bin
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
64 sbindir=${exec_prefix}/sbin
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
65
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
66 CC=@CC@
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
67 LD=@LD@
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
68 AR=@AR@
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
69 RANLIB=@RANLIB@
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
70 STRIP=@STRIP@
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
71 INSTALL=@INSTALL@
197
a6eb598d8686 * change include path for libtomcrypt 1.02
Matt Johnston <matt@ucc.asn.au>
parents: 174
diff changeset
72 CFLAGS=-I. -I$(srcdir)/libtomcrypt/src/headers/ @CFLAGS@
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
73 LIBS=$(LTC) $(LTM) @LIBS@
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
74 LDFLAGS=@LDFLAGS@
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
75
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
76 EXEEXT=@EXEEXT@
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
77
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
78 # 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
79 # 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
80 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
81 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
82 CFLAGS+= -DDROPBEAR_SERVER
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
83 endif
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
84 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
85 CFLAGS+= -DDROPBEAR_CLIENT
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
86 endif
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
87
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
88
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
89 # 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
90 export CC
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
91 export CFLAGS
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
92 export RANLIB AR STRIP
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
93
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
94 ifeq ($(STATIC), 1)
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
95 LDFLAGS+=-static
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)
174
c753db8eb446 * don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents: 161
diff changeset
116 $(STRIP) $(addsuffix $(EXEEXT), $(TARGETS))
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
117
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
118 install: $(addprefix inst_, $(TARGETS))
82
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
119
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
120 installdropbearmulti: insdbmulti $(addprefix insmulti, $(PROGRAMS))
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
121
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
122 insdbmulti: dropbearmulti
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
123 $(INSTALL) -d -m 755 $(DESTDIR)$(bindir)
174
c753db8eb446 * don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents: 161
diff changeset
124 $(INSTALL) -m 755 dropbearmulti$(EXEEXT) $(DESTDIR)$(bindir)
c753db8eb446 * don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents: 161
diff changeset
125 -chown root $(DESTDIR)$(bindir)/dropbearmulti$(EXEEXT)
c753db8eb446 * don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents: 161
diff changeset
126 -chgrp 0 $(DESTDIR)$(bindir)/dropbearmulti$(EXEEXT)
82
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
127
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
128 insmultidropbear: dropbearmulti
174
c753db8eb446 * don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents: 161
diff changeset
129 -rm -f $(DESTDIR)$(sbindir)/dropbear$(EXEEXT)
c753db8eb446 * don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents: 161
diff changeset
130 -ln -s $(DESTDIR)$(bindir)/dropbearmulti$(EXEEXT) $(DESTDIR)$(sbindir)/dropbear$(EXEEXT)
82
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
131
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
132 insmulti%: dropbearmulti
174
c753db8eb446 * don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents: 161
diff changeset
133 -rm -f $(DESTDIR)$(bindir)/$*$(EXEEXT)
c753db8eb446 * don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents: 161
diff changeset
134 -ln -s $(DESTDIR)$(bindir)/dropbearmulti$(EXEEXT) $(DESTDIR)$(bindir)/$*$(EXEEXT)
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 # dropbear should go in sbin, so it needs a seperate 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
137 inst_dropbear: dropbear
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
138 $(INSTALL) -d -m 755 $(DESTDIR)$(sbindir)
174
c753db8eb446 * don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents: 161
diff changeset
139 $(INSTALL) -m 755 dropbear$(EXEEXT) $(DESTDIR)$(sbindir)
c753db8eb446 * don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents: 161
diff changeset
140 -chown root $(DESTDIR)$(sbindir)/dropbear$(EXEEXT)
c753db8eb446 * don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents: 161
diff changeset
141 -chgrp 0 $(DESTDIR)$(sbindir)/dropbear$(EXEEXT)
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
142
132
c56d40d54538 use inst_ rather than inst, so it doesn't try to install "all".
Matt Johnston <matt@ucc.asn.au>
parents: 119
diff changeset
143 inst_%: $*
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
144 $(INSTALL) -d -m 755 $(DESTDIR)$(bindir)
174
c753db8eb446 * don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents: 161
diff changeset
145 $(INSTALL) -m 755 $*$(EXEEXT) $(DESTDIR)$(bindir)
c753db8eb446 * don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents: 161
diff changeset
146 -chown root $(DESTDIR)$(bindir)/$*$(EXEEXT)
c753db8eb446 * don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents: 161
diff changeset
147 -chgrp 0 $(DESTDIR)$(bindir)/$*$(EXEEXT)
29
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
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
150 # 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
151 dropbear: $(dropbearobjs)
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
152 dbclient: $(dbclientobjs)
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
153 dropbearkey: $(dropbearkeyobjs)
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
154 dropbearconvert: $(dropbearconvertobjs)
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
155
33
f789045062e6 Progressing client support
Matt Johnston <matt@ucc.asn.au>
parents: 32
diff changeset
156 dropbear dbclient dropbearkey dropbearconvert: $(HEADERS) $(LTC) $(LTM) \
f789045062e6 Progressing client support
Matt Johnston <matt@ucc.asn.au>
parents: 32
diff changeset
157 Makefile
174
c753db8eb446 * don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents: 161
diff changeset
158 $(LD) $(LDFLAGS) -o $@$(EXEEXT) $($@objs) $(LIBS)
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
159
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
160 # scp doesn't use the libs so is special.
33
f789045062e6 Progressing client support
Matt Johnston <matt@ucc.asn.au>
parents: 32
diff changeset
161 scp: $(SCPOBJS) $(HEADERS) Makefile
174
c753db8eb446 * don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents: 161
diff changeset
162 $(LD) $(LDFLAGS) -o $@$(EXEEXT) $(SCPOBJS)
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
163
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
164
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
165 # multi-binary compilation.
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 29
diff changeset
166 MULTIOBJS=
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
167 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
168 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
169 CFLAGS+=$(addprefix -DDBMULTI_, $(PROGRAMS)) -DDROPBEAR_MULTI
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
170 endif
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
171
82
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
172 dropbearmulti: multilink
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
173
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
174 multibinary: $(HEADERS) $(MULTIOBJS) $(LTC) $(LTM) Makefile
174
c753db8eb446 * don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents: 161
diff changeset
175 $(LD) $(LDFLAGS) -o dropbearmulti$(EXEEXT) $(MULTIOBJS) $(LIBS)
82
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
176
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
177 multilink: multibinary $(addprefix link, $(PROGRAMS))
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
178
8f26145a0997 do the symlinks for multi-binary compiles
Matt Johnston <matt@ucc.asn.au>
parents: 81
diff changeset
179 link%:
174
c753db8eb446 * don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents: 161
diff changeset
180 -rm -f $*$(EXEEXT)
c753db8eb446 * don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents: 161
diff changeset
181 -ln -s dropbearmulti$(EXEEXT) $*$(EXEEXT)
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
182
33
f789045062e6 Progressing client support
Matt Johnston <matt@ucc.asn.au>
parents: 32
diff changeset
183 $(LTC): options.h
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
184 cd libtomcrypt && $(MAKE) clean && $(MAKE)
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
185
33
f789045062e6 Progressing client support
Matt Johnston <matt@ucc.asn.au>
parents: 32
diff changeset
186 $(LTM): options.h
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
187 cd libtommath && $(MAKE)
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
188
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
189 ltc-clean:
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
190 cd libtomcrypt && $(MAKE) clean
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 ltm-clean:
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
193 cd libtommath && $(MAKE) clean
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
194
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
195 sizes: dropbear
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
196 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
197
86
ace512d2ad5d Small fixes
Matt Johnston <matt@ucc.asn.au>
parents: 82
diff changeset
198 clean: ltc-clean ltm-clean thisclean
ace512d2ad5d Small fixes
Matt Johnston <matt@ucc.asn.au>
parents: 82
diff changeset
199
ace512d2ad5d Small fixes
Matt Johnston <matt@ucc.asn.au>
parents: 82
diff changeset
200 thisclean:
174
c753db8eb446 * don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents: 161
diff changeset
201 -rm -f dropbear dbclient dropbearkey dropbearconvert scp scp-progress \
c753db8eb446 * don't add a 'static' prefix to binary names
Matt Johnston <matt@ucc.asn.au>
parents: 161
diff changeset
202 dropbearmulti *.o *.da *.bb *.bbg *.prof
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
203
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
204 distclean: clean tidy
29
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
205 -rm -f config.h
0fcf63e1cb01 Totally reworked Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents: 24
diff changeset
206 -rm -f Makefile
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
207
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
208 tidy:
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
209 -rm -f *~ *.gcov */*~