]> git.gag.com Git - fw/altos/blob - libaltos/Makefile.am
altos: Monitor battery voltage on telebt
[fw/altos] / libaltos / Makefile.am
1 JAVAC=javac
2 AM_CFLAGS=-DLINUX -DPOSIX_TTY -I$(JVM_INCLUDE)
3 AM_JAVACFLAGS=-encoding UTF-8
4
5 altoslibdir=$(libdir)/altos
6
7 altoslib_LTLIBRARIES=libaltos.la
8
9 libaltos_la_LDFLAGS = -version-info 1:0:1
10
11 libaltos_la_SOURCES=\
12         libaltos.c \
13         libaltos_wrap.c
14
15 noinst_PROGRAMS=cjnitest
16
17 cjnitest_LDADD=libaltos.la
18
19 LIBS=-lbluetooth
20
21 HFILES=libaltos.h
22
23 SWIG_FILE=libaltos.swig
24
25 CLASSDIR=libaltosJNI
26
27 $(SWIG_FILE): libaltos.i0 $(HFILES)
28         sed 's;//%;%;' libaltos.i0 $(HFILES) > $(SWIG_FILE)
29
30 all-local: classlibaltos.stamp
31
32 libaltos_wrap.c: classlibaltos.stamp
33
34 classlibaltos.stamp: $(SWIG_FILE)
35         swig -java -package libaltosJNI $(SWIG_FILE)
36         mkdir -p libaltosJNI
37         $(JAVAC) -d . $(AM_JAVACFLAGS) $(JAVACFLAGS) *.java && \
38         touch classlibaltos.stamp
39
40 MINGCC32=i686-w64-mingw32-gcc
41 MINGCC64=x86_64-w64-mingw32-gcc
42 MINGFLAGS=-Wall -DWINDOWS -DBUILD_DLL -I$(JVM_INCLUDE)
43 MINGLIBS=-lsetupapi
44
45 fat: altos.dll altos64.dll
46
47 altos.dll: $(libaltos_la_SOURCES)
48         $(MINGCC32) -o $@ $(MINGFLAGS) -shared $(libaltos_la_SOURCES) $(MINGLIBS)
49
50 altos64.dll: $(libaltos_la_SOURCES)
51         $(MINGCC64) -o $@ $(MINGFLAGS) -shared $(libaltos_la_SOURCES) $(MINGLIBS)
52
53 clean-local:
54         -rm -rf libaltosJNI *.class *.java classlibaltos.stamp $(SWIG_FILE) libaltos_wrap.c altos.dll altos64.dll