library/Makefile

32 lines
559 B
Makefile
Raw Normal View History

2021-07-02 22:47:14 +00:00
.PHONY: up down run
2021-06-26 18:08:35 +00:00
GOFILES=$(shell find . -name '*.go' -o -name 'go.*')
STATICFILES=$(shell find . -name '*.js' -o -name '*.css' -o -name '*.html')
SQLFILES=$(shell find . -name '*.sql')
2021-07-02 22:47:14 +00:00
ifneq (,$(wildcard ./local.properties))
include local.properties
export
endif
2021-06-26 18:08:35 +00:00
build: server manager
2021-07-07 01:40:12 +00:00
run-server: build
2021-07-02 22:47:14 +00:00
./server
2021-07-07 01:40:12 +00:00
run-manager: build
./manager
2021-06-26 18:08:35 +00:00
server: $(GOFILES) $(STATICFILES)
go build -o server ./cmd/serve
manager: $(GOFILES) $(SQLFILES)
go build -o manager ./cmd/manage
2021-07-02 22:47:14 +00:00
# dev dependencies
2021-06-26 18:08:35 +00:00
up:
docker compose up -d
down:
docker compose down