| JDK_HOME := /opt/openjdk7 |
| JDK_JAVAC = $(JDK_HOME)/bin/javac |
| #JDK_JAVAC_FLAGS += -source 1.7 -target 1.7 |
| JAR = $(JDK_HOME)/bin/jar |
| |
| CLASS_PATH := /opt/org.eclipse.jgit/org.eclipse.jgit-4.5.7.201904151645-r.jar:/opt/guava/guava-20.0.jar |
| |
| CLASSES := \ |
| build/com/google/gitiles/blame/BlameCache.class \ |
| build/com/google/gitiles/blame/BlameCacheImpl.class \ |
| build/com/google/gitiles/blame/BlameCacheImpl$$1.class \ |
| build/com/google/gitiles/blame/BlameCacheImpl$$2.class \ |
| build/com/google/gitiles/blame/BlameCacheImpl$$Key.class \ |
| build/com/google/gitiles/blame/BlameCacheImpl$$PooledCommit.class \ |
| build/com/google/gitiles/blame/Region.class |
| |
| default: build blame-cache.jar |
| |
| blame-cache.jar: $(CLASSES) |
| cd build && $(JAR) -c $(patsubst build/%,%,$(subst $$,\$$,$^)) > ../$@ |
| |
| clean: |
| rm -f blame-cache.jar $(subst $$,\$$,$(CLASSES)) |
| |
| build: |
| mkdir $@ |
| |
| build/%.class: src/main/java/%.java |
| $(JDK_JAVAC) $(JDK_JAVAC_FLAGS) -classpath build:$(CLASS_PATH):src/main/java -d build $< |
| |
| build/%$$*.class: src/main/java/%.java |