- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
Latest commit
30 lines (22 loc) · 605 Bytes
/
Copy pathmakefile
File metadata and controls
30 lines (22 loc) · 605 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
CFLAGS := -std=c99 -Wall -Wextra -Werror -Wno-unused-parameter
BIN_DIR := bin
ifeq ($(MODE),debug)
CFLAGS += -O0 -DDEBUG -g
endif
# Targets
all:
@ echo"building tokenizer..."
@ mkdir -p $(BIN_DIR)
@ $(CC)$(CFLAGS) src/*.c -o $(BIN_DIR)/tokenize
test: $(BIN_DIR)/test
@echo "running tests..."
@ $(BIN_DIR)/test
$(BIN_DIR)/tester: test/test_*.c
@ echo"building tests runner..."
@ mkdir -p $(BIN_DIR)
@ $(CC)$(CFLAGS) -I. lib/munit/munit.c test/test_*.c -o $(BIN_DIR)/test
clean:
@ echo"removing binaries directory..."
@ $(RM) -rf $(BIN_DIR)
@ echo"done."
.PHONY: default test clean