forked from dscho/fiji
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
60 lines (51 loc) · 1.55 KB
/
Makefile
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
all: run
run:
sh Build.sh $(shell test -f make-targets && cat make-targets || echo run)
fiji: fiji.c
sh Build.sh fiji
.PHONY: jars/fake.jar
jars/fake.jar:
sh Build.sh $@
# MicroManager
mm:
test -f micromanager1.1/build.sh || \
(git submodule init micromanager1.1 && \
git submodule update micromanager1.1)
export JAVA_LIB_DIR='$(JAVA_LIB_DIR)'; \
export JAVA_HOME="$$(pwd)/$(JAVA_HOME)/.."; \
export JAVAINC="-I$$JAVA_HOME/include -I$$JAVA_HOME/include/linux"; \
cd micromanager1.1 && sh build.sh
# ------------------------------------------------------------------------
portable-app: Fiji.app
for arch in linux linux-amd64 win32; do \
case $$arch in win32) exe=.exe;; *) exe=;; esac; \
cp precompiled/fiji-$$arch$$exe $</; \
jdk=$$(git ls-tree --name-only origin/java/$$arch:); \
jre=$$jdk/jre; \
git archive --prefix=$</java/$$arch/$$jre/ \
origin/java/$$arch:$$jre | \
tar xvf -; \
done
Fiji.app-%:
ARCH=$$(echo $@ | sed "s/^Fiji.app-//"); \
case $$ARCH in \
$(ARCH)) \
case $$ARCH in win*) EXE=.exe;; *) EXE=;; esac; \
mkdir -p $@/$(JAVA_HOME) && \
mkdir -p $@/images && \
cp -R precompiled/fiji-$$ARCH$$EXE $@/fiji$$EXE && \
cp -R plugins macros jars misc $@ && \
REL_PATH=$$(echo $(JAVA_HOME) | sed "s|java/$(ARCH)/||") && \
git archive --prefix=java/$(ARCH)/$$REL_PATH/ \
origin/java/$(ARCH):$$REL_PATH | \
(cd $@ && tar xf -) && \
cp images/icon.png $@/images/ \
;; \
*) \
$(MAKE) ARCH=$$ARCH $@ \
;; \
esac
fiji-%.tar.bz2: Fiji.app-%
tar cf - $< | bzip2 -9 > $@
fiji-%.zip: Fiji.app-%
zip -9r $@ $<