4 top_srcdir := @top_srcdir@
9 libdir = @libdir@ # where to find libfirm.a and where to put libfirmjni.so
11 LIBNAME = libfirmjni.so
13 .PHONY: default all clean realclean depend
15 MEMBERS = Firm.m Firm.m Firm_common.m Dbginfo.m Ident.m Tv.m \
16 Type.m Entity.m Type_or_entity.m Tpop.m Mangle.m \
17 Irprog.m Irgraph.m Irnode.m Irmode.m Irop.m Ircons.m Ircgcons.m \
18 Irflag.m Irvrfy.m Irdump.m Iropt.m Irgopt.m Ircgopt.m \
19 Irouts.m Irdom.m Irloop.m Cgana.m \
20 Irgwalk.m Irgmod.m Typewalk.m Typegmod.m
22 OFILES = $(MEMBERS:.m=.o)
23 HFILES = $(MEMBERS:.m=.h)
34 gcc $(CPPFLAGS) -c $< -o $@
36 jni: $(HFILES) $(OFILES) $(libdir)libfirm.a
37 gcc -shared -fPIC -o $(LIBNAME) *.o -L$(libdir) -lfirm
40 cp libfirmjni.so $(libdir)
44 rm -rf sources *.c *.h *.o
47 rm -f *~ libfirmjni.so *.vcg *.java *.class