doc: Update all docs to 1.9. Note this in doc/RELNOTES
[fw/altos] / libaltos / Makefile.am
1 JAVAC=javac
2 AM_CFLAGS=-DLINUX -DPOSIX_TTY -I$(JVM_INCLUDE) -I$(JVM_INCLUDE)/linux
3 AM_JAVACFLAGS=-target 1.6 -encoding UTF-8 -Xlint:deprecation -source 6
4
5 altoslibdir=$(libdir)/altos
6
7 altoslib_LTLIBRARIES=libaltos.la
8 libaltos_la_LDFLAGS=-version-info 1:0:1 -Wl,-znoexecstack
9
10 libaltos_la_SOURCES=\
11         libaltos_common.c \
12         libaltos_posix.c \
13         libaltos_linux.c \
14         libaltos_wrap.c \
15         libaltos.h \
16         libaltos_posix.h \
17         libaltos_private.h
18
19 WINDOWS_SRC=\
20         libaltos_common.c\
21         libaltos_windows.c\
22         libaltos_wrap.c
23
24 WINDOWS_H=\
25         libaltos.h
26
27 noinst_PROGRAMS=cjnitest btletest
28
29 cjnitest_SOURCES=cjnitest.c
30 cjnitest_LDADD=libaltos.la
31
32 btletest_SOURCES=btletest.c
33
34 btletest_LDADD=-lbluetooth
35
36 if MULTI_ARCH
37 altoslib_LTLIBRARIES+=libaltos32.la libaltos64.la
38
39 libaltos32_la_LDFLAGS=$(libaltos_la_LDFLAGS)
40 libaltos64_la_LDFLAGS=$(libaltos_la_LDFLAGS)
41
42 libaltos32_la_CFLAGS=-m32 $(AM_CFLAGS)
43 libaltos64_la_CFLAGS=-m64 $(AM_CFLAGS)
44
45 libaltos32_la_SOURCES=$(libaltos_la_SOURCES)
46 libaltos64_la_SOURCES=$(libaltos_la_SOURCES)
47
48 noinst_PROGRAMS+=cjnitest32 cjnitest64
49
50 cjnitest32_CFLAGS=-m32
51 cjnitest64_CFLAGS=-m64
52
53 cjnitest32_SOURCES=$(cjnitest_SOURCES)
54 cjnitest64_SOURCES=$(cjnitest_SOURCES)
55
56 cjnitest32_LDADD=libaltos32.la
57 cjnitest64_LDADD=libaltos64.la
58
59 endif
60
61 LIBS=-ldl
62
63 HFILES=libaltos.h
64
65 SWIG_FILE=libaltos.swig
66
67 CLASSDIR=libaltosJNI
68
69 $(SWIG_FILE): libaltos.i0 $(HFILES)
70         sed 's;//%;%;' libaltos.i0 $(HFILES) > $(SWIG_FILE)
71
72 all-local: classlibaltos.stamp
73
74 libaltos_wrap.c: classlibaltos.stamp
75
76 classlibaltos.stamp: $(SWIG_FILE)
77         swig -java -package libaltosJNI $(SWIG_FILE)
78         mkdir -p libaltosJNI
79         $(JAVAC) -d . $(AM_JAVACFLAGS) $(JAVACFLAGS) *.java && \
80         touch classlibaltos.stamp
81
82 MINGCC32=i686-w64-mingw32-gcc
83 MINGCC64=x86_64-w64-mingw32-gcc
84 MINGFLAGS=-Wall -Wextra -DWINDOWS -DBUILD_DLL -mconsole -I$(JVM_INCLUDE) -I$(JVM_INCLUDE)/linux
85 MINGLIBS=-lsetupapi -lws2_32
86
87 fat: all altos.dll altos64.dll
88
89 altos.dll: $(WINDOWS_SRC) $(WINDOWS_H)
90         $(MINGCC32) -o $@ $(MINGFLAGS) -shared $(WINDOWS_SRC) $(MINGLIBS)
91
92 altos64.dll: $(WINDOWS_SRC) $(WINDOWS_H)
93         $(MINGCC64) -o $@ $(MINGFLAGS) -shared $(WINDOWS_SRC) $(MINGLIBS)
94
95 clean-local:
96         -rm -rf libaltosJNI *.class *.java classlibaltos.stamp $(SWIG_FILE) libaltos_wrap.c altos.dll altos64.dll