summaryrefslogtreecommitdiff
path: root/Makefile
blob: 2d52dd6999db9a54d1bc1cc15c25056c00042f6d (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
29
30
CFLAGS += -std=c11

CPPFLAGS += -I$(CURDIR)/lib
CPPFLAGS += -I$(CURDIR)/hack

CFLAGS += -g

CFLAGS += -Wall -Werror -Wextra
CPPFLAGS += -O2 -D_FORTIFY_SOURCE=2

all: cow-dedupe-range
all: cow-extent-map
all: cow-dedupe
all: fastsum
.PHONY: all

%: src/%.o
	$(CC) $(LDFLAGS) -o $@ $^

cow-dedupe-range: lib/dedupe-range.o
cow-extent-map: lib/extent-map.o lib/strextentflags.o

cow-dedupe: go/bin/cow-dedupe
	cp $< $@
go/bin/cow-dedupe: FORCE
	GOPATH=$(CURDIR)/go go install $(@F)

.SECONDARY:
.DELETE_ON_ERROR:
.PHONY: FORCE