diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-01-20 00:27:24 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-01-20 00:27:24 +0100 |
commit | 1f15e1c1f02fafb523f94790560c3eba796cdbda (patch) | |
tree | 80c0bfe7dd056a73fb97429956fa6b3b5c85bc63 /Makefile | |
parent | add MinMax (diff) | |
download | algorithms-and-data-structures-1f15e1c1f02fafb523f94790560c3eba796cdbda.tar.gz algorithms-and-data-structures-1f15e1c1f02fafb523f94790560c3eba796cdbda.tar.bz2 algorithms-and-data-structures-1f15e1c1f02fafb523f94790560c3eba796cdbda.tar.xz |
add makefile
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 24 |
1 files changed, 24 insertions, 0 deletions
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 + |