cleanup; fix stripping with DEBUG=on

This commit is contained in:
Harvey Tindall
2021-05-16 15:00:13 +01:00
parent beb0712ce9
commit 33f8070e57
5 changed files with 74 additions and 417 deletions
+2 -2
View File
@@ -29,12 +29,12 @@ endif
DEBUG ?= off
ifeq ($(DEBUG), on)
LDFLAGS := -s -w $(LDFLAGS)
SOURCEMAP := --sourcemap
TYPECHECK := tsc -noEmit --project ts/tsconfig.json
# jank
COPYTS := rm -r $(DATA)/web/js/ts; cp -r ts $(DATA)/web/js
else
LDFLAGS := -s -w $(LDFLAGS)
SOURCEMAP :=
COPYTS :=
TYPECHECK :=
@@ -79,7 +79,7 @@ compile:
$(GOBINARY) mod download
$(info Building)
mkdir -p build
CGO_ENABLED=0 $(GOBINARY) build -ldflags="-s -w $(LDFLAGS)" $(TAGS) -o build/jfa-go
CGO_ENABLED=0 $(GOBINARY) build -ldflags="$(LDFLAGS)" $(TAGS) -o build/jfa-go
compress:
upx --lzma build/jfa-go