pcu.git  about / heads / tags
page cache utilities for Linux
blob 4acac902a0b7e524b167de92a49bdf1b88087d33 670 bytes (raw)
$ git show v0.1.0:Makefile	# shows this blob on the CLI

 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
31
32
33
34
 
# default target
all::

# overridable from command-line
CFLAGS = -g -O2 -Wall
LDFLAGS = -Wl,-O1

fadvise.c: compat-util.h
mincore.c: compat-util.h

pcu-mincore: mincore.c
pcu-fadvise: fadvise.c

PCU_BIN := pcu-fadvise pcu-mincore

$(PCU_BIN):
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@+ $<
	mv $@+ $@

all:: $(PCU_BIN)

GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
	@./GIT-VERSION-GEN
-include GIT-VERSION-FILE

DISTNAME = pcu-$(GIT_VERSION)
dist: GIT-VERSION-FILE
	git archive --format=tar --prefix=$(DISTNAME)/ HEAD^{tree} \
		| gzip -9 > $(DISTNAME).tar.gz+
	mv $(DISTNAME).tar.gz+ $(DISTNAME).tar.gz
clean:
	$(RM) $(PCU_BIN) $(DISTNAME).tar.gz*

.PHONY: .FORCE-GIT-VERSION-FILE

git clone https://yhbt.net/pcu.git