Update head to match stable 1.0
[gnupg.git] / scripts / conf-riscos / Makefile
1 # Makefile for the RISC OS version of GnuPG
2 CC=cc
3 LINK=link
4 AS=objasm
5 MAKE=amu
6 DEPEND=-depend !Depend
7 LIBLDAP=^.^.openldap-2/0/18
8 CC_FLAGS=-Wp -apcs 3/26bit/fpe2 -throwback -Otime -IUnix:,include,mpi,intl,zlib,$(LIBLDAP).include -JUnix: -D__riscos__ -DHAVE_CONFIG_H -DNO_ASM -UIS_MODULE -DVERSION="\"$(GnuPG$Version)\"" $(GnuPG$DevDefine)
9 AS_FLAGS=-apcs 3/26bit/fpe2 -throwback -predefine "ARMv4 SETA 0"
10 LD_FLAGS=Unix:o.unixlib
11 CIPHER_OBJS=cipher.o.blowfish \
12         cipher.o.cast5 \
13         cipher.o.cipher \
14         cipher.o.construct \
15         cipher.o.des \
16         cipher.o.dsa \
17         cipher.o.dynload \
18         cipher.o.elgamal \
19         cipher.o.g10c \
20         cipher.o.md \
21         cipher.o.md5 \
22         cipher.o.primegen \
23         cipher.o.pubkey \
24         cipher.o.random \
25         cipher.o.rijndael \
26         cipher.o.rmd160 \
27         cipher.o.rndriscos \
28         cipher.o.rsa \
29         cipher.o.sha1 \
30         cipher.o.smallprime \
31         cipher.o.tiger32 \
32         cipher.o.twofish
33 GETTEXT_OBJS=intl.o.bindtextdom \
34         intl.o.dcgettext \
35         intl.o.dgettext \
36         intl.o.explodename \
37         intl.o.finddomain \
38         intl.o.gettext \
39         intl.o.intl-compat \
40         intl.o.l10nflist \
41         intl.o.loadmsgcat \
42         intl.o.localealias \
43         intl.o.textdomain
44 MPI_OBJS=mpi.o.mpi-add \
45         mpi.o.mpi-bit \
46         mpi.o.mpi-cmp \
47         mpi.o.mpi-div \
48         mpi.o.mpi-gcd \
49         mpi.o.mpi-inline \
50         mpi.o.mpi-inv \
51         mpi.o.mpi-mul \
52         mpi.o.mpi-pow \
53         mpi.o.mpi-mpow \
54         mpi.o.mpi-scan \
55         mpi.o.mpicoder \
56         mpi.o.mpih-div \
57         mpi.o.mpih-mul \
58         mpi.o.mpiutil \
59         mpi.o.g10m \
60         mpi.arm.o.mpih
61 UTIL_OBJS=util.o.argparse \
62         util.o.dotlock \
63         util.o.errors \
64         util.o.fileutil \
65         util.o.g10u \
66         util.o.http \
67         util.o.iobuf \
68         util.o.logger \
69         util.o.memory \
70         util.o.miscutil \
71         util.o.secmem \
72         util.o.strgutil \
73         util.o.ttyio \
74         util.o.riscos
75 ZLIB_OBJS=zlib.o.adler32 \
76         zlib.o.compress \
77         zlib.o.crc32 \
78         zlib.o.deflate \
79         zlib.o.infblock \
80         zlib.o.infcodes \
81         zlib.o.inffast \
82         zlib.o.inflate \
83         zlib.o.inftrees \
84         zlib.o.infutil \
85         zlib.o.trees \
86         zlib.o.uncompr \
87         zlib.o.zutil
88 G10_OBJS=g10.o.armor \
89         g10.o.build-packet \
90         g10.o.cipher \
91         g10.o.comment \
92         g10.o.compress \
93         g10.o.dearmor \
94         g10.o.decrypt \
95         g10.o.delkey \
96         g10.o.encode \
97         g10.o.encr-data \
98         g10.o.exec \
99         g10.o.export \
100         g10.o.free-packet \
101         g10.o.g10 \
102         g10.o.getkey \
103         g10.o.helptext \
104         g10.o.hkp \
105         g10.o.import \
106         g10.o.kbnode \
107         g10.o.keydb \
108         g10.o.keyedit \
109         g10.o.keygen \
110         g10.o.keyid \
111         g10.o.keylist \
112         g10.o.keyring \
113         g10.o.keyserver \
114         g10.o.mainproc \
115         g10.o.mdfilter \
116         g10.o.misc \
117         g10.o.mkdtemp \
118         g10.o.openfile \
119         g10.o.parse-packet \
120         g10.o.passphrase \
121         g10.o.photoid \
122         g10.o.pipemode \
123         g10.o.pkclist \
124         g10.o.plaintext \
125         g10.o.pubkey-enc \
126         g10.o.revoke \
127         g10.o.seckey-cert \
128         g10.o.seskey \
129         g10.o.sig-check \
130         g10.o.sign \
131         g10.o.signal \
132         g10.o.skclist \
133         g10.o.status \
134         g10.o.tdbdump \
135         g10.o.tdbio \
136         g10.o.textfilter \
137         g10.o.trustdb \
138         g10.o.verify
139 GPGV_OBJS=g10.o.armor \
140         g10.o.build-packet \
141         g10.o.compress \
142         g10.o.free-packet \
143         g10.o.getkey \
144         g10.o.gpgv \
145         g10.o.keydb \
146         g10.o.keylist \
147         g10.o.kbnode \
148         g10.o.keyid \
149         g10.o.keyring \
150         g10.o.mainproc \
151         g10.o.mdfilter \
152         g10.o.misc \
153         g10.o.openfile \
154         g10.o.parse-packet \
155         g10.o.plaintext \
156         g10.o.seskey \
157         g10.o.sig-check \
158         g10.o.signal \
159         g10.o.status \
160         g10.o.textfilter \
161         g10.o.verify \
162         util.o.argparse \
163         util.o.errors \
164         util.o.fileutil \
165         util.o.g10u \
166         util.o.iobuf \
167         util.o.logger \
168         util.o.memory \
169         util.o.miscutil \
170         util.o.secmem \
171         util.o.strgutil \
172         util.o.riscos \
173         cipher.o.constructv \
174         cipher.o.dsa \
175         cipher.o.dynload \
176         cipher.o.elgamal \
177         cipher.o.g10c \
178         cipher.o.md \
179         cipher.o.pubkey \
180         cipher.o.rmd160 \
181         cipher.o.rsa \
182         mpi.mpi \
183         zlib.zlib
184 GPGKEYS_OBJS=util.o.riscos \
185         util.o.strgutil \
186         util.o.memory \
187         util.o.logger \
188         util.o.secmem \
189         intl.gettext
190
191 ## Rule Patterns ##
192
193 .SUFFIXES:      .c .o .s
194
195 .c.o:
196         $(CC) $(CC_FLAGS) $(DEPEND) -c -o $@ $<
197
198 .s.o:
199         $(AS) $(AS_FLAGS) $(DEPEND) $< $@
200
201 # Static dependencies:
202
203 all:
204         @echo Use one of the following as target:
205         @echo |  dev   to build the development version
206         @echo |  dist  to build the distribution with all archives
207         @echo All other targets are internal and shouldn't be used!
208
209 cipher.cipher: $(CIPHER_OBJS)
210         $(LINK) -aof $(CIPHER_OBJS) -o cipher.cipher
211
212 intl.gettext: $(GETTEXT_OBJS)
213         $(LINK) -aof $(GETTEXT_OBJS) -o intl.gettext
214
215 mpi.mpi: $(MPI_OBJS)
216         $(LINK) -aof $(MPI_OBJS) -o mpi.mpi
217
218 tools.gpgsplit: tools.o.gpgsplit util.util intl.gettext zlib.zlib
219         $(LINK) $(LD_FLAGS) tools.o.gpgsplit util.util intl.gettext zlib.zlib -o tools.gpgsplit
220         -squeeze tools.gpgsplit
221         -copy tools.gpgsplit ADFS::A5.$.tmp.!GnuPG.gpgsplit ~CF~V
222
223 keyserver.gpgkeys_ldap: keyserver.o.gpgkeys_ldap $(GPGKEYS_OBJS) $(LIBLDAP).libraries.libldap.libldap
224         $(LINK) $(LD_FLAGS) keyserver.o.gpgkeys_ldap $(GPGKEYS_OBJS) $(LIBLDAP).libraries.libldap.libldap -o keyserver.gpgkeys_ldap
225         -squeeze keyserver.gpgkeys_ldap
226         -copy keyserver.gpgkeys_ldap ADFS::A5.$.tmp.!GnuPG.gpgkeys_ldap ~CF~V
227
228 riscos.jpegview.jpegview:
229         -dir riscos.jpegview
230         -$(MAKE)
231         -back
232
233 util.util: $(UTIL_OBJS)
234         $(LINK) -aof $(UTIL_OBJS) -o util.util
235
236 zlib.zlib: $(ZLIB_OBJS)
237         $(LINK) -aof zlib.o.* -o zlib.zlib
238
239 g10.gpg: $(G10_OBJS) cipher.o.idea cipher.cipher intl.gettext mpi.mpi util.util zlib.zlib BUILD
240         $(LINK) $(G10_OBJS) $(LD_FLAGS) cipher.o.idea cipher.cipher intl.gettext mpi.mpi util.util zlib.zlib -o g10.gpg
241         -copy g10.gpg ADFS::A5.$.tmp.!GnuPG.gpg ~CFR~V
242
243 g10.gpgv: $(GPGV_OBJS) intl.gettext BUILD
244         $(LINK) $(GPGV_OBJS) intl.gettext $(LD_FLAGS) -o g10.gpgv
245         -copy g10.gpgv ADFS::A5.$.tmp.!GnuPG.gpgv ~CFR~V
246
247 g10.gpgpart: $(G10_OBJS) cipher.cipher intl.gettext mpi.mpi util.util zlib.zlib BUILD
248         drlink034 -aof $(G10_OBJS) $(LD_FLAGS) cipher.cipher intl.gettext mpi.mpi util.util zlib.zlib -o g10.gpgpart
249
250 select-idea-src:
251         -copy distrib.idea-addon.cipher.c.idea cipher.c.idea ~CF~NR~V
252         $(CC) $(CC_FLAGS) $(DEPEND) -c -o cipher.o.idea cipher.c.idea
253
254 select-gpl-src:
255         -copy distrib.non-idea.cipher.c.idea cipher.c.idea ~CF~NR~V
256         $(CC) $(CC_FLAGS) $(DEPEND) -c -o cipher.o.idea cipher.c.idea
257
258 distrib.gnupgsrc/zip: select-gpl-src
259         -zip -9@ distrib.gnupgsrc/zip < distrib.resources.distfiles
260
261 distrib.gnupg/zip: distrib.gpl-bin.!GnuPG.JPEGview distrib.gpl-bin.!GnuPG.gpgsplit distrib.gpl-bin.!GnuPG.gpg distrib.gpl-bin.!GnuPG.gpgv select-gpl-src
262         -copy distrib.resources.History distrib.gpl-bin.History ~CFR~V
263         -copy distrib.resources.Upgrading distrib.gpl-bin.Upgrading ~CFR~V
264         -copy distrib.resources.ReadMe_bin distrib.gpl-bin.!ReadMe1st ~CFR~V
265         -copy distrib.resources.!GnuPG distrib.gpl-bin.!GnuPG ~CFR~V
266         -copy distrib.resources.!GnuPGUser distrib.gpl-bin.!GnuPGUser ~CFR~V
267         -copy distrib.resources.!System distrib.gpl-bin.!System ~CFR~V
268         -copy distrib.resources.orig_docs distrib.gpl-bin.orig_docs ~CFR~V
269         -dir distrib.gpl-bin
270         -zip -r9 ^.gnupg/zip *
271         -back
272
273 distrib.gnupgdev/zip: distrib.private.!GnuPG.JPEGview distrib.private.!GnuPG.gpgsplit distrib.private.!GnuPG.gpgkeys_ldap distrib.private.!GnuPG.gpg distrib.private.!GnuPG.gpgv select-idea-src
274         -ifthere distrib.private.!GnuPG.locale then wipe distrib.private.!GnuPG.locale ~CFR~V
275         -copy distrib.intl.!GnuPG.locale distrib.private.!GnuPG.locale ~CFR~V
276         -copy distrib.resources.History distrib.private.History ~CFR~V
277         -copy distrib.resources.Upgrading distrib.private.Upgrading ~CFR~V
278         -copy distrib.resources.ReadMe_bin distrib.private.!ReadMe1st ~CFR~V
279         -copy distrib.resources.!GnuPG distrib.private.!GnuPG ~CFR~V
280         -copy distrib.resources.!GnuPGUser distrib.private.!GnuPGUser ~CFR~V
281         -copy distrib.resources.!System distrib.private.!System ~CFR~V
282         -copy distrib.resources.orig_docs distrib.private.orig_docs ~CFR~V
283         -dir distrib.private
284         -zip -r9 ^.gnupgdev/zip *
285         -back
286
287 distrib.gnupgidea/zip: cipher.o.idea select-idea-src
288         -copy distrib.resources.ReadMe_idea distrib.idea-addon.!ReadMe ~CFR~V
289         -copy cipher.o.idea distrib.idea-addon.cipher.o.idea ~CFR~V
290         -dir distrib.idea-addon
291         -zip -r9 ^.gnupgidea/zip *
292         -back
293
294 distrib.gnupgpart/zip: g10.gpgpart select-idea-src
295         -copy distrib.resources.ReadMe_part distrib.part.!ReadMe1st ~CFR~V
296         -copy g10.gpgpart distrib.part.g10.gpgpart ~CFR~V
297         -dir distrib.part
298         -zip -r9 ^.gnupgpart/zip *
299         -back
300
301 distrib.gnupgldap/zip: keyserver.gpgkeys_ldap
302         -copy distrib.resources.ReadMe_ldap distrib.ldap.!ReadMe ~CFR~V
303         -copy keyserver.gpgkeys_ldap distrib.ldap.!GnuPG.gpgkeys_ldap ~CFR~V
304         -dir distrib.ldap
305         -zip -r9 ^.gnupgldap/zip *
306         -back
307
308 distrib.gnupgintl/zip:
309         -dir distrib.intl
310         -zip -r9 ^.gnupgintl/zip *
311         -back
312
313 distrib.gpl-bin.!GnuPG.gpg: g10.gpg
314         -copy g10.gpg distrib.gpl-bin.!GnuPG.gpg ~CFR~V
315         -squeeze distrib.gpl-bin.!GnuPG.gpg
316
317 distrib.gpl-bin.!GnuPG.gpgv: g10.gpgv
318         -copy g10.gpgv distrib.gpl-bin.!GnuPG.gpgv ~CFR~V
319         -squeeze distrib.gpl-bin.!GnuPG.gpgv
320
321 distrib.gpl-bin.!GnuPG.gpgsplit: tools.gpgsplit
322         -copy tools.gpgsplit distrib.gpl-bin.!GnuPG.gpgsplit ~CFR~V
323         -squeeze distrib.gpl-bin.!GnuPG.gpgsplit
324
325 distrib.gpl-bin.!GnuPG.JPEGview: riscos.jpegview.jpegview
326         -copy riscos.jpegview.jpegview distrib.gpl-bin.!GnuPG.JPEGview ~CFR~V
327
328 distrib.private.!GnuPG.gpg: g10.gpg
329         -copy g10.gpg distrib.private.!GnuPG.gpg ~CFR~V
330         -squeeze distrib.private.!GnuPG.gpg
331
332 distrib.private.!GnuPG.gpgv: g10.gpgv
333         -copy g10.gpgv distrib.private.!GnuPG.gpgv ~CFR~V
334         -squeeze distrib.private.!GnuPG.gpgv
335
336 distrib.private.!GnuPG.gpgsplit: tools.gpgsplit
337         -copy tools.gpgsplit distrib.private.!GnuPG.gpgsplit ~CFR~V
338         -squeeze distrib.private.!GnuPG.gpgsplit
339
340 distrib.private.!GnuPG.gpgkeys_ldap: keyserver.gpgkeys_ldap
341         -copy keyserver.gpgkeys_ldap distrib.private.!GnuPG.gpgkeys_ldap ~CFR~V
342         -squeeze distrib.private.!GnuPG.gpgkeys_ldap
343
344 distrib.private.!GnuPG.JPEGview: riscos.jpegview.jpegview
345         -copy riscos.jpegview.jpegview distrib.private.!GnuPG.JPEGview ~CFR~V
346
347 clean-cipher:
348         -ifthere cipher.o.* then wipe cipher.o.* ~CFR~V
349         -ifthere cipher.cipher then wipe cipher.cipher ~CFR~V
350
351 clean-intl:
352         -ifthere intl.o.* then wipe intl.o.* ~CFR~V
353         -ifthere intl.gettext then wipe intl.gettext ~CFR~V
354
355 clean-mpi:
356         -ifthere mpi.o.* then wipe mpi.o.* ~CFR~V
357         -ifthere mpi.arm.o.* then wipe mpi.arm.o.* ~CFR~V
358         -ifthere mpi.mpi then wipe mpi.mpi ~CFR~V
359
360 clean-util:
361         -ifthere util.o.* then wipe util.o.* ~CFR~V
362         -ifthere util.util then wipe util.util ~CFR~V
363
364 clean-zlib:
365         -ifthere zlib.o.* then wipe zlib.o.* ~CFR~V
366         -ifthere zlib.zlib then wipe zlib.zlib ~CFR~V
367
368 clean-dist:
369         -ifthere distrib.*/zip then wipe distrib.*/zip ~CFR~V
370
371 clean-g10:
372         -ifthere g10.gpg then wipe g10.gpg ~CFR~V
373         -ifthere g10.gpgv then wipe g10.gpgv ~CFR~V
374         -ifthere g10.gpgpart then wipe g10.gpgpart ~CFR~V
375         -ifthere g10.o.* then wipe g10.o.* ~CFR~V
376
377 clean-keyserver:
378         -ifthere keyserver.gpgkeys_* then wipe keyserver.gpgkeys_* ~CFR~V
379         -ifthere keyserver.o.* then wipe keyserver.o.* ~CFR~V
380
381 clean-tools:
382         -ifthere tools.gpgsplit then wipe tools.gpgsplit ~CFR~V
383         -ifthere tools.o.* then wipe tools.o.* ~CFR~V
384
385 clean-riscos:
386         -ifthere riscos.jpegview.jpegview then wipe riscos.jpegview.jpegview ~CFR~V
387
388 clean-version:
389         -ifthere g10.o.armor then wipe g10.o.armor ~CFR~V
390         -ifthere g10.o.encode then wipe g10.o.encode ~CFR~V
391         -ifthere g10.o.g10 then wipe g10.o.g10 ~CFR~V
392         -ifthere g10.o.gpgv then wipe g10.o.gpgv ~CFR~V
393         -ifthere g10.o.keygen then wipe g10.o.keygen ~CFR~V
394         -ifthere g10.o.sign then wipe g10.o.sign ~CFR~V
395         -ifthere g10.gpg then wipe g10.gpg ~CFR~V
396         -ifthere g10.gpgv then wipe g10.gpgv ~CFR~V
397         -ifthere g10.gpgpart then wipe g10.gpgpart ~CFR~V
398
399 clean: clean-dist clean-cipher clean-intl clean-mpi clean-util clean-zlib clean-g10 clean-keyserver clean-tools clean-riscos
400
401 g10.o.armor: BUILD
402         $(CC) $(CC_FLAGS) $(DEPEND) -c -o g10.o.armor g10.c.armor
403
404 g10.o.encode: BUILD
405         $(CC) $(CC_FLAGS) $(DEPEND) -c -o g10.o.encode g10.c.encode
406
407 g10.o.g10: BUILD
408         $(CC) $(CC_FLAGS) $(DEPEND) -c -o g10.o.g10 g10.c.g10
409
410 g10.o.gpgv: BUILD
411         $(CC) $(CC_FLAGS) $(DEPEND) -c -o g10.o.gpgv g10.c.gpgv
412
413 g10.o.keygen: BUILD
414         $(CC) $(CC_FLAGS) $(DEPEND) -c -o g10.o.keygen g10.c.keygen
415
416 g10.o.sign: BUILD
417         $(CC) $(CC_FLAGS) $(DEPEND) -c -o g10.o.sign g10.c.sign
418
419 dev: clean-version
420         $(MAKE) fast-dev
421
422 fast-dev: BUILD
423         setver configure/ac AC_INIT(gnupg, , dev
424         wipe distrib.private.!GnuPG.gpg* ~CFR~V
425         -$(MAKE) keyserver.gpgkeys_ldap
426         $(MAKE) tools.gpgsplit
427         $(MAKE) distrib.gnupgdev/zip
428         ifthere <WebServe$ServeRoot>.private.gnupgdev/zip then wipe <WebServe$ServeRoot>.private.gnupgdev/zip ~CFR~V
429         rename distrib.gnupgdev/zip <WebServe$ServeRoot>.private.gnupgdev/zip
430
431 dist: BUILD clean-version tools.gpgsplit
432         setver configure/ac AC_INIT(gnupg, , dist
433         wipe distrib.gpl-bin.!GnuPG.gpg* ~CFR~V
434         $(MAKE) distrib.gnupg/zip
435         $(MAKE) distrib.gnupgidea/zip
436         $(MAKE) distrib.gnupgpart/zip
437         wipe distrib.private.!GnuPG.gpg* ~CFR~V
438         $(MAKE) distrib.gnupgdev/zip
439         $(MAKE) distrib.gnupgsrc/zip
440         $(MAKE) distrib.gnupgintl/zip
441         $(MAKE) distrib.gnupgldap/zip
442         $(MAKE) select-idea-src
443         ifthere <WebServe$ServeRoot>.archives.gnupg/zip then wipe <WebServe$ServeRoot>.archives.gnupg/zip ~CFR~V
444         ifthere <WebServe$ServeRoot>.private.gnupgdev/zip then wipe <WebServe$ServeRoot>.private.gnupgdev/zip ~CFR~V
445         ifthere <WebServe$ServeRoot>.archives.gnupgidea/zip then wipe <WebServe$ServeRoot>.archives.gnupgidea/zip ~CFR~V
446         ifthere <WebServe$ServeRoot>.archives.gnupgpart/zip then wipe <WebServe$ServeRoot>.archives.gnupgpart/zip ~CFR~V
447         ifthere <WebServe$ServeRoot>.archives.gnupgsrc/zip then wipe <WebServe$ServeRoot>.archives.gnupgsrc/zip ~CFR~V
448         ifthere <WebServe$ServeRoot>.archives.gnupgintl/zip then wipe <WebServe$ServeRoot>.archives.gnupgintl/zip ~CFR~V
449         ifthere <WebServe$ServeRoot>.archives.gnupgldap/zip then wipe <WebServe$ServeRoot>.archives.gnupgldap/zip ~CFR~V
450         ifthere <WebServe$ServeRoot>.gnupg_history/txt then wipe <WebServe$ServeRoot>.gnupg_history/txt ~CFR~V
451         ifthere <WebServe$ServeRoot>.gnupg_news/txt then wipe <WebServe$ServeRoot>.gnupg_news/txt ~CFR~V
452         rename distrib.gnupgdev/zip <WebServe$ServeRoot>.private.gnupgdev/zip
453         rename distrib.gnupg/zip <WebServe$ServeRoot>.archives.gnupg/zip
454         rename distrib.gnupgidea/zip <WebServe$ServeRoot>.archives.gnupgidea/zip
455         rename distrib.gnupgpart/zip <WebServe$ServeRoot>.archives.gnupgpart/zip
456         rename distrib.gnupgsrc/zip <WebServe$ServeRoot>.archives.gnupgsrc/zip
457         rename distrib.gnupgintl/zip <WebServe$ServeRoot>.archives.gnupgintl/zip
458         rename distrib.gnupgldap/zip <WebServe$ServeRoot>.archives.gnupgldap/zip
459         copy distrib.resources.History <WebServe$ServeRoot>.gnupg_history/txt ~CFR~V
460         copy distrib.resources.orig_docs.NEWS <WebServe$ServeRoot>.gnupg_news/txt ~CFR~V
461         unset GnuPG$DevDefine
462         unset GnuPG$Version
463         updatesigs <WebServe$ServeRoot>.archives --secring adfs::ap.$.secring/gpg
464
465 # Dynamic dependencies: