diff options
| author | bryan <bryan@veltar.systems> | 2026-08-27 10:49:41 +0200 |
|---|---|---|
| committer | bryan <bryan@veltar.systems> | 2026-08-27 10:49:41 +0200 |
| commit | 07bedb6ceb6e06808ab5b5ee28e0d095e11a1cd5 (patch) | |
| tree | b62884a2ddb560e84ac1dae3b48ce432153a5271 /config.mk | |
| parent | 22ade138c4e83b7c0b0c702c38c0ca00a9948d4b (diff) | |
| download | rg-07bedb6ceb6e06808ab5b5ee28e0d095e11a1cd5.tar.gz rg-07bedb6ceb6e06808ab5b5ee28e0d095e11a1cd5.zip | |
Windows copies rg.exe to %USERPROFILE%\.local\bin and skips the
man page. Linux still installs to /usr/local/bin and share/man.
PREFIX overrides the destination on both.
Diffstat (limited to 'config.mk')
| -rw-r--r-- | config.mk | 31 |
1 files changed, 17 insertions, 14 deletions
@@ -3,27 +3,30 @@ VERSION = 1.0 # Customize below to fit your system -# paths -PREFIX = /usr/local -MANPREFIX = ${PREFIX}/share/man +# Install: make install +# Windows: %USERPROFILE%\.local\bin +# Linux: /usr/local/bin +# Override: make PREFIX=... install -# compiler -CC = cc -EXE = LIBS = -# Windows (MinGW-w64): uncomment -# CC = gcc -# EXE = .exe - -# Windows (clang targeting MSVC CRT): uncomment -# CC = clang -# EXE = .exe - ifeq ($(OS),Windows_NT) CC = clang EXE = .exe +PREFIX ?= $(USERPROFILE)/.local +RM = cmd /c del /q +else +CC = cc +EXE = +PREFIX ?= /usr/local +RM = rm -f endif +BINDIR ?= $(PREFIX)/bin +MANPREFIX ?= $(PREFIX)/share/man + +# Windows (MinGW-w64): set CC = gcc instead of clang +# Windows (clang targeting MSVC CRT): default when OS=Windows_NT + CFLAGS = -std=c99 -pedantic -Wall -Wextra -Os LDFLAGS = ${LIBS} |
