forked from npryce/code-words
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (20 loc) · 659 Bytes
/
Makefile
File metadata and controls
29 lines (20 loc) · 659 Bytes
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
SRCDIR=wordcram-cli/src/
OUTDIR=wordcram-cli/out/make
SRCS:=$(shell find $(SRCDIR) -name '*.java')
JAR=wordcram-cli/lib/wordcram-cli.jar
LIBS:=$(wildcard wordcram-cli/lib/*/*.jar)
pathify = $(subst $(eval) ,:,$1)
.PHONY: all
all: $(JAR)
$(JAR): $(SRCS) $(LIBS) $(OUTDIR)/manifest.mf
@mkdir -p $(OUTDIR)/classes
javac -source 1.6 -cp $(call pathify,$(LIBS)) -d $(OUTDIR)/classes $(SRCS)
jar cfme $@ $(OUTDIR)/manifest.mf com.natpryce.wordcloud.CLI -C $(OUTDIR)/classes .
$(OUTDIR)/manifest.mf: $(LIBS)
@mkdir -p $(dir $@)
echo "Class-Path: $(LIBS:wordcram-cli/lib/%=%)" > $@
.PHONY: clean
clean:
rm -rf $(OUTDIR) $(JAR)
.PHONY:
again: clean all