X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=firmjni%2FMakefile.in;h=fd156f6fb63598d0ecf3ec7928f73a3913fc474d;hb=b2509ebc03f0b178683087886a9d9269cb84bd03;hp=7371b5c08e4e8117633c10f6d01233dba25b0fed;hpb=ae67c37a9e514f20e48dbf9c0956508ec722a279;p=libfirm diff --git a/firmjni/Makefile.in b/firmjni/Makefile.in index 7371b5c08..fd156f6fb 100644 --- a/firmjni/Makefile.in +++ b/firmjni/Makefile.in @@ -15,6 +15,8 @@ srcdir = @srcdir@ topdir = .. subdir = firmjni +enable_heapanal := @enable_heapanalysis@ + # The library implementing the JNI methods. This name is also # known to the generator for the JNI interface and used in the # static initializer. @@ -23,6 +25,8 @@ LIBNAME = libfirmjni.so # The name of the package containing the Firm JNI PACKAGENAME = firmjni +include $(topdir)/MakeRules + # where to put libfirmjni.so libdir = @libdir@ # where to put the directory firmjni containing the generated @@ -39,12 +43,17 @@ HFILES = $(MEMBERS:.m=.h) JAVAFILES = $(MEMBERS:.m=.java) CLASSFILES = $(MEMBERS:.m=.class) -CPPFLAGS = -I$(top_srcdir)/ir/ir -I$(top_srcdir)/ir/common \ +CPPFLAGS += -I$(top_srcdir)/ir/ir -I$(top_srcdir)/ir/common \ -I$(top_srcdir)/ir/ident -I$(top_srcdir)/ir/tr \ -I$(top_srcdir)/ir/tv -I$(top_srcdir)/ir/debug \ - -I$(top_srcdir)/ir/ana -I$(top_srcdir)/ir/st @CPPFLAGS@ + -I$(top_srcdir)/ir/ana -I$(top_srcdir)/ir/opt \ + -I$(top_srcdir)/ir/st -I$(top_srcdir)/ir/stat -LDFLAGS += $(topdir) +LDFLAGS += -I$(topdir) + +ifeq ($enable_heapanal,yes) +LDFLAGS += -L$(libdir) -lfirmlower -labor +endif FIRM_HEADERS=$(notdir $(FIRM_PATH_HEADERS)) MEMBERS=$(subst .h,.m,$(shell echo $(FIRM_HEADERS)|$(SHELL_TOUPPER))) @@ -59,16 +68,22 @@ MEMBERS += $(IMPL_MEMBERS) FIRM_PATH_HEADERS=common/firm.h common/firm_common.h \ ident/ident.h tv/tv.h \ tr/type.h tr/entity.h tr/type_or_entity.h tr/tpop.h tr/mangle.h \ + tr/type_identify.h \ ir/irprog.h ir/irgraph.h ir/irnode.h ir/irmode.h ir/irop.h \ ir/ircons.h ir/ircgcons.h ir/irflag.h ir/irvrfy.h ir/irdump.h \ ir/iropt.h ir/irgopt.h ir/ircgopt.h \ ana/irouts.h ana/irdom.h ana/irloop.h ana/cgana.h \ - ir/irgmod.h tr/typegmod.h + ir/irgmod.h tr/typegmod.h opt/tailrec.h + FIRM_SOURCE_DIR_HEADERS=$(addprefix $(SOURCE_DIR)/,$(FIRM_HEADERS)) # hand implemented members IMPL_MEMBERS = Dbginfo.m +ifeq ($(enable_heapanal),yes) +IMPL_MEMBERS += Heapanal.m +endif + # The directory containing crecoder.jar and, for now, # remove_cpp_comands.perl FIRM_JNI_TOOLS_DIR=$(top_srcdir)/tools @@ -102,9 +117,10 @@ Type_or_entity.h: Type_or_entity.class Dbginfo.java: - cp $(srcdir)/Dbginfo.java . - cp $(srcdir)/Dbginfo.c . + cp $(top_srcdir)/firmjni/aux/Dbginfo.java $(top_srcdir)/firmjni/aux/Dbginfo.c . +Heapanal.java: + cp $(top_srcdir)/firmjni/aux/Heapanal.java $(top_srcdir)/firmjni/aux/Heapanal.c . %.h: %.class javah -classpath $(topdir) -o $@ $(PACKAGENAME).$(<:.class=) @@ -115,9 +131,17 @@ Dbginfo.java: $(OFILES): gcc $(CPPFLAGS) -c $(@:.o=.c) -o $@ -jni: $(HFILES) $(OFILES) # ../libfirm.a - gcc -shared -fPIC -o $(LIBNAME) *.o -lfirm -L.. +ifeq ($(enable_heapanal),yes) +HEAPANALLIB = -lheapanal +else +HEAPANALLIB = +endif + +# We need firmlower and abor for heap analysis stuff, wich is called from aux/Heapanal.java +# BY the way, what is sw/lib/ can this be removed??? +jni: $(HFILES) $(OFILES) # ../libfirm.a + gcc -shared -fPIC -o $(LIBNAME) *.o -lfirm -lxml2 -L.. $(HEAPANALLIB) $(LDFLAGS) -liberty -L../../sw/lib install: cp libfirmjni.so $(libdir) # mkdir $(javadir)