-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
65 lines (56 loc) · 2.07 KB
/
Makefile
File metadata and controls
65 lines (56 loc) · 2.07 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Makefile for Parse EqualizerAPO to cDSP CLI Tool
# Configuration
BUN ?= bun
EXECUTABLE_NAME = apo2cdsp
MAIN_FILE = index.ts
BUILD_DIR = dist
# Default target
all: build
# Build production executable
build:
@echo "🏗️ Building production executable..."
mkdir -p $(BUILD_DIR)
$(BUN) build --compile --minify --target bun $(MAIN_FILE) --outfile $(BUILD_DIR)/$(EXECUTABLE_NAME)
@echo "✅ Build complete: $(BUILD_DIR)/$(EXECUTABLE_NAME)"
# Show help
help:
@echo "$(EXECUTABLE_NAME)-parametriceq - Makefile"
@echo ""
@echo "Targets:"
@echo " build Build production executable"
@echo " install-global Install CLI globally"
@echo " uninstall-global Uninstall CLI globally"
@echo " check-tools Check if required tools are installed"
@echo " info Show project information"
@echo " help Show this help message"
@echo ""
@echo "Examples:"
@echo " make build # Build the executable"
@echo " make install-global # Install globally"
# Install the CLI globally
install-global: build
@echo "🌍 Installing CLI globally..."
sudo mv $(BUILD_DIR)/$(EXECUTABLE_NAME) /usr/local/bin/
@echo "✅ Installation complete. Run '$(EXECUTABLE_NAME) --help' to get started."
# Uninstall the CLI globally
uninstall-global:
@echo "🗑️ Uninstalling CLI globally..."
sudo rm -f /usr/local/bin/$(EXECUTABLE_NAME)
@echo "✅ Uninstallation complete"
# Check if required tools are installed
check-tools:
@echo "🔧 Checking required tools..."
@command -v $(BUN) >/dev/null 2>&1 || { echo "❌ Bun is required but not installed. Please install Bun first."; exit 1; }
@echo "✅ All required tools are installed"
# Project info
info:
info:
@echo "📊 Project Information:"
@echo " Name: $(EXECUTABLE_NAME)-parametriceq"
@echo " Main: $(MAIN_FILE)"
@echo " Executable: $(EXECUTABLE_NAME)"
@echo " Bun version: $(shell $(BUN) --version 2>/dev/null || echo 'Not found')"
@echo " OS: $(shell uname -s)"
@echo " Arch: $(shell uname -m)"
# Phony targets
.PHONY: all build install-global uninstall-global help check-tools info