From 1f15e1c1f02fafb523f94790560c3eba796cdbda Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 20 Jan 2014 00:27:24 +0100 Subject: add makefile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..443ad69 --- /dev/null +++ b/Makefile @@ -0,0 +1,24 @@ +GPP=gpp +JAVAC=javac + +PP = comparable +SRC = $(shell find src | grep '\.java$$') +PPD = $(shell find src | grep '\.java$$' | sed -e 's:^src:obj:') +OBJ = $(shell find src | grep '\.java$$' | sed -e 's:^src:obj:' | sed -e 's:java$$:class:') + + +.PHONY: all +all: $(OBJ) + +obj/%.class: obj/%.java + $(JAVAC) -s obj -d obj -cp obj "$<" + +obj/%.java: src/%.java $(foreach F, $(PP), src/$(F)) + mkdir -p "$(shell dirname "$@")" + $(GPP) -s £ < "$<" > "$@" + + +.PHONY: clean +clean: + -rm -r -- bin obj + -- cgit v1.2.3-70-g09d2