1
0
mirror of https://github.com/alice-lg/alice-lg.git synced 2024-05-11 05:55:03 +00:00
2017-05-29 12:55:22 +02:00

46 lines
681 B
Makefile

#
# Alice LG Backend
# ----------------
#
PROG=alice-lg
ARCH=amd64
APP_VERSION=$(shell cat ../VERSION)
VERSION=$(APP_VERSION)_$(shell git rev-parse --short HEAD)
LOCAL_RPMS=RPMS
# OS Detection
UNAME=$(shell uname)
ifeq ($(UNAME), Darwin)
TARGET=osx
else
TARGET=linux
endif
LDFLAGS=-ldflags="-X main.version=$(APP_VERSION)"
all: $(TARGET)
@echo "Built $(VERSION) @ $(TARGET)"
deps:
go get .
osx: deps
GOARCH=$(ARCH) GOOS=darwin go build $(LDFLAGS) -o $(PROG)-osx-$(ARCH)
linux: deps
GOARCH=$(ARCH) GOOS=linux go build $(LDFLAGS) -o $(PROG)-linux-$(ARCH)
bundle:
rice embed-go
clean:
rm -f rice-box.go
rm -f $(PROG)-osx-$(ARCH)
rm -f $(PROG)-linux-$(ARCH)