4 top_srcdir := @top_srcdir@
9 # The library implementing the JNI methods. This name is also
10 # known to the generator for the JNI interface and used in the
12 LIBNAME = libfirmjni.so
14 # where to put libfirmjni.so
16 # where to put the directory firmjni containing the generated
17 # .java and .class files
18 #javadir = @javadir@ @@@ how to specify a dir in configure.in?
20 .PHONY: default all clean realclean depend
22 MEMBERS = Firm.m Firm.m Firm_common.m Dbginfo.m Ident.m Tv.m \
23 Type.m Entity.m Type_or_entity.m Tpop.m Mangle.m \
24 Irprog.m Irgraph.m Irnode.m Irmode.m Irop.m Ircons.m Ircgcons.m \
25 Irflag.m Irvrfy.m Irdump.m Iropt.m Irgopt.m Ircgopt.m \
26 Irouts.m Irdom.m Irloop.m Cgana.m \
28 # How to pass function pointers? Or how to obtain them?
29 # Irgwalk.m Typewalk.m
31 OFILES = $(MEMBERS:.m=.o)
32 HFILES = $(MEMBERS:.m=.h)
33 CLASSFILES = $(MEMBERS:.m=.class)
35 CPPFLAGS = -I$(top_srcdir)/ir/ir -I$(top_srcdir)/ir/common \
36 -I$(top_srcdir)/ir/ident -I$(top_srcdir)/ir/tr \
37 -I$(top_srcdir)/ir/tv -I$(top_srcdir)/ir/debug \
38 -I$(top_srcdir)/ir/ana -I$(top_srcdir)/ir/st @CPPFLAGS@
44 # call the generator to make the implementation files
48 classfiles: $(CLASSFILES)
57 gcc $(CPPFLAGS) -c $< -o $@
59 jni: $(HFILES) $(OFILES) # ../libfirm.a
60 gcc -shared -fPIC -o $(LIBNAME) *.o -lfirm -L..
63 cp libfirmjni.so $(libdir)
66 # cp *.class @javadir@
69 rm -rf sources *.c *.h *.o
72 rm -f *~ libfirmjni.so *.vcg *.java *.class