mirror of
				https://github.com/1Panel-dev/1Panel.git
				synced 2025-11-04 07:17:39 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			22 lines
		
	
	
	
		
			530 B
		
	
	
	
		
			Makefile
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
	
		
			530 B
		
	
	
	
		
			Makefile
		
	
	
	
	
	
GOCMD=go
 | 
						|
GOBUILD=$(GOCMD) build
 | 
						|
GOCLEAN=$(GOCMD) clean
 | 
						|
GOARCH=$(shell go env GOARCH)
 | 
						|
GOOS=$(shell go env GOOS )
 | 
						|
 | 
						|
BASE_PAH := $(shell pwd)
 | 
						|
BUILD_PATH = $(BASE_PAH)/build
 | 
						|
WEB_PATH=$(BASE_PAH)/frontend
 | 
						|
SERVER_PATH=$(BASE_PAH)/backend
 | 
						|
MAIN= $(BASE_PAH)/cmd/server/main.go
 | 
						|
APP_NAME=1panel
 | 
						|
 | 
						|
build_web:
 | 
						|
	cd $(WEB_PATH) && npm install && npm run build:dev
 | 
						|
 | 
						|
build_bin:
 | 
						|
	cd $(SERVER_PATH) \
 | 
						|
    && GOOS=$(GOOS) GOARCH=$(GOARCH)  $(GOBUILD) -trimpath  -ldflags "-s -w"  -o $(BUILD_PATH)/$(APP_NAME) $(MAIN)
 | 
						|
 | 
						|
build_all: build_web  build_bin
 | 
						|
 |