summaryrefslogtreecommitdiff
path: root/Makefile
blob: efda5c051ebe74f7b66e65ffc5d1b08a9b98d752 (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

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

CFLAGS = -Os -D_XOPEN_SOURCE=700
LDFLAGS = -static
LIBS = -lpthread -lrt -lpthread


all: libc-bench

clean:
	rm -f $(OBJS) libc-bench

test: all
	./libc-bench

relink:
	rm -f libc-bench
	make all

retest: relink test

libc-bench: $(OBJS)
	$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)

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