summaryrefslogtreecommitdiffstats
path: root/bindings/java
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2006-10-15 21:38:02 +0200
committerAaron Griffin <aaron@archlinux.org>2006-10-15 21:38:02 +0200
commit94810222866b7cc36bf442993826f9b38dbe9c41 (patch)
tree325266e9e88208d481ce58b866e7002af4d279c0 /bindings/java
parent3f27542156125118800235c5ac1bac125fd7752c (diff)
downloadpacman-94810222866b7cc36bf442993826f9b38dbe9c41.tar.gz
pacman-94810222866b7cc36bf442993826f9b38dbe9c41.tar.xz
Final frugalware changes commit
Diffstat (limited to 'bindings/java')
-rw-r--r--bindings/java/Makefile.in48
1 files changed, 48 insertions, 0 deletions
diff --git a/bindings/java/Makefile.in b/bindings/java/Makefile.in
new file mode 100644
index 00000000..3619c0ba
--- /dev/null
+++ b/bindings/java/Makefile.in
@@ -0,0 +1,48 @@
+top_srcdir = @top_srcdir@
+prefix = @prefix@
+
+CFLAGS = $(subst -Werror,,@CFLAGS@)
+CFLAGS += -fno-strict-aliasing # see the swig docs
+ifeq ($(shell arch),x86_64)
+CFLAGS += -fPIC
+endif
+LDFLAGS += -L$(top_srcdir)/lib/libalpm -lalpm
+
+all: libalpm_java.so alpm.jar
+
+libalpm_java.so: alpm_java_wrap.o
+ $(CC) -shared $^ -o $@ $(LDFLAGS)
+
+alpm_java_wrap.o: alpm_java_wrap.c
+ $(CC) $(CFLAGS) -c -o $@ -include alpm.h $^
+
+alpm_java_wrap.c:
+ cp $(top_srcdir)/lib/libalpm/alpm.h ./
+ cp $(top_srcdir)/bindings/alpm.i alpm_java.i
+ swig -java alpm_java.i
+
+alpm.class: alpm.java
+ javac *.java
+
+alpm.jar: alpm.class
+ jar -cf alpm.jar *.class
+
+alpm.java: alpm_java_wrap.c
+
+install: install-so install-jar
+
+install-so: libalpm_java.so
+ mkdir -p $(DESTDIR)$(prefix)/lib
+ install $^ $(DESTDIR)$(prefix)/lib
+
+install-jar: alpm.jar
+ mkdir -p $(DESTDIR)$(prefix)/share/java
+ install -m644 $^ $(DESTDIR)$(prefix)/share/java
+
+clean:
+ rm -f *alpm* *.java *.class
+
+distclean: clean
+ rm -f Makefile
+
+check: