summaryrefslogtreecommitdiff
path: root/config.mk
diff options
context:
space:
mode:
Diffstat (limited to 'config.mk')
-rw-r--r--config.mk31
1 files changed, 17 insertions, 14 deletions
diff --git a/config.mk b/config.mk
index 845b457..886dedd 100644
--- a/config.mk
+++ b/config.mk
@@ -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}