-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (25 loc) · 861 Bytes
/
Copy pathMakefile
File metadata and controls
31 lines (25 loc) · 861 Bytes
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
# ==========================================
# heather Makefile (macOS & Linux)
# ==========================================
APP = heather
SRC_FILE = src/heather.pas
BIN_DIR = bin
OBJ_DIR = obj
# Mark these as commands, not physical files
.PHONY: all build clean install
# The default command when you just type 'make'
all: build
build:
@echo "==> Scaffolding directories..."
@mkdir -p $(BIN_DIR) $(OBJ_DIR)
@echo "==> Compiling $(APP)..."
@fpc @heather.cfg $(SRC_FILE)
@echo "==> Build complete! Executable is at $(BIN_DIR)/$(APP)"
clean:
@echo "==> Cleaning build artifacts..."
@rm -rf $(OBJ_DIR)/* $(BIN_DIR)/*
@echo "==> Clean complete."
install: build
@echo "==> Installing $(APP) to /usr/local/bin (Requires sudo)..."
@sudo cp $(BIN_DIR)/$(APP) /usr/local/bin/$(APP)
@echo "==> Installation complete! You can now type '$(APP)' anywhere."