mirror of
https://gitee.com/fit2cloud-feizhiyun/1Panel.git
synced 2024-11-29 18:37:41 +08:00
refactor: edit Makefile
This commit is contained in:
parent
241a4e62ac
commit
d0d76c023f
11
Makefile
11
Makefile
@ -11,20 +11,19 @@ SERVER_PATH=$(BASE_PAH)/backend
|
|||||||
MAIN= $(BASE_PAH)/cmd/server/main.go
|
MAIN= $(BASE_PAH)/cmd/server/main.go
|
||||||
APP_NAME=1panel
|
APP_NAME=1panel
|
||||||
|
|
||||||
build_web:
|
build_frontend:
|
||||||
cd $(WEB_PATH) && npm install && npm run build:dev
|
cd $(WEB_PATH) && npm install && npm run build:dev
|
||||||
|
|
||||||
build_bin:
|
build_backend_on_linux:
|
||||||
cd $(SERVER_PATH) \
|
cd $(SERVER_PATH) \
|
||||||
&& CGO_ENABLED=1 GOOS=$(GOOS) GOARCH=$(GOARCH) $(GOBUILD) -trimpath -ldflags '-s -w --extldflags "-static -fpic"' -tags 'osusergo,netgo' -o $(BUILD_PATH)/$(APP_NAME) $(MAIN)
|
&& CGO_ENABLED=1 GOOS=$(GOOS) GOARCH=$(GOARCH) $(GOBUILD) -trimpath -ldflags '-s -w --extldflags "-static -fpic"' -tags 'osusergo,netgo' -o $(BUILD_PATH)/$(APP_NAME) $(MAIN)
|
||||||
|
|
||||||
build_linux_on_mac:
|
build_backend_on_darwin:
|
||||||
cd $(SERVER_PATH) \
|
cd $(SERVER_PATH) \
|
||||||
&& CGO_ENABLED=1 GOOS=linux GOARCH=amd64 CC=x86_64-linux-musl-gcc CXX=x86_64-linux-musl-g++ $(GOBUILD) -trimpath -ldflags '-s -w --extldflags "-static -fpic"' -o $(BUILD_PATH)/$(APP_NAME) $(MAIN)
|
&& CGO_ENABLED=1 GOOS=linux GOARCH=amd64 CC=x86_64-linux-musl-gcc CXX=x86_64-linux-musl-g++ $(GOBUILD) -trimpath -ldflags '-s -w --extldflags "-static -fpic"' -o $(BUILD_PATH)/$(APP_NAME) $(MAIN)
|
||||||
|
|
||||||
build_on_archlinux:
|
build_backend_on_archlinux:
|
||||||
cd $(SERVER_PATH) \
|
cd $(SERVER_PATH) \
|
||||||
&& CGO_ENABLED=1 GOOS=$(GOOS) GOARCH=$(GOARCH) $(GOBUILD) -trimpath -ldflags '-s -w --extldflags "-fpic"' -tags osusergo -o $(BUILD_PATH)/$(APP_NAME) $(MAIN)
|
&& CGO_ENABLED=1 GOOS=$(GOOS) GOARCH=$(GOARCH) $(GOBUILD) -trimpath -ldflags '-s -w --extldflags "-fpic"' -tags osusergo -o $(BUILD_PATH)/$(APP_NAME) $(MAIN)
|
||||||
|
|
||||||
|
build_all: build_frontend build_backend_on_linux
|
||||||
build_all: build_web build_bin
|
|
||||||
|
Loading…
Reference in New Issue
Block a user