now has an ORM and saves data (kinda)
This commit is contained in:
18
Makefile
18
Makefile
@@ -14,16 +14,28 @@ GOLDFLAGS += -X main.Buildtime=$(BUILDTIME)
|
||||
GOLDFLAGS += -X main.Builduser=$(BUILDUSER)@$(BUILDHOST)
|
||||
GOLDFLAGS += -X main.Buildarch=$(BUILDARCH)
|
||||
GOLDFLAGS += -X main.Appname=$(APPNAME)
|
||||
GOFLAGS = -ldflags "-linkmode external -extldflags -static $(GOLDFLAGS)"
|
||||
|
||||
UNAME_S := $(shell uname -s)
|
||||
|
||||
# osx can't statically link apparently?!
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
GOFLAGS := -ldflags "$(GOLDFLAGS)"
|
||||
endif
|
||||
|
||||
ifneq ($(UNAME_S),Darwin)
|
||||
GOFLAGS := -ldflags "-static -linkmode external -extldflags $(GOLDFLAGS)"
|
||||
endif
|
||||
|
||||
|
||||
|
||||
default: run
|
||||
|
||||
run: build
|
||||
DEBUG=1 ./$(APPNAME)
|
||||
DEBUG=1 PORT=1111 ./$(APPNAME)
|
||||
|
||||
build: ./$(APPNAME)
|
||||
|
||||
./$(APPNAME): *.go
|
||||
./$(APPNAME): *.go models/*.go
|
||||
go build -o $@ $(GOFLAGS) .
|
||||
|
||||
clean:
|
||||
|
||||
Reference in New Issue
Block a user