Merge branch 'master' of ssh://repo.or.cz/srv/git/trakem2
[trakem2.git] / Makefile
blob2dc2d4b347bc3cc99b829313e71c9fddc747f326
1 uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not')
2 ifeq ($(uname_O),Cygwin)
3 CPSEP=\;
4 else
5 CPSEP=:
6 endif
8 PLUGINSDIR ?= ../plugins
9 JARSDIR ?= ../jars
10 EXTJARS=$(wildcard $(PLUGINSDIR)/*.jar) $(wildcard $(JARSDIR)/*.jar)
11 JAVACOPTSJARS=$(shell echo "$(EXTJARS)" | tr \ $(CPSEP))
12 JAVACOPTS=-classpath ../ij.jar$(CPSEP)$(JAVACOPTSJARS) -target 1.5 -source 1.5
14 JAVAS=$(wildcard ini/*/*.java ini/*/*/*.java mpi/*/*/*.java mpi/*/*/*/*.java)
15 CLASSES=$(patsubst %.java,%.class,$(JAVAS))
16 ALL_CLASSES=$(patsubst %.java,%*.class,$(JAVAS))
17 TARGET=TrakEM2_.jar
19 # does not work yet...
20 SIFT_JAVAS=$(wildcard *.java)
21 SIFT_CLASSES=$(patsubst %.java,%.class,$(SIFT_JAVAS))
22 SIFT_TARGET=SIFT_Matcher_new.jar
24 all: $(TARGET)
26 show:
27 echo $(ALL_CLASSES)
29 $(TARGET): plugins.config $(CLASSES)
30 jar cvf $@ $< $(ALL_CLASSES)
32 $(CLASSES): %.class: %.java
33 javac -O $(JAVACOPTS) $(JAVAS)
35 $(SIFT_TARGET): $(SIFT_CLASSES)
36 jar cvf $@ $^
38 $(SIFT_CLASSES): %.class: %.java
39 javac -O $(JAVACOPTS) $(SIFT_JAVAS)