Mercurial > dropbear
comparison Makefile.in @ 174:c753db8eb446
* don't add a 'static' prefix to binary names
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 02 Mar 2005 04:13:01 +0000 |
parents | b9d3f725e00b |
children | a6eb598d8686 |
comparison
equal
deleted
inserted
replaced
173:257f09a63dab | 174:c753db8eb446 |
---|---|
91 export CFLAGS | 91 export CFLAGS |
92 export RANLIB AR STRIP | 92 export RANLIB AR STRIP |
93 | 93 |
94 ifeq ($(STATIC), 1) | 94 ifeq ($(STATIC), 1) |
95 LDFLAGS+=-static | 95 LDFLAGS+=-static |
96 SPREFIX=static | |
97 else | |
98 SPREFIX= | |
99 endif | 96 endif |
100 | 97 |
101 ifeq ($(MULTI), 1) | 98 ifeq ($(MULTI), 1) |
102 TARGETS=dropbearmulti | 99 TARGETS=dropbearmulti |
103 else | 100 else |
114 # TODO | 111 # TODO |
115 | 112 |
116 all: $(TARGETS) | 113 all: $(TARGETS) |
117 | 114 |
118 strip: $(TARGETS) | 115 strip: $(TARGETS) |
119 $(STRIP) $(addsuffix $(EXEEXT), $(addprefix $(SPREFIX), $(TARGETS))) | 116 $(STRIP) $(addsuffix $(EXEEXT), $(TARGETS)) |
120 | 117 |
121 install: $(addprefix inst_, $(TARGETS)) | 118 install: $(addprefix inst_, $(TARGETS)) |
122 | 119 |
123 installdropbearmulti: insdbmulti $(addprefix insmulti, $(PROGRAMS)) | 120 installdropbearmulti: insdbmulti $(addprefix insmulti, $(PROGRAMS)) |
124 | 121 |
125 insdbmulti: dropbearmulti | 122 insdbmulti: dropbearmulti |
126 $(INSTALL) -d -m 755 $(DESTDIR)$(bindir) | 123 $(INSTALL) -d -m 755 $(DESTDIR)$(bindir) |
127 $(INSTALL) -m 755 $(SPREFIX)dropbearmulti$(EXEEXT) $(DESTDIR)$(bindir) | 124 $(INSTALL) -m 755 dropbearmulti$(EXEEXT) $(DESTDIR)$(bindir) |
128 -chown root $(DESTDIR)$(bindir)/$(SPREFIX)dropbearmulti$(EXEEXT) | 125 -chown root $(DESTDIR)$(bindir)/dropbearmulti$(EXEEXT) |
129 -chgrp 0 $(DESTDIR)$(bindir)/$(SPREFIX)dropbearmulti$(EXEEXT) | 126 -chgrp 0 $(DESTDIR)$(bindir)/dropbearmulti$(EXEEXT) |
130 | 127 |
131 insmultidropbear: dropbearmulti | 128 insmultidropbear: dropbearmulti |
132 -rm -f $(DESTDIR)$(sbindir)/$(SPREFIX)dropbear$(EXEEXT) | 129 -rm -f $(DESTDIR)$(sbindir)/dropbear$(EXEEXT) |
133 -ln -s $(DESTDIR)$(bindir)/$(SPREFIX)dropbearmulti$(EXEEXT) $(DESTDIR)$(sbindir)/$(SPREFIX)dropbear$(EXEEXT) | 130 -ln -s $(DESTDIR)$(bindir)/dropbearmulti$(EXEEXT) $(DESTDIR)$(sbindir)/dropbear$(EXEEXT) |
134 | 131 |
135 insmulti%: dropbearmulti | 132 insmulti%: dropbearmulti |
136 -rm -f $(DESTDIR)$(bindir)/$(SPREFIX)$*$(EXEEXT) | 133 -rm -f $(DESTDIR)$(bindir)/$*$(EXEEXT) |
137 -ln -s $(DESTDIR)$(bindir)/$(SPREFIX)dropbearmulti$(EXEEXT) $(DESTDIR)$(bindir)/$(SPREFIX)$*$(EXEEXT) | 134 -ln -s $(DESTDIR)$(bindir)/dropbearmulti$(EXEEXT) $(DESTDIR)$(bindir)/$*$(EXEEXT) |
138 | 135 |
139 # dropbear should go in sbin, so it needs a seperate rule | 136 # dropbear should go in sbin, so it needs a seperate rule |
140 inst_dropbear: dropbear | 137 inst_dropbear: dropbear |
141 $(INSTALL) -d -m 755 $(DESTDIR)$(sbindir) | 138 $(INSTALL) -d -m 755 $(DESTDIR)$(sbindir) |
142 $(INSTALL) -m 755 $(SPREFIX)dropbear$(EXEEXT) $(DESTDIR)$(sbindir) | 139 $(INSTALL) -m 755 dropbear$(EXEEXT) $(DESTDIR)$(sbindir) |
143 -chown root $(DESTDIR)$(sbindir)/$(SPREFIX)dropbear$(EXEEXT) | 140 -chown root $(DESTDIR)$(sbindir)/dropbear$(EXEEXT) |
144 -chgrp 0 $(DESTDIR)$(sbindir)/$(SPREFIX)dropbear$(EXEEXT) | 141 -chgrp 0 $(DESTDIR)$(sbindir)/dropbear$(EXEEXT) |
145 | 142 |
146 inst_%: $* | 143 inst_%: $* |
147 $(INSTALL) -d -m 755 $(DESTDIR)$(bindir) | 144 $(INSTALL) -d -m 755 $(DESTDIR)$(bindir) |
148 $(INSTALL) -m 755 $(SPREFIX)$*$(EXEEXT) $(DESTDIR)$(bindir) | 145 $(INSTALL) -m 755 $*$(EXEEXT) $(DESTDIR)$(bindir) |
149 -chown root $(DESTDIR)$(bindir)/$(SPREFIX)$*$(EXEEXT) | 146 -chown root $(DESTDIR)$(bindir)/$*$(EXEEXT) |
150 -chgrp 0 $(DESTDIR)$(bindir)/$(SPREFIX)$*$(EXEEXT) | 147 -chgrp 0 $(DESTDIR)$(bindir)/$*$(EXEEXT) |
151 | 148 |
152 | 149 |
153 # for some reason the rule further down doesn't like $($@objs) as a prereq. | 150 # for some reason the rule further down doesn't like $($@objs) as a prereq. |
154 dropbear: $(dropbearobjs) | 151 dropbear: $(dropbearobjs) |
155 dbclient: $(dbclientobjs) | 152 dbclient: $(dbclientobjs) |
156 dropbearkey: $(dropbearkeyobjs) | 153 dropbearkey: $(dropbearkeyobjs) |
157 dropbearconvert: $(dropbearconvertobjs) | 154 dropbearconvert: $(dropbearconvertobjs) |
158 | 155 |
159 dropbear dbclient dropbearkey dropbearconvert: $(HEADERS) $(LTC) $(LTM) \ | 156 dropbear dbclient dropbearkey dropbearconvert: $(HEADERS) $(LTC) $(LTM) \ |
160 Makefile | 157 Makefile |
161 $(LD) $(LDFLAGS) -o $(SPREFIX)$@$(EXEEXT) $($@objs) $(LIBS) | 158 $(LD) $(LDFLAGS) -o $@$(EXEEXT) $($@objs) $(LIBS) |
162 | 159 |
163 # scp doesn't use the libs so is special. | 160 # scp doesn't use the libs so is special. |
164 scp: $(SCPOBJS) $(HEADERS) Makefile | 161 scp: $(SCPOBJS) $(HEADERS) Makefile |
165 $(LD) $(LDFLAGS) -o $(SPREFIX)$@$(EXEEXT) $(SCPOBJS) | 162 $(LD) $(LDFLAGS) -o $@$(EXEEXT) $(SCPOBJS) |
166 | 163 |
167 | 164 |
168 # multi-binary compilation. | 165 # multi-binary compilation. |
169 MULTIOBJS= | 166 MULTIOBJS= |
170 ifeq ($(MULTI),1) | 167 ifeq ($(MULTI),1) |
173 endif | 170 endif |
174 | 171 |
175 dropbearmulti: multilink | 172 dropbearmulti: multilink |
176 | 173 |
177 multibinary: $(HEADERS) $(MULTIOBJS) $(LTC) $(LTM) Makefile | 174 multibinary: $(HEADERS) $(MULTIOBJS) $(LTC) $(LTM) Makefile |
178 $(LD) $(LDFLAGS) -o $(SPREFIX)dropbearmulti$(EXEEXT) $(MULTIOBJS) $(LIBS) | 175 $(LD) $(LDFLAGS) -o dropbearmulti$(EXEEXT) $(MULTIOBJS) $(LIBS) |
179 | 176 |
180 multilink: multibinary $(addprefix link, $(PROGRAMS)) | 177 multilink: multibinary $(addprefix link, $(PROGRAMS)) |
181 | 178 |
182 link%: | 179 link%: |
183 -rm -f $(SPREFIX)$*$(EXEEXT) | 180 -rm -f $*$(EXEEXT) |
184 -ln -s $(SPREFIX)dropbearmulti$(EXEEXT) $(SPREFIX)$*$(EXEEXT) | 181 -ln -s dropbearmulti$(EXEEXT) $*$(EXEEXT) |
185 | 182 |
186 $(LTC): options.h | 183 $(LTC): options.h |
187 cd libtomcrypt && $(MAKE) clean && $(MAKE) | 184 cd libtomcrypt && $(MAKE) clean && $(MAKE) |
188 | 185 |
189 $(LTM): options.h | 186 $(LTM): options.h |
199 objdump -t dropbear|grep ".text"|cut -d "." -f 2|sort -rn | 196 objdump -t dropbear|grep ".text"|cut -d "." -f 2|sort -rn |
200 | 197 |
201 clean: ltc-clean ltm-clean thisclean | 198 clean: ltc-clean ltm-clean thisclean |
202 | 199 |
203 thisclean: | 200 thisclean: |
204 -rm -f dropbear dbclient dropbearkey dropbearconvert scp scp-progress | 201 -rm -f dropbear dbclient dropbearkey dropbearconvert scp scp-progress \ |
205 -rm -f staticdropbear staticdropbearkey staticdropbearconvert staticscp | 202 dropbearmulti *.o *.da *.bb *.bbg *.prof |
206 -rm -f dropbearmulti staticdropbearmulti | |
207 -rm -f *.o *.da *.bb *.bbg *.prof | |
208 | 203 |
209 distclean: clean tidy | 204 distclean: clean tidy |
210 -rm -f config.h | 205 -rm -f config.h |
211 -rm -f Makefile | 206 -rm -f Makefile |
212 | 207 |