forked from objectbox/objectbox-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
36 lines (25 loc) · 1.09 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
# Default target executed when no arguments are given to make.
default_target: all
.PHONY: default_target help clean depend build test test-depend
help: ## Show this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
#==============================================================================
all: depend build
build: ## Build all targets
CGO_ENABLED=1 go build ./cmd/objectbox-generator/
reinstall: build ## Update installed objectbox-generator
mv objectbox-generator "$(shell which objectbox-generator)"
test: ## Test all targets
go test -timeout 1h ./...
clean: ## Clean previous builds
go clean -cache ./..
rm -f objectbox-generator
rm -f objectbox-generator.exe
rm -rf third_party/flatbuffers-c-bridge/cmake-build
./third_party/flatcc/clean.sh
./third_party/objectbox-c/clean.sh
depend: ## Build dependencies
./third_party/flatbuffers-c-bridge/build.sh
test-depend: depend ## Build test dependencies
./third_party/flatcc/build.sh
./third_party/objectbox-c/get-objectbox-c.sh