aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile
blob: a478ecf51247e427d3f74d84d4460b830a9874bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
CC ?= gcc
CFLAGS ?= -lpthread
SOURCES := $(wildcard *.c)
OBJECTS := $(patsubst %.c, %.o, $(SOURCES))

.PHONY: all
all: $(OBJECTS)

.PHONY: debug
debug: CFLAGS += -g -DDEBUG=1

.PHONY: clean
clean:
	rm -rf *.o

%.o: %.c
	$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@