feat: add Makefile and improve building

This commit is contained in:
kaveh-ahangar 2023-05-04 19:20:52 +03:30
parent 20bfd71cf1
commit 9e63b0e2b3
3 changed files with 15 additions and 0 deletions

1
.gitignore vendored
View file

@ -12,3 +12,4 @@ release/
access.log access.log
error.log error.log
.cache .cache
/build/x-ui

14
Makefile Normal file
View file

@ -0,0 +1,14 @@
all: build
init:
# create dirs
mkdir -p ./build
clear:
# clear dirs
rm -rf ./build
build: clear init
# build
go build -o ./build/x-ui ./cmd/x-ui/main.go