mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-31 14:08:06 +08:00
feat: 修改 Makefile
This commit is contained in:
parent
3456e807a7
commit
b655572e5a
10
Makefile
10
Makefile
@ -1,8 +1,8 @@
|
|||||||
GOCMD=go
|
GOCMD=go
|
||||||
GOBUILD=$(GOCMD) build
|
GOBUILD=$(GOCMD) build
|
||||||
GOCLEAN=$(GOCMD) clean
|
GOCLEAN=$(GOCMD) clean
|
||||||
GOARCH=amd64
|
GOARCH=$(shell go env GOARCH)
|
||||||
GOOS=linux
|
GOOS=$(shell go env GOOS )
|
||||||
|
|
||||||
BASE_PAH := $(shell pwd)
|
BASE_PAH := $(shell pwd)
|
||||||
BUILD_PATH = $(BASE_PAH)/build
|
BUILD_PATH = $(BASE_PAH)/build
|
||||||
@ -16,6 +16,10 @@ build_web:
|
|||||||
|
|
||||||
build_bin:
|
build_bin:
|
||||||
cd $(SERVER_PATH) \
|
cd $(SERVER_PATH) \
|
||||||
&& CGO_ENABLED=1 GOOS=$(GOOS) GOARCH=$(GOARCH) 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=$(GOOS) GOARCH=$(GOARCH) $(GOBUILD) -trimpath -ldflags '-s -w --extldflags "-static -fpic"' -o $(BUILD_PATH)/$(APP_NAME) $(MAIN)
|
||||||
|
|
||||||
|
build_linux_on_mac:
|
||||||
|
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)
|
||||||
|
|
||||||
build_all: build_web build_bin
|
build_all: build_web build_bin
|
Loading…
x
Reference in New Issue
Block a user