Mercurial > dropbear
comparison Makefile.in @ 910:89555751c489 asm
merge up to 2013.63, improve ASM makefile rules a bit
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 27 Feb 2014 21:35:58 +0800 |
parents | 3ca7113936c1 4f1988cb79ce |
children |
comparison
equal
deleted
inserted
replaced
909:e4b75744acab | 910:89555751c489 |
---|---|
11 | 11 |
12 ifndef PROGRAMS | 12 ifndef PROGRAMS |
13 PROGRAMS=dropbear dbclient dropbearkey dropbearconvert | 13 PROGRAMS=dropbear dbclient dropbearkey dropbearconvert |
14 endif | 14 endif |
15 | 15 |
16 LTC=libtomcrypt/libtomcrypt.a | 16 STATIC_LTC=libtomcrypt/libtomcrypt.a |
17 LTM=libtommath/libtommath.a | 17 STATIC_LTM=libtommath/libtommath.a |
18 | |
19 LIBTOM_LIBS=@LIBTOM_LIBS@ | |
18 | 20 |
19 ifeq (@BUNDLED_LIBTOM@, 1) | 21 ifeq (@BUNDLED_LIBTOM@, 1) |
20 LIBTOM_DEPS=$(LTC) $(LTM) | 22 LIBTOM_DEPS=$(STATIC_LTC) $(STATIC_LTM) |
21 CFLAGS+=-I$(srcdir)/libtomcrypt/src/headers/ | 23 LIBTOM_LIBS=$(STATIC_LTC) $(STATIC_LTM) |
22 LIBS+=$(LTC) $(LTM) | 24 CFLAGS+=-I$(srcdir)/libtomcrypt/src/headers/ |
25 endif | |
26 | |
27 ifeq (@ASM_ARCH@, arm) | |
28 ASM_OBJS=aes-arm.o sha1-arm.o aes-asm-ltc.o sha1-asm-ltc.o | |
29 LIBTOM_DEPS += $(ASM_OBJS) | |
30 LIBTOM_LIBS += $(ASM_OBJS) | |
31 CFLAGS+=-DDROPBEAR_SHA1_ASM | |
32 CFLAGS+=-DDROPBEAR_AES_ASM | |
23 endif | 33 endif |
24 | 34 |
25 COMMONOBJS=dbutil.o buffer.o \ | 35 COMMONOBJS=dbutil.o buffer.o \ |
26 dss.o bignum.o \ | 36 dss.o bignum.o \ |
27 signkey.o rsa.o random.o \ | 37 signkey.o rsa.o dbrandom.o \ |
28 queue.o \ | 38 queue.o \ |
29 atomicio.o compat.o fake-rfc2553.o | 39 atomicio.o compat.o fake-rfc2553.o \ |
40 ltc_prng.o ecc.o ecdsa.o crypto_desc.o \ | |
41 gensignkey.o gendss.o genrsa.o | |
30 | 42 |
31 SVROBJS=svr-kex.o svr-auth.o sshpty.o \ | 43 SVROBJS=svr-kex.o svr-auth.o sshpty.o \ |
32 svr-authpasswd.o svr-authpubkey.o svr-authpubkeyoptions.o svr-session.o svr-service.o \ | 44 svr-authpasswd.o svr-authpubkey.o svr-authpubkeyoptions.o svr-session.o svr-service.o \ |
33 svr-chansession.o svr-runopts.o svr-agentfwd.o svr-main.o svr-x11fwd.o\ | 45 svr-chansession.o svr-runopts.o svr-agentfwd.o svr-main.o svr-x11fwd.o\ |
34 svr-tcpfwd.o svr-authpam.o | 46 svr-tcpfwd.o svr-authpam.o |
39 cli-agentfwd.o list.o | 51 cli-agentfwd.o list.o |
40 | 52 |
41 CLISVROBJS=common-session.o packet.o common-algo.o common-kex.o \ | 53 CLISVROBJS=common-session.o packet.o common-algo.o common-kex.o \ |
42 common-channel.o common-chansession.o termcodes.o loginrec.o \ | 54 common-channel.o common-chansession.o termcodes.o loginrec.o \ |
43 tcp-accept.o listener.o process-packet.o \ | 55 tcp-accept.o listener.o process-packet.o \ |
44 common-runopts.o circbuffer.o aes-arm.o | 56 common-runopts.o circbuffer.o curve25519-donna.o |
45 | 57 |
46 KEYOBJS=dropbearkey.o gendss.o genrsa.o | 58 KEYOBJS=dropbearkey.o |
47 | 59 |
48 CONVERTOBJS=dropbearconvert.o keyimport.o | 60 CONVERTOBJS=dropbearconvert.o keyimport.o |
49 | 61 |
50 SCPOBJS=scp.o progressmeter.o atomicio.o scpmisc.o compat.o | 62 SCPOBJS=scp.o progressmeter.o atomicio.o scpmisc.o compat.o |
51 | 63 |
52 HEADERS=options.h dbutil.h session.h packet.h algo.h ssh.h buffer.h kex.h \ | 64 HEADERS=options.h dbutil.h session.h packet.h algo.h ssh.h buffer.h kex.h \ |
53 dss.h bignum.h signkey.h rsa.h random.h service.h auth.h \ | 65 dss.h bignum.h signkey.h rsa.h dbrandom.h service.h auth.h \ |
54 debug.h channel.h chansession.h config.h queue.h sshpty.h \ | 66 debug.h channel.h chansession.h config.h queue.h sshpty.h \ |
55 termcodes.h gendss.h genrsa.h runopts.h includes.h \ | 67 termcodes.h gendss.h genrsa.h runopts.h includes.h \ |
56 loginrec.h atomicio.h x11fwd.h agentfwd.h tcpfwd.h compat.h \ | 68 loginrec.h atomicio.h x11fwd.h agentfwd.h tcpfwd.h compat.h \ |
57 listener.h fake-rfc2553.h | 69 listener.h fake-rfc2553.h ecc.h ecdsa.h |
58 | 70 |
59 dropbearobjs=$(COMMONOBJS) $(CLISVROBJS) $(SVROBJS) @CRYPTLIB@ | 71 dropbearobjs=$(COMMONOBJS) $(CLISVROBJS) $(SVROBJS) |
60 dbclientobjs=$(COMMONOBJS) $(CLISVROBJS) $(CLIOBJS) | 72 dbclientobjs=$(COMMONOBJS) $(CLISVROBJS) $(CLIOBJS) |
61 dropbearkeyobjs=$(COMMONOBJS) $(KEYOBJS) | 73 dropbearkeyobjs=$(COMMONOBJS) $(KEYOBJS) |
62 dropbearconvertobjs=$(COMMONOBJS) $(CONVERTOBJS) | 74 dropbearconvertobjs=$(COMMONOBJS) $(CONVERTOBJS) |
63 scpobjs=$(SCPOBJS) | 75 scpobjs=$(SCPOBJS) |
64 | 76 |
65 VPATH=@srcdir@ | 77 VPATH=@srcdir@ |
66 srcdir=@srcdir@ | 78 srcdir=@srcdir@ |
67 | 79 |
68 prefix=@prefix@ | 80 prefix=@prefix@ |
81 exec_prefix=@exec_prefix@ | |
69 datarootdir = @datarootdir@ | 82 datarootdir = @datarootdir@ |
70 bindir=@bindir@ | 83 bindir=@bindir@ |
71 sbindir=@sbindir@ | 84 sbindir=@sbindir@ |
72 mandir=@mandir@ | 85 mandir=@mandir@ |
73 | 86 |
119 strip: $(TARGETS) | 132 strip: $(TARGETS) |
120 $(STRIP) $(addsuffix $(EXEEXT), $(TARGETS)) | 133 $(STRIP) $(addsuffix $(EXEEXT), $(TARGETS)) |
121 | 134 |
122 install: $(addprefix inst_, $(TARGETS)) | 135 install: $(addprefix inst_, $(TARGETS)) |
123 | 136 |
124 installdropbearmulti: insdbmulti $(addprefix insmulti, $(PROGRAMS)) | |
125 | |
126 insdbmulti: dropbearmulti | |
127 $(INSTALL) -d $(DESTDIR)$(bindir) | |
128 $(INSTALL) dropbearmulti$(EXEEXT) $(DESTDIR)$(bindir) | |
129 | |
130 insmultidropbear: dropbearmulti | 137 insmultidropbear: dropbearmulti |
131 $(INSTALL) -d $(DESTDIR)$(sbindir) | 138 $(INSTALL) -d $(DESTDIR)$(sbindir) |
132 -rm -f $(DESTDIR)$(sbindir)/dropbear$(EXEEXT) | 139 -rm -f $(DESTDIR)$(sbindir)/dropbear$(EXEEXT) |
133 -ln -s $(bindir)/dropbearmulti$(EXEEXT) $(DESTDIR)$(sbindir)/dropbear$(EXEEXT) | 140 -ln -s $(bindir)/dropbearmulti$(EXEEXT) $(DESTDIR)$(sbindir)/dropbear$(EXEEXT) |
141 $(INSTALL) -d $(DESTDIR)$(mandir)/man8 | |
142 $(INSTALL) -m 644 dropbear.8 $(DESTDIR)$(mandir)/man8/dropbear.8 | |
134 | 143 |
135 insmulti%: dropbearmulti | 144 insmulti%: dropbearmulti |
136 $(INSTALL) -d $(DESTDIR)$(bindir) | 145 $(INSTALL) -d $(DESTDIR)$(bindir) |
137 -rm -f $(DESTDIR)$(bindir)/$*$(EXEEXT) | 146 -rm -f $(DESTDIR)$(bindir)/$*$(EXEEXT) |
138 -ln -s $(bindir)/dropbearmulti$(EXEEXT) $(DESTDIR)$(bindir)/$*$(EXEEXT) | 147 -ln -s $(bindir)/dropbearmulti$(EXEEXT) $(DESTDIR)$(bindir)/$*$(EXEEXT) |
148 $(INSTALL) -d $(DESTDIR)$(mandir)/man1 | |
149 if test -e $*.1; then $(INSTALL) -m 644 $*.1 $(DESTDIR)$(mandir)/man1/$*.1; fi | |
139 | 150 |
140 # dropbear should go in sbin, so it needs a seperate rule | 151 # dropbear should go in sbin, so it needs a seperate rule |
141 inst_dropbear: dropbear | 152 inst_dropbear: dropbear |
142 $(INSTALL) -d $(DESTDIR)$(sbindir) | 153 $(INSTALL) -d $(DESTDIR)$(sbindir) |
143 $(INSTALL) dropbear$(EXEEXT) $(DESTDIR)$(sbindir) | 154 $(INSTALL) dropbear$(EXEEXT) $(DESTDIR)$(sbindir) |
144 $(INSTALL) -d $(DESTDIR)$(mandir)/man8 | 155 $(INSTALL) -d $(DESTDIR)$(mandir)/man8 |
145 $(INSTALL) -m 644 dropbear.8 $(DESTDIR)$(mandir)/man8/dropbear.8 | 156 $(INSTALL) -m 644 dropbear.8 $(DESTDIR)$(mandir)/man8/dropbear.8 |
146 | 157 |
147 inst_%: $* | 158 inst_%: $* |
148 $(INSTALL) -d $(DESTDIR)$(bindir) | 159 $(INSTALL) -d $(DESTDIR)$(bindir) |
149 $(INSTALL) $*$(EXEEXT) $(DESTDIR)$(bindir) | 160 $(INSTALL) $*$(EXEEXT) $(DESTDIR)$(bindir) |
150 $(INSTALL) -d $(DESTDIR)$(mandir)/man1 | 161 $(INSTALL) -d $(DESTDIR)$(mandir)/man1 |
151 $(INSTALL) -m 644 $*.1 $(DESTDIR)$(mandir)/man1/$*.1 | 162 if test -e $*.1; then $(INSTALL) -m 644 $*.1 $(DESTDIR)$(mandir)/man1/$*.1; fi |
163 | |
164 inst_dropbearmulti: $(addprefix insmulti, $(PROGRAMS)) | |
152 | 165 |
153 | 166 |
154 # for some reason the rule further down doesn't like $($@objs) as a prereq. | 167 # for some reason the rule further down doesn't like $($@objs) as a prereq. |
155 dropbear: $(dropbearobjs) | 168 dropbear: $(dropbearobjs) |
156 dbclient: $(dbclientobjs) | 169 dbclient: $(dbclientobjs) |
157 dropbearkey: $(dropbearkeyobjs) | 170 dropbearkey: $(dropbearkeyobjs) |
158 dropbearconvert: $(dropbearconvertobjs) | 171 dropbearconvert: $(dropbearconvertobjs) |
159 | 172 |
160 dropbear dbclient dropbearkey dropbearconvert: $(HEADERS) $(LIBTOM_DEPS) Makefile | 173 dropbear: $(HEADERS) $(LIBTOM_DEPS) Makefile |
161 $(CC) $(LDFLAGS) -o $@$(EXEEXT) $($@objs) $(LIBS) | 174 $(CC) $(LDFLAGS) -o $@$(EXEEXT) $($@objs) $(LIBTOM_LIBS) $(LIBS) @CRYPTLIB@ |
175 | |
176 dbclient: $(HEADERS) $(LIBTOM_DEPS) Makefile | |
177 $(CC) $(LDFLAGS) -o $@$(EXEEXT) $($@objs) $(LIBTOM_LIBS) $(LIBS) | |
178 | |
179 dropbearkey dropbearconvert: $(HEADERS) $(LIBTOM_DEPS) Makefile | |
180 $(CC) $(LDFLAGS) -o $@$(EXEEXT) $($@objs) $(LIBTOM_LIBS) | |
162 | 181 |
163 # scp doesn't use the libs so is special. | 182 # scp doesn't use the libs so is special. |
164 scp: $(SCPOBJS) $(HEADERS) Makefile | 183 scp: $(SCPOBJS) $(HEADERS) Makefile |
165 $(CC) $(LDFLAGS) -o $@$(EXEEXT) $(SCPOBJS) | 184 $(CC) $(LDFLAGS) -o $@$(EXEEXT) $(SCPOBJS) |
166 | 185 |
167 | 186 |
168 # multi-binary compilation. | 187 # multi-binary compilation. |
169 MULTIOBJS= | 188 MULTIOBJS= |
170 ifeq ($(MULTI),1) | 189 ifeq ($(MULTI),1) |
171 MULTIOBJS=dbmulti.o $(sort $(foreach prog, $(PROGRAMS), $($(prog)objs))) @CRYPTLIB@ | 190 MULTIOBJS=dbmulti.o $(sort $(foreach prog, $(PROGRAMS), $($(prog)objs))) |
172 CFLAGS+=$(addprefix -DDBMULTI_, $(PROGRAMS)) -DDROPBEAR_MULTI | 191 CFLAGS+=$(addprefix -DDBMULTI_, $(PROGRAMS)) -DDROPBEAR_MULTI |
173 endif | 192 endif |
174 | 193 |
175 dropbearmulti: multilink | 194 dropbearmulti$(EXEEXT): $(HEADERS) $(MULTIOBJS) $(LIBTOM_DEPS) Makefile |
176 | 195 $(CC) $(LDFLAGS) -o $@ $(MULTIOBJS) $(LIBTOM_LIBS) $(LIBS) @CRYPTLIB@ |
177 multibinary: $(HEADERS) $(MULTIOBJS) $(LIBTOM_DEPS) Makefile | 196 |
178 $(CC) $(LDFLAGS) -o dropbearmulti$(EXEEXT) $(MULTIOBJS) $(LIBS) | 197 multibinary: dropbearmulti$(EXEEXT) |
179 | 198 |
180 multilink: multibinary $(addprefix link, $(PROGRAMS)) | 199 multilink: multibinary $(addprefix link, $(PROGRAMS)) |
181 | 200 |
182 link%: | 201 link%: |
183 -rm -f $*$(EXEEXT) | 202 -rm -f $*$(EXEEXT) |
184 -ln -s dropbearmulti$(EXEEXT) $*$(EXEEXT) | 203 -ln -s dropbearmulti$(EXEEXT) $*$(EXEEXT) |
185 | 204 |
186 $(LTC): options.h | 205 $(STATIC_LTC): options.h |
187 cd libtomcrypt && $(MAKE) clean && $(MAKE) | 206 cd libtomcrypt && $(MAKE) |
188 | 207 |
189 $(LTM): options.h | 208 $(STATIC_LTM): options.h |
190 cd libtommath && $(MAKE) | 209 cd libtommath && $(MAKE) |
191 | 210 |
192 .PHONY : clean sizes thisclean distclean tidy ltc-clean ltm-clean | 211 .PHONY : clean sizes thisclean distclean tidy ltc-clean ltm-clean |
193 | 212 |
194 ltc-clean: | 213 ltc-clean: |