source: trunk/lang/java/Makefile.in @ 1727

Last change on this file since 1727 was 1727, checked in by braffert, 12 years ago

Last fix for building java bindings. Also added license info and more comments.

File size: 2.2 KB
Line 
1bindir          = @bindir@
2datadir         = @datadir@
3datarootdir     = @datarootdir@
4exec_prefix     = @exec_prefix@
5includedir      = @includedir@
6libdir          = @libdir@
7mandir          = @mandir@
8prefix          = @prefix@
9srcdir          = @srcdir@
10
11INSTALL         = @INSTALL@
12SOEXT           = @SHLIB_SUFFIX@
13
14JAVA_HOME = @JAVA_HOME@
15JAVA_INCLUDES=@JAVA_INCLUDES@
16JAVA=@JAVA@
17JAVAC=@JAVAC@
18JAVAH=@JAVAH@
19
20CLASSPATH = .:..
21JAVAC_SWITCHES = -cp $(CLASSPATH) -d .
22JAVAH_SWITCHES = -jni -classpath $(CLASSPATH)
23destdir = $(libdir)/java
24packagedir = $(destdir)/rappture
25
26CXX             = @CXX@
27CC              = @CXX@
28CFLAGS_DEBUG    = @CFLAGS_DEBUG@
29CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@
30STLIB_LD        = @STLIB_LD@
31SHLIB_LD        = @SHLIB_LD@
32SHLIB_CFLAGS    = @SHLIB_CFLAGS@
33SHLIB_LDFLAGS   = @SHLIB_LDFLAGS@
34SHLIB_SUFFIX    = @SHLIB_SUFFIX@
35CFLAGS_DEFAULT  = @CFLAGS_DEFAULT@
36LIB_SEARCH_DIRS = @LIB_SEARCH_DIRS@
37
38MKDIR_P         = @MKDIR_P@
39RM              = rm -f
40
41INCLUDES = $(JAVA_INCLUDES) -I $(srcdir)/../../src/core -I .
42LIBS = -L ../../src/core -lrappture
43
44CXX_O_SWITCHES = -fpic -c $(INCLUDES)
45
46CXX_SO_SWITCHES = --shared $(INCLUDES) $(LIBS)
47
48OBJS    = \
49        jRpLibrary.o \
50        jRpUnits.o \
51        jRpUtils.o
52
53lib = libjRappture$(SOEXT)
54
55all: $(lib)
56
57$(lib): $(OBJS)
58        $(CXX) $(CXX_SO_SWITCHES) -o $@ $(OBJS)
59
60jRpLibrary.o: $(srcdir)/jRpLibrary.cc jRpLibrary.h
61        $(CXX) $(CXX_O_SWITCHES) -o $@ $<
62
63jRpUnits.o: $(srcdir)/jRpUnits.cc jRpUnits.h
64        $(CXX) $(CXX_O_SWITCHES) -o $@ $<
65
66jRpUtils.o: $(srcdir)/jRpUtils.cc jRpUtils.h
67        $(CXX) $(CXX_O_SWITCHES) -o $@ $<
68
69Library.class: $(srcdir)/Library.java
70        $(JAVAC) $(JAVAC_SWITCHES) $<
71
72Units.class: $(srcdir)/Units.java
73        $(JAVAC) $(JAVAC_SWITCHES) $<
74
75Utils.class: $(srcdir)/Utils.java
76        $(JAVAC) $(JAVAC_SWITCHES) $<
77
78jRpLibrary.h: Library.class
79        $(JAVAH) $(JAVAH_SWITCHES) -o $@ rappture.Library
80
81jRpUnits.h: Units.class
82        $(JAVAH) $(JAVAH_SWITCHES) -o $@ rappture.Units
83
84jRpUtils.h: Utils.class
85        $(JAVAH) $(JAVAH_SWITCHES) -o $@ rappture.Utils
86
87install:
88        $(MKDIR_P) $(destdir)
89        $(INSTALL) -m 555 $(lib) $(destdir)
90        $(MKDIR_P) $(packagedir)
91        $(INSTALL) -m 444 rappture/*.class $(destdir)/rappture
92
93clean:
94        $(RM) -r rappture *.o *.so *.h *.class
95
96distclean: clean
97        $(RM) Makefile
98
Note: See TracBrowser for help on using the repository browser.