2 AM_CFLAGS=-DLINUX -DPOSIX_TTY -I$(JVM_INCLUDE)
3 AM_JAVACFLAGS=-target 1.6 -encoding UTF-8 -Xlint:deprecation -source 6
5 altoslibdir=$(libdir)/altos
7 altoslib_LTLIBRARIES=libaltos.la
8 libaltos_la_LDFLAGS=-version-info 1:0:1 -Wl,-znoexecstack
14 noinst_PROGRAMS=cjnitest
16 cjnitest_SOURCES=cjnitest.c
17 cjnitest_LDADD=libaltos.la
20 altoslib_LTLIBRARIES+=libaltos32.la libaltos64.la
22 libaltos32_la_LDFLAGS=$(libaltos_la_LDFLAGS)
23 libaltos64_la_LDFLAGS=$(libaltos_la_LDFLAGS)
25 libaltos32_la_CFLAGS=-m32 $(AM_CFLAGS)
26 libaltos64_la_CFLAGS=-m64 $(AM_CFLAGS)
28 libaltos32_la_SOURCES=$(libaltos_la_SOURCES)
29 libaltos64_la_SOURCES=$(libaltos_la_SOURCES)
31 noinst_PROGRAMS+=cjnitest32 cjnitest64
33 cjnitest32_CFLAGS=-m32
34 cjnitest64_CFLAGS=-m64
36 cjnitest32_SOURCES=$(cjnitest_SOURCES)
37 cjnitest64_SOURCES=$(cjnitest_SOURCES)
39 cjnitest32_LDADD=libaltos32.la
40 cjnitest64_LDADD=libaltos64.la
48 SWIG_FILE=libaltos.swig
52 $(SWIG_FILE): libaltos.i0 $(HFILES)
53 sed 's;//%;%;' libaltos.i0 $(HFILES) > $(SWIG_FILE)
55 all-local: classlibaltos.stamp
57 libaltos_wrap.c: classlibaltos.stamp
59 classlibaltos.stamp: $(SWIG_FILE)
60 swig -java -package libaltosJNI $(SWIG_FILE)
62 $(JAVAC) -d . $(AM_JAVACFLAGS) $(JAVACFLAGS) *.java && \
63 touch classlibaltos.stamp
65 MINGCC32=i686-w64-mingw32-gcc
66 MINGCC64=x86_64-w64-mingw32-gcc
67 MINGFLAGS=-Wall -DWINDOWS -DBUILD_DLL -I$(JVM_INCLUDE)
70 fat: all altos.dll altos64.dll
72 altos.dll: $(libaltos_la_SOURCES)
73 $(MINGCC32) -o $@ $(MINGFLAGS) -shared $(libaltos_la_SOURCES) $(MINGLIBS)
75 altos64.dll: $(libaltos_la_SOURCES)
76 $(MINGCC64) -o $@ $(MINGFLAGS) -shared $(libaltos_la_SOURCES) $(MINGLIBS)
79 -rm -rf libaltosJNI *.class *.java classlibaltos.stamp $(SWIG_FILE) libaltos_wrap.c altos.dll altos64.dll