]> gitweb.michael.orlitzky.com - apply-default-acl.git/blobdiff - makefile
Add tests for --recursive mode.
[apply-default-acl.git] / makefile
index 12e71648e3ed2cfb55b8fda4670861e1cdd21724..0da82fe9b941ed462eda0c4df868e4a6a9c3ed85 100644 (file)
--- a/makefile
+++ b/makefile
@@ -1,22 +1,34 @@
-CC = gcc
-CFLAGS = -O2 -march=native -pipe -Wall
+VERSION = 0.0.1
+BIN     = reapply_default_acl
+P       = $(BIN)-$(VERSION)
+TARBALL = $(BIN)-$(VERSION).tar.bz2
+
+CC := gcc
+CFLAGS := -O2 -march=native -pipe -Wall
 LIBS = -lacl
 
-SOURCES := $(shell find ./src -type f -name '*.c')
-HEADERS := $(shell find ./src -type f -name '*.h')
-OBJS    := $(patsubst %.c, %.o, $(SOURCES))
+SOURCES = $(shell find ./src -type f -name '*.c')
+HEADERS = $(shell find ./src -type f -name '*.h')
+OBJS    = $(patsubst %.c, %.o, $(SOURCES))
 
 %.o: %.c $(HEADERS)
        $(CC) $(CFLAGS) -c -o $@ $<
 
-aclq: $(OBJS)
+$(BIN): $(OBJS)
        $(CC) $(CFLAGS) $(LIBS) -o $@ $^
 
-.PHONY: clean
+.PHONY: clean test
 
 clean:
        rm -f $(OBJS)
-       rm -f aclq
+       rm -f $(BIN)
+       rm -f $(TARBALL)
+       rm -rf $(P)
 
-test: aclq
+test: $(BIN)
        ./run-tests.sh
+
+dist: clean
+       mkdir $(P)
+       cp -a doc makefile src $(P)
+       tar -cjf $(TARBALL) $(P)