-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
26 lines (19 loc) · 737 Bytes
/
Makefile
File metadata and controls
26 lines (19 loc) · 737 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
BUILD_DIR := build
# FetchContent places the ghostty source here.
GHOSTTY_ZIG_OUT := $(CURDIR)/$(BUILD_DIR)/_deps/ghostty-src/zig-out
PKG_CONFIG_PATH := $(GHOSTTY_ZIG_OUT)/share/pkgconfig
DYLD_LIBRARY_PATH := $(GHOSTTY_ZIG_OUT)/lib
LD_LIBRARY_PATH := $(GHOSTTY_ZIG_OUT)/lib
# Stamp file to track whether the cmake build has run.
STAMP := $(BUILD_DIR)/.ghostty-built
.PHONY: build test clean
$(STAMP):
cmake -B $(BUILD_DIR) -DCMAKE_BUILD_TYPE=Release
cmake --build $(BUILD_DIR)
@touch $(STAMP)
build: $(STAMP)
PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) go build ./...
test: $(STAMP)
PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) DYLD_LIBRARY_PATH=$(DYLD_LIBRARY_PATH) LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) go test ./...
clean:
rm -rf $(BUILD_DIR)