summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile25
1 files changed, 24 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 6f54daf..8f4d836 100644
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,7 @@ TAGS ?= gtk_3_18
PROVIDER ?= $(shell grep ^'provider =' branding/config/vendor.conf | cut -d '=' -f 2 | tr -d "[:space:]")
PROVIDER_CONFIG ?= branding/config/vendor.conf
DEFAULT_PROVIDER = branding/assets/default/
+VERSION ?= $(shell git describe)
all: icon locales get build
@@ -22,13 +23,35 @@ endif
cd branding/assets && ln -s ${PROVIDER} default
prepare: generate relink_default
+ mkdir -p build/${PROVIDER}/bin/
branding/scripts/check-ca-crt.py ${PROVIDER} ${PROVIDER_CONFIG}
+prepare_win:
+ mkdir -p build/${PROVIDER}/windows/
+ cp -r branding/templates/windows build/${PROVIDER}
+ VERSION=${VERSION} PROVIDER_CONFIG=${PROVIDER_CONFIG} branding/scripts/generate-win.py build/${PROVIDER}/windows/data.json
+ cd build/${PROVIDER}/windows && python3 generate.py
+ # TODO create build/PROVIDER/assets/
+ # TODO create build/PROVIDER/staging/
+
+prepare_osx:
+ echo "osx..."
+
+prepare_snap:
+ echo "snap..."
+
+prepare_debian:
+ echo "debian..."
+
+prepare_all: prepare prepare_win prepare_osx prepare_snap
+
build: $(foreach path,$(wildcard cmd/*),build_$(patsubst cmd/%,%,$(path)))
build_%:
go build -tags $(TAGS) -ldflags "-X main.version=`git describe --tags`" -o $* ./cmd/$*
strip $*
+ mkdir -p build/bin
+ mv $* build/bin/
test:
go test -tags "integration $(TAGS)" ./...
@@ -41,7 +64,7 @@ build_win:
clean:
make -C icon clean
- rm bitmask-vpn
+ rm build/bitmask-vpn
icon:
make -C icon