Skip to content

Commit

Permalink
conditionally append .exe to windows only builds
Browse files Browse the repository at this point in the history
  • Loading branch information
jdrews committed Jul 26, 2022
1 parent 4cb61c6 commit bdb348b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
.ONESHELL:
.PHONY: web app all

FILENAME =

ifdef OS
# Windows (%OS% env variable only exists on Windows)
FILENAME = logstation.exe
else
# Unix-like OS (Linux, Mac/OSX, BSD, etc)
FILENAME = logstation
endif

all:
$(MAKE) web
$(MAKE) app

app:
go build -o logstation ./main.go
go build -o ${FILENAME} ./main.go

web:
cd web && npm run build
Expand Down

0 comments on commit bdb348b

Please sign in to comment.