-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
48 lines (37 loc) · 1.13 KB
/
Makefile
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
39
40
41
42
43
44
45
46
47
48
#
# libhydrogen-go Makefile
#
SHELL :=/bin/bash
################################################################################
.PHONY: libhydrogen libhydrogen-clean
all:
@echo "Help:"
@echo "make libhydrogen | build libhydrogen"
@echo "make libhydrogen-clean | clean libhydrogen"
@echo "make run | run examples"
@echo "make run-locallib | run examples"
libhydrogen:
make -C libhydrogen
libhydrogen-clean:
make -C libhydrogen clean
################################################################################
.PHONY: fmt run test run_custom_ld rerun
fmt:
go fmt ./...;
test:
env CGO_ENABLED=1 go test *_test.go
run:
env CGO_ENABLED=1 go run tests/main.go
run-locallib:
env CGO_ENABLED=1 CGO_LDFLAGS="-Llibhydrogen" CGO_CFLAGS="-Ilibhydrogen" go run tests/main.go
run_custom_ld:
env CGO_ENABLED=1 CGO_LDFLAGS="-L/path/to/libhydrogen" CGO_CFLAGS="-I/path/to/libhydrogen" go run tests/main.go
rerun:
env CGO_ENABLED=1 go run -a tests/main.go
################################################################################
.PHONY: race
race:
env CGO_ENABLED=1 go run -race tests/main.go
#
# End
#