summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 254d705d011b44ff3f7c82f1af95dbf343c0d7c9 (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
CC      = gcc
CFLAGS  = -Wall -O0 -g -W
ALL_CFLAGS = $(CFLAGS) -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64

PROGS = simoop
ALL = $(PROGS)

$(PROGS): | depend

all: $(ALL)

%.o: %.c
	$(CC) -o $*.o -c $(ALL_CFLAGS) $<

simoop: simoop.o xxhash.o
	$(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) -lpthread

depend:
	@$(CC) -MM $(ALL_CFLAGS) *.c 1> .depend

clean:
	-rm -f *.o $(PROGS) .depend

ifneq ($(wildcard .depend),)
include .depend
endif