-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (26 loc) · 774 Bytes
/
Makefile
File metadata and controls
38 lines (26 loc) · 774 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
SHELL := /bin/bash
.PHONY: all build docker
all: build
docker: docker-build docker-run
driver:
sudo modprobe cuse
build:
mkdir -p bin/ build/
go build -o build/linear.a -buildmode=c-archive github.com/trevor403/random/cmd/library
gcc -Wall -o bin/srandom_cuse linux_device/character_device.c -Ibuild $(shell pkg-config fuse --cflags --libs) build/linear.a
run: build driver
sudo ./bin/srandom_cuse
test:
sudo cat /dev/srandom | rngtest --blockcount=1000 || echo -n
run-basic:
go run ./cmd/gen-random
clean:
rm -f build/linear.a build/linear.h bin/srandom_cuse
docker-build:
docker-compose build
docker-run: driver
docker-compose run --rm srandom_test
docker-compose down
docker-device: driver
docker-compose down
docker-compose run --rm srandom_cuse