public inbox for ~johnnyrichard/olang-devel@lists.sr.ht
 help / color / mirror / code / Atom feed
62297adb8138a15f4a66b4c80eea600ba021ae1a blob 909 bytes (raw)

 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
 
TARGET    := 0c
SRC_DIR   := src
BUILD_DIR := build
CFLAGS    := -Werror -Wall -Wextra -Wmissing-declarations -pedantic -std=c11 -ggdb

SRCS      := $(wildcard $(SRC_DIR)/*.c)
HEADERS   := $(wildcard $(SRC_DIR)/*.h)
OBJS      := $(patsubst $(SRC_DIR)/%.c, $(BUILD_DIR)/%.o, $(SRCS))

.PHONY: all
all: $(TARGET)

$(TARGET): $(BUILD_DIR) $(OBJS)
	$(CC) $(CFLAGS) $(OBJS) -o $(TARGET)

$(BUILD_DIR):
	@mkdir -p $@

.PHONY: linter
linter: $(SRCS) $(HEADERS)
	clang-format --dry-run --Werror $?
	$(MAKE) -C tests/integration/ linter

.PHONY: linter-fix
linter-fix: $(SRCS) $(HEADERS)
	clang-format -i $?
	$(MAKE) -C tests/integration/ linter-fix

.PHONY: integration-test
integration-test:
	$(MAKE)
	$(MAKE) -C tests/integration/

.PHONY: unit-test
unit-test:
	$(MAKE) -C tests/unit/

.PHONY: check
check:
	$(MAKE) integration-test
	$(MAKE) unit-test

$(BUILD_DIR)/%.o: $(SRC_DIR)/%.c
	$(CC) $(CFLAGS) -c $< -o $@
debug log:

solving 62297ad ...
found 62297ad in http://lists.johnnyrichard.com/olang/20240218005023.3723888-2-carlos@maniero.me/
found b13b41b in https://git.johnnyrichard.com/olang.git
preparing index
index prepared:
100644 b13b41bdf1bef9c247e959dc389898ddabad5bf5	Makefile

applying [1/1] http://lists.johnnyrichard.com/olang/20240218005023.3723888-2-carlos@maniero.me/
diff --git a/Makefile b/Makefile
index b13b41b..62297ad 100644

Checking patch Makefile...
Applied patch Makefile cleanly.

index at:
100644 62297adb8138a15f4a66b4c80eea600ba021ae1a	Makefile

Code repositories for project(s) associated with this public inbox

	https://git.johnnyrichard.com/olang.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox