1 | ## Process this file with automake to produce Makefile.in |
---|
2 | ## |
---|
3 | ## $Id: Makefile.am 856 2008-12-02 07:55:41Z jari $ |
---|
4 | |
---|
5 | # Copyright (C) 2007 Peter Johansson |
---|
6 | # Copyright (C) 2008 Jari Häkkinen |
---|
7 | # |
---|
8 | # This file is part of WeNNI, |
---|
9 | # http://baseplugins.thep.lu.se/wiki/se.lu.thep.WeNNI |
---|
10 | # |
---|
11 | # WeNNI is free software; you can redistribute it and/or modify it |
---|
12 | # under the terms of the GNU General Public License as published by the |
---|
13 | # Free Software Foundation; either version 3 of the License, or (at |
---|
14 | # your option) any later version. |
---|
15 | # |
---|
16 | # WeNNI is distributed in the hope that it will be useful, but WITHOUT |
---|
17 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
---|
18 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
---|
19 | # for more details. |
---|
20 | # |
---|
21 | # You should have received a copy of the GNU General Public License |
---|
22 | # along with WeNNI. If not, see <http://www.gnu.org/licenses/>. |
---|
23 | |
---|
24 | TOPBUILDDIR = .build |
---|
25 | SUBDIR = se/lu/thep/wenni |
---|
26 | BUILDDIR = $(TOPBUILDDIR)/$(SUBDIR) |
---|
27 | |
---|
28 | JAVA = WeNNI.java |
---|
29 | CLASS = $(JAVA:.java=.class) |
---|
30 | JAR = WeNNI.jar |
---|
31 | |
---|
32 | if DOWNLOADBASEAPI |
---|
33 | DOWNLOADDEP=BaseCoreAPI |
---|
34 | endif |
---|
35 | |
---|
36 | all-local: $(JAR) |
---|
37 | |
---|
38 | clean-local:; @( rm -rf *.jar *.class *~ $(TOPBUILDDIR)) |
---|
39 | |
---|
40 | distclean-local: clean-local |
---|
41 | @( rm -rf $(DOWNLOADDEP) $(PLUGINutilities) $(PLUGINutilities).tgz ) |
---|
42 | |
---|
43 | install-exec-local: $(JAR) |
---|
44 | @$(NORMAL_INSTALL) |
---|
45 | test -z "$(bindir)" || $(MKDIR_P) "$(bindir)" |
---|
46 | $(INSTALL) "$(JAR)" "$(bindir)" |
---|
47 | $(INSTALL) "$(PLUGINutilities)/$(PLUGINutilities).jar" "$(bindir)" |
---|
48 | |
---|
49 | install-plugin: $(JAR) |
---|
50 | @$(NORMAL_INSTALL) |
---|
51 | test -z "$(PLUGINDIR)" || $(MKDIR_P) "$(PLUGINDIR)" |
---|
52 | $(INSTALL) "$(JAR)" "$(PLUGINDIR)" |
---|
53 | $(INSTALL) "$(PLUGINutilities)/$(PLUGINutilities).jar" "$(PLUGINDIR)" |
---|
54 | |
---|
55 | $(JAR): $(BUILDDIR) $(PLUGINutilities) $(DOWNLOADDEP) $(CLASS) |
---|
56 | @echo Creating $(JAR) |
---|
57 | @(cd $(TOPBUILDDIR) ; \ |
---|
58 | jar cf ../$(JAR) $(SUBDIR)/*.class) |
---|
59 | |
---|
60 | $(BUILDDIR)/$(JAVA): $(srcdir)/$(JAVA) Makefile |
---|
61 | @$(SED) "s/MAKESUBSTOFVERSIONNUMBER/$(VERSION)/" $< > $@ |
---|
62 | |
---|
63 | $(CLASS): $(BUILDDIR)/$(JAVA) |
---|
64 | javac -cp $(JAVACFLAGS):$(TOPBUILDDIR) $< |
---|
65 | |
---|
66 | $(BUILDDIR): |
---|
67 | @$(MKDIR_P) $@ |
---|
68 | |
---|
69 | BaseCoreAPI: |
---|
70 | $(MKDIR_P) $@ |
---|
71 | ( cd $@ ; \ |
---|
72 | wget $(BASE2CoreURL)/BASE2Core.jar ; \ |
---|
73 | wget $(BASE2CoreURL)/BASE2CorePlugins.jar ) |
---|
74 | |
---|
75 | $(PLUGINutilities): $(PLUGINutilities).tgz |
---|
76 | tar zxpf $< |
---|
77 | |
---|
78 | $(PLUGINutilities).tgz: |
---|
79 | wget -O $@ $(PLUGINutilitiesURL) |
---|