diff options
| author | EuAndreh <eu@euandre.org> | 2024-03-20 03:38:00 -0300 |
|---|---|---|
| committer | EuAndreh <eu@euandre.org> | 2024-03-20 03:38:05 -0300 |
| commit | 4ce404bc32e46b7cdcb834f0077cda2219988e44 (patch) | |
| tree | b86a2735e20e876c08718986f8d32a514df4a502 /Makefile | |
| parent | tests/js/hero.mjs: Fix function ordering (diff) | |
| download | papod-4ce404bc32e46b7cdcb834f0077cda2219988e44.tar.gz papod-4ce404bc32e46b7cdcb834f0077cda2219988e44.tar.xz | |
tests/rand.mjs: Add MersenneTwister random number generator
The `tests/rand.c` is also added: a simplified adaptation of the
original algorithm implementation in C. A 10k numbers test case shows
that the JavaScript version behaves the same that the C one does.
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -22,7 +22,7 @@ DESTDIR = .SUFFIXES: -.SUFFIXES: .in +.SUFFIXES: .in .c .bin .in: sed \ @@ -34,6 +34,9 @@ DESTDIR = < $< > $@ if [ -x $< ]; then chmod +x $@; fi +.c.bin: + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDLIBS) + all: @@ -53,6 +56,8 @@ installable = \ derived-assets = \ $(manpages) \ + tests/rand.bin \ + tests/bigger-rand-output.txt \ side-assets = \ tests/hero-*.pipe \ @@ -68,8 +73,13 @@ side-assets = \ ## and installation. all: $(derived-assets) +tests/bigger-rand-output.txt: tests/rand.bin + printf '[\n\t%s\n]\n' \ + "`./$? | tr '\n' ',' | sed -e 's|,$$||' -e 's|,|,\n\t|g'`" > $@ + -$(manpages): Makefile deps.mk +tests/rand.bin $(manpages): Makefile deps.mk +tests/js/rand.mjs-check: tests/bigger-rand-output.txt |
