Artifact
65804b9a8584465f6ba136275dd035c298ee26e5 :
File
keccak/Makefile.forth
— part of check-in
[a57ef4485f]
at
2014-12-09 02:21:43
on branch trunk
— Threefish as symmetric crypto
(user:
bernd
size: 1595)
File
keccakp/Makefile.forth
— part of check-in
[90b0958714]
at
2020-01-12 21:09:56
on branch trunk
— Improve haves
(user:
bernd
size: 1595)
0000: 23 20 47 65 6e 65 72 69 63 20 6d 61 6b 65 66 69 # Generic makefi
0010: 6c 65 2c 20 66 6f 72 20 63 72 6f 73 73 63 6f 6d le, for crosscom
0020: 70 69 6c 69 6e 67 20 75 73 65 20 6d 61 6b 65 20 piling use make
0030: 2d 66 20 4d 61 6b 65 66 69 6c 65 2e 3c 74 61 72 -f Makefile.<tar
0040: 67 65 74 3e 0a 0a 49 4e 43 4c 55 44 45 53 20 20 get>..INCLUDES
0050: 20 3d 20 2d 49 24 28 4e 44 4b 29 2f 75 73 72 2f = -I$(NDK)/usr/
0060: 69 6e 63 6c 75 64 65 20 2d 49 24 28 4e 44 4b 29 include -I$(NDK)
0070: 2f 75 73 72 2f 6c 6f 63 61 6c 2f 69 6e 63 6c 75 /usr/local/inclu
0080: 64 65 2f 0a 53 57 49 47 20 20 20 20 20 20 20 3d de/.SWIG =
0090: 20 2f 75 73 72 2f 62 69 6e 2f 73 77 69 67 0a 54 /usr/bin/swig.T
00a0: 41 52 47 45 54 53 20 20 20 20 3d 20 6b 65 63 63 ARGETS = kecc
00b0: 61 6b 2e 66 73 78 0a 4c 49 42 52 41 52 59 20 20 ak.fsx.LIBRARY
00c0: 20 20 3d 20 6c 69 62 6b 65 63 63 61 6b 2e 66 73 = libkeccak.fs
00d0: 0a 4f 50 54 49 4f 4e 53 20 20 20 20 3d 20 2d 66 .OPTIONS = -f
00e0: 6f 72 74 68 20 2d 6e 6f 2d 73 65 63 74 69 6f 6e orth -no-section
00f0: 63 6f 6d 6d 65 6e 74 73 20 2d 73 74 61 63 6b 63 comments -stackc
0100: 6f 6d 6d 65 6e 74 73 20 24 28 49 4e 43 4c 55 44 omments $(INCLUD
0110: 45 53 29 0a 49 4e 53 54 41 4c 4c 09 3d 20 2f 75 ES).INSTALL.= /u
0120: 73 72 2f 62 69 6e 2f 69 6e 73 74 61 6c 6c 20 2d sr/bin/install -
0130: 63 0a 41 52 43 48 3d 0a 56 45 52 53 49 4f 4e 09 c.ARCH=.VERSION.
0140: 3d 20 60 67 66 6f 72 74 68 20 2d 2d 76 65 72 73 = `gforth --vers
0150: 69 6f 6e 20 32 3e 26 31 20 7c 20 63 75 74 20 2d ion 2>&1 | cut -
0160: 66 32 20 2d 64 27 20 27 60 0a 53 48 45 4c 4c 09 f2 -d' '`.SHELL.
0170: 3d 20 2f 62 69 6e 2f 73 68 0a 52 4d 54 52 45 45 = /bin/sh.RMTREE
0180: 09 3d 20 72 6d 20 2d 72 66 0a 70 72 65 66 69 78 .= rm -rf.prefix
0190: 20 3d 20 0a 65 78 65 63 5f 70 72 65 66 69 78 20 = .exec_prefix
01a0: 3d 20 24 7b 70 72 65 66 69 78 7d 0a 6c 69 62 65 = ${prefix}.libe
01b0: 78 65 63 64 69 72 20 3d 20 24 28 70 61 63 6b 61 xecdir = $(packa
01c0: 67 65 29 24 7b 65 78 65 63 5f 70 72 65 66 69 78 ge)${exec_prefix
01d0: 7d 2f 6c 69 62 0a 6c 69 62 63 63 64 69 72 20 3d }/lib.libccdir =
01e0: 20 24 28 73 75 62 73 74 20 24 28 44 45 53 54 44 $(subst $(DESTD
01f0: 49 52 29 2c 2c 24 28 6c 69 62 65 78 65 63 64 69 IR),,$(libexecdi
0200: 72 29 2f 67 66 6f 72 74 68 24 28 41 52 43 48 29 r)/gforth$(ARCH)
0210: 2f 24 28 56 45 52 53 49 4f 4e 29 2f 6c 69 62 63 /$(VERSION)/libc
0220: 63 2d 6e 61 6d 65 64 2f 29 0a 73 72 63 64 69 72 c-named/).srcdir
0230: 20 3d 20 2e 0a 44 45 53 54 44 49 52 20 3d 20 2f = ..DESTDIR = /
0240: 68 6f 6d 65 2f 62 65 72 6e 64 2f 70 72 6f 6a 2f home/bernd/proj/
0250: 6e 65 74 32 6f 0a 0a 61 6c 6c 3a 20 24 28 54 41 net2o..all: $(TA
0260: 52 47 45 54 53 29 0a 0a 62 75 69 6c 64 2d 6c 69 RGETS)..build-li
0270: 62 63 63 2d 6e 61 6d 65 64 3a 20 24 28 4c 49 42 bcc-named: $(LIB
0280: 52 41 52 59 29 20 24 28 54 41 52 47 45 54 53 29 RARY) $(TARGETS)
0290: 0a 09 09 24 28 52 4d 54 52 45 45 29 20 6c 69 62 ...$(RMTREE) lib
02a0: 2f 67 66 6f 72 74 68 24 28 41 52 43 48 29 2f 24 /gforth$(ARCH)/$
02b0: 28 56 45 52 53 49 4f 4e 29 2f 6c 69 62 63 63 2d (VERSION)/libcc-
02c0: 6e 61 6d 65 64 2f 0a 09 09 2d 66 6f 72 20 69 20 named/...-for i
02d0: 69 6e 20 24 28 4c 49 42 52 41 52 59 29 3b 20 64 in $(LIBRARY); d
02e0: 6f 20 2e 2f 6c 69 62 66 6f 72 74 68 24 28 53 55 o ./libforth$(SU
02f0: 46 46 49 58 29 20 2d 65 20 22 73 5c 22 20 60 70 FFIX) -e "s\" `p
0300: 77 64 60 2f 6c 69 62 2f 67 66 6f 72 74 68 24 28 wd`/lib/gforth$(
0310: 41 52 43 48 29 2f 24 28 56 45 52 53 49 4f 4e 29 ARCH)/$(VERSION)
0320: 2f 6c 69 62 63 63 2d 6e 61 6d 65 64 2f 5c 22 20 /libcc-named/\"
0330: 6c 69 62 63 63 2d 6e 61 6d 65 64 2d 64 69 72 2d libcc-named-dir-
0340: 76 20 32 21 20 6c 69 62 63 63 2d 70 61 74 68 20 v 2! libcc-path
0350: 63 6c 65 61 72 2d 70 61 74 68 20 6c 69 62 63 63 clear-path libcc
0360: 2d 6e 61 6d 65 64 2d 64 69 72 20 6c 69 62 63 63 -named-dir libcc
0370: 2d 70 61 74 68 20 61 6c 73 6f 2d 70 61 74 68 20 -path also-path
0380: 3a 6e 6f 6e 61 6d 65 20 32 64 72 6f 70 20 73 5c :noname 2drop s\
0390: 22 20 24 28 44 45 53 54 44 49 52 29 24 28 6c 69 " $(DESTDIR)$(li
03a0: 62 63 63 64 69 72 29 5c 22 20 3b 20 69 73 20 72 bccdir)\" ; is r
03b0: 65 70 6c 61 63 65 2d 72 70 61 74 68 22 20 24 28 eplace-rpath" $(
03c0: 73 72 63 64 69 72 29 2f 24 24 69 20 2d 65 20 62 srcdir)/$$i -e b
03d0: 79 65 3b 20 64 6f 6e 65 0a 0a 6c 69 62 73 3a 20 ye; done..libs:
03e0: 62 75 69 6c 64 2d 6c 69 62 63 63 2d 6e 61 6d 65 build-libcc-name
03f0: 64 20 24 28 4c 49 42 52 41 52 59 29 0a 09 66 6f d $(LIBRARY)..fo
0400: 72 20 69 20 69 6e 20 24 28 4c 49 42 52 41 52 59 r i in $(LIBRARY
0410: 29 3b 20 64 6f 20 5c 0a 09 20 20 20 20 24 28 4c ); do \.. $(L
0420: 49 42 54 4f 4f 4c 29 20 2d 2d 73 69 6c 65 6e 74 IBTOOL) --silent
0430: 20 2d 2d 6d 6f 64 65 3d 69 6e 73 74 61 6c 6c 20 --mode=install
0440: 24 28 49 4e 53 54 41 4c 4c 29 20 6c 69 62 2f 67 $(INSTALL) lib/g
0450: 66 6f 72 74 68 24 28 41 52 43 48 29 2f 24 28 56 forth$(ARCH)/$(V
0460: 45 52 53 49 4f 4e 29 2f 6c 69 62 63 63 2d 6e 61 ERSION)/libcc-na
0470: 6d 65 64 2f 6c 69 62 67 66 60 62 61 73 65 6e 61 med/libgf`basena
0480: 6d 65 20 24 24 69 20 2e 66 73 60 2e 6c 61 20 24 me $$i .fs`.la $
0490: 28 44 45 53 54 44 49 52 29 24 28 6c 69 62 63 63 (DESTDIR)$(libcc
04a0: 64 69 72 29 6c 69 62 67 66 60 62 61 73 65 6e 61 dir)libgf`basena
04b0: 6d 65 20 24 24 69 20 2e 66 73 60 2e 6c 61 3b 20 me $$i .fs`.la;
04c0: 5c 0a 09 64 6f 6e 65 0a 0a 23 20 65 78 65 63 75 \..done..# execu
04d0: 74 65 20 63 6f 6d 70 69 6c 65 64 20 66 69 6c 65 te compiled file
04e0: 0a 25 2e 66 73 3a 20 25 2e 66 73 78 0a 09 2e 2f .%.fs: %.fsx.../
04f0: 24 3c 20 2d 67 66 6f 72 74 68 20 3e 20 24 40 0a $< -gforth > $@.
0500: 0a 23 20 63 6f 6d 70 69 6c 65 20 66 73 69 2d 66 .# compile fsi-f
0510: 69 6c 65 0a 25 2e 66 73 78 3a 20 25 2d 66 73 69 ile.%.fsx: %-fsi
0520: 2e 63 0a 09 24 28 43 43 29 20 2d 6f 20 24 40 20 .c..$(CC) -o $@
0530: 24 3c 0a 0a 23 20 75 73 65 20 73 77 69 67 20 74 $<..# use swig t
0540: 6f 20 63 72 65 61 74 65 20 74 68 65 20 66 73 69 o create the fsi
0550: 20 66 69 6c 65 0a 25 2d 66 73 69 2e 63 3a 20 25 file.%-fsi.c: %
0560: 2e 69 0a 09 24 28 53 57 49 47 29 20 24 28 4f 50 .i..$(SWIG) $(OP
0570: 54 49 4f 4e 53 29 20 2d 6f 20 24 40 20 24 28 70 TIONS) -o $@ $(p
0580: 61 74 73 75 62 73 74 20 25 2d 66 73 69 2e 63 2c atsubst %-fsi.c,
0590: 20 25 2e 69 2c 20 24 40 29 0a 0a 72 75 6e 3a 20 %.i, $@)..run:
05a0: 24 28 44 45 4d 4f 29 0a 09 67 66 6f 72 74 68 20 $(DEMO)..gforth
05b0: 24 28 44 45 4d 4f 29 0a 0a 2e 50 48 4f 4e 59 3a $(DEMO)...PHONY:
05c0: 20 63 6c 65 61 6e 0a 0a 63 6c 65 61 6e 3a 0a 09 clean..clean:..
05d0: 72 6d 20 2d 66 20 24 28 54 41 52 47 45 54 53 29 rm -f $(TARGETS)
05e0: 0a 09 72 6d 20 2d 66 20 24 28 70 61 74 73 75 62 ..rm -f $(patsub
05f0: 73 74 20 25 2e 66 73 78 2c 20 25 2d 66 73 69 2e st %.fsx, %-fsi.
0600: 63 2c 20 24 28 54 41 52 47 45 54 53 29 29 0a 09 c, $(TARGETS))..
0610: 72 6d 20 2d 66 20 24 28 70 61 74 73 75 62 73 74 rm -f $(patsubst
0620: 20 25 2e 66 73 78 2c 20 25 2e 66 73 2c 20 24 28 %.fsx, %.fs, $(
0630: 54 41 52 47 45 54 53 29 29 0a 0a TARGETS))..