diff options
author | Eric Wong <normalperson@yhbt.net> | 2008-10-24 18:41:26 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-10-24 18:41:26 -0700 |
commit | e69018abd4d720324992d4fe276da8405182c108 (patch) | |
tree | 5cb36cbf7fd79a79a00fcf842290e3c9b02d47b4 /Makefile | |
download | pcu-e69018abd4d720324992d4fe276da8405182c108.tar.gz |
initial v0.1.0
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4acac90 --- /dev/null +++ b/Makefile @@ -0,0 +1,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 |