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
5 altoslibdir=$(libdir)/altos
7 altoslib_LTLIBRARIES=libaltos.la
8 libaltos_la_LDFLAGS=-version-info 1:0:1 -Wl,-znoexecstack
27 noinst_PROGRAMS=cjnitest
29 cjnitest_SOURCES=cjnitest.c
30 cjnitest_LDADD=libaltos.la
33 altoslib_LTLIBRARIES+=libaltos32.la libaltos64.la
35 libaltos32_la_LDFLAGS=$(libaltos_la_LDFLAGS)
36 libaltos64_la_LDFLAGS=$(libaltos_la_LDFLAGS)
38 libaltos32_la_CFLAGS=-m32 $(AM_CFLAGS)
39 libaltos64_la_CFLAGS=-m64 $(AM_CFLAGS)
41 libaltos32_la_SOURCES=$(libaltos_la_SOURCES)
42 libaltos64_la_SOURCES=$(libaltos_la_SOURCES)
44 noinst_PROGRAMS+=cjnitest32 cjnitest64
46 cjnitest32_CFLAGS=-m32
47 cjnitest64_CFLAGS=-m64
49 cjnitest32_SOURCES=$(cjnitest_SOURCES)
50 cjnitest64_SOURCES=$(cjnitest_SOURCES)
52 cjnitest32_LDADD=libaltos32.la
53 cjnitest64_LDADD=libaltos64.la
61 SWIG_FILE=libaltos.swig
65 $(SWIG_FILE): libaltos.i0 $(HFILES)
66 sed 's;//%;%;' libaltos.i0 $(HFILES) > $(SWIG_FILE)
68 all-local: classlibaltos.stamp
70 libaltos_wrap.c: classlibaltos.stamp
72 classlibaltos.stamp: $(SWIG_FILE)
73 swig -java -package libaltosJNI $(SWIG_FILE)
75 $(JAVAC) -d . $(AM_JAVACFLAGS) $(JAVACFLAGS) *.java && \
76 touch classlibaltos.stamp
78 MINGCC32=i686-w64-mingw32-gcc
79 MINGCC64=x86_64-w64-mingw32-gcc
80 MINGFLAGS=-Wall -Wextra -DWINDOWS -DBUILD_DLL -mconsole -I$(JVM_INCLUDE) -I$(JVM_INCLUDE)/linux
81 MINGLIBS=-lsetupapi -lws2_32
83 fat: all altos.dll altos64.dll
85 altos.dll: $(WINDOWS_SRC) $(WINDOWS_H)
86 $(MINGCC32) -o $@ $(MINGFLAGS) -shared $(WINDOWS_SRC) $(MINGLIBS)
88 altos64.dll: $(WINDOWS_SRC) $(WINDOWS_H)
89 $(MINGCC64) -o $@ $(MINGFLAGS) -shared $(WINDOWS_SRC) $(MINGLIBS)
92 -rm -rf libaltosJNI *.class *.java classlibaltos.stamp $(SWIG_FILE) libaltos_wrap.c altos.dll altos64.dll