-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (34 loc) · 1.15 KB
/
Makefile
File metadata and controls
42 lines (34 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
.PHONY: build build-debug clean rsrc help
# Variables
BINARY_NAME=Pangolin
MANIFEST=pangolin.manifest
BUILD_DIR=build
RSRC_SYSO=rsrc.syso
GOOS=windows
GOARCH=amd64
# Default target
all: clean rsrc build
# Build the Windows executable (GUI mode - no console)
build: rsrc
@echo "Building Windows executable (GUI mode)..."
@mkdir -p $(BUILD_DIR)
GOOS=$(GOOS) GOARCH=$(GOARCH) go build -ldflags="-s -w -H windowsgui" -o $(BUILD_DIR)/$(BINARY_NAME).exe
@echo "Build complete: $(BUILD_DIR)/$(BINARY_NAME).exe"
# Compile the manifest and icons using rsrc
rsrc:
@echo "Compiling manifest..."
@go run github.com/akavel/rsrc@latest -manifest $(MANIFEST) -ico icons/icon-orange.ico -o $(RSRC_SYSO)
@echo "Resources compiled: $(RSRC_SYSO)"
# Clean build artifacts
clean:
@echo "Cleaning build artifacts..."
@rm -rf $(BUILD_DIR)
@rm -f $(RSRC_SYSO)
@echo "Clean complete"
# Show help
help:
@echo "Available targets:"
@echo " make build - Build the Windows executable to build/ (GUI mode, no console)"
@echo " make rsrc - Compile the manifest file"
@echo " make clean - Remove build/ directory"
@echo " make help - Show this help message"