blob: b96aaa99a1673cf4e4b2053275b7a2ccedecd533 (
plain)
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
|
CC=gcc
OUT=obf.out
LIBS=
ARGS=
RELEASE=0
GFLAGS=-Wall -Wextra -Werror -Wswitch-enum -std=c11
DFLAGS=-ggdb -fsanitize=address -fsanitize=undefined -DDEBUG
RFLAGS=-O3
ifeq ($(RELEASE), 1)
CFLAGS=$(GFLAGS) $(RFLAGS)
else
CFLAGS=$(GFLAGS) $(DFLAGS)
endif
.PHONY: all
all: $(OUT)
$(OUT): lib.c parser.c main.c
$(CC) $(CFLAGS) $^ -o $@ $(LIBS)
.PHONY: run
run: $(OUT)
./$^ $(ARGS)
.PHONY:
clean:
rm -v $(OUT)
|