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

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 $@