summaryrefslogtreecommitdiff
path: root/Makefile
blob: 6271d7c195983462ec5e79f39b5bfd0b9065cbf5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
CFLAGS  = -O3 -pipe -std=c99 -D_XOPEN_SOURCE=500
LDFLAGS =

SRCS    = $(sort $(wildcard *.c))
OBJS    = $(SRCS:.c=.o)
BINS    = bench

.PHONY: all clean

all: $(BINS)

clean:
	rm -f $(BINS)
	rm -f $(OBJS)

bench: $(OBJS)
	$(CC) $(LDFLAGS) $^ -o $@

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