Skip to content

Commit

Permalink
Add PHONY, example and clean to Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
mikelsr committed Aug 6, 2023
1 parent 24cb414 commit 8b0c05b
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ ifeq ($(origin GOPATH), undefined)
GOPATH := $(HOME)/go
endif

.PHONY: all test clean example

all: capnp test

clean: capnp-clean example-clean


capnp: capnp-raft
# N.B.: compiling capnp schemas requires having capnproto.org/go/capnp/v3 installed
Expand All @@ -15,7 +19,16 @@ capnp-raft:
@mkdir -p proto/api
@capnp compile -I$(GOPATH)/src/capnproto.org/go/capnp/v3/std -ogo:proto/api --src-prefix=proto proto/raft.capnp

test: test-wasm
capnp-clean:
@rm -rf proto/api

example:
@gotip build -o ./example/example ./example

example-clean:
@rm ./example/example

test: test-wasm example example-clean

# Test that everything can be compiled to wasm
test-wasm:
Expand Down

0 comments on commit 8b0c05b

Please sign in to comment.