X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=firmjni%2FMakefile.in;h=868baca624a65e99425b234018932f602d288e15;hb=217c4f3a0ffc115825dbebb2270ab1d20c246e97;hp=2d4f3b1a1d4d28f004e62241cf94387312e7785f;hpb=7e4683f809ed86a50eaa87690ac0616b5e840258;p=libfirm diff --git a/firmjni/Makefile.in b/firmjni/Makefile.in index 2d4f3b1a1..868baca62 100644 --- a/firmjni/Makefile.in +++ b/firmjni/Makefile.in @@ -1,11 +1,25 @@ - -# $Id$ +# +# Project: libFIRM +# File name: firmjni/Makefile.in +# Purpose: +# Author: Till Riedel, Goetz Lindenmaier +# Modified by: +# Created: 2002 +# CVS-ID: $Id$ +# Copyright: (c) 2002 Universität Karlsruhe +# Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. +# top_srcdir := @top_srcdir@ srcdir = @srcdir@ topdir = .. subdir = firmjni +enable_heapanal := @enable_heapanalysis@ +enable_libcore := @enable_libcore@ +enable_external_effects := @enable_external_effects@ +disable_libiberty := @disable_libiberty@ + # The library implementing the JNI methods. This name is also # known to the generator for the JNI interface and used in the # static initializer. @@ -14,6 +28,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 @@ -30,12 +46,32 @@ 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 \ + -I$(top_srcdir)/ir/arch -I$(topdir)/ir/config \ + -I$(topdir) + +LDFLAGS += -L$(libdir) + +ifeq ($(enable_heapanal),yes) +LDFLAGS += -lfirmlower -labor -lheapanal +endif + +ifeq ($(enable_libcore),yes) +LDFLAGS += -lcore +endif + +ifeq ($(enable_external_effects),yes) +LDFLAGS += -lxml2 +endif + +ifeq ($(disable_libiberty),yes) +LDFLAGS += -liberty +endif -LDFLAGS += $(topdir) FIRM_HEADERS=$(notdir $(FIRM_PATH_HEADERS)) MEMBERS=$(subst .h,.m,$(shell echo $(FIRM_HEADERS)|$(SHELL_TOUPPER))) @@ -50,16 +86,23 @@ 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 arch/archop.h \ + ana/irextbb.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 @@ -93,9 +136,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=) @@ -106,15 +150,21 @@ Dbginfo.java: $(OFILES): gcc $(CPPFLAGS) -c $(@:.o=.c) -o $@ -jni: $(HFILES) $(OFILES) # ../libfirm.a - gcc -shared -fPIC -o $(LIBNAME) *.o -lfirm -L.. +# We need firmlower and abor for heap analysis stuff, which is called from aux/Heapanal.java +# BY the way, what is ../../sw/lib/ can this be removed? Probaly, so I did. +jni: $(HFILES) $(OFILES) # ../libfirm.a + gcc -shared -fPIC -o $(LIBNAME) *.o -lfirm -L.. $(LDFLAGS) install: cp libfirmjni.so $(libdir) # mkdir $(javadir) # cp *.java @javadir@ # cp *.class @javadir@ + +test: jni + $(MAKE) -C testprograms test + clean: rm -rf sources *.c *.h *.o @@ -137,10 +187,16 @@ $(SOURCE_DIR)/firm_typedefs.h: $(FIRM_SOURCE_HEADERS) FIRM_SRC_HEADER=$(top_srcdir)/ir/$(filter %/$(notdir $@),$(FIRM_PATH_HEADERS)) + +# recode: remove "a from C code... $(FIRM_SOURCE_DIR_HEADERS): $(SOURCE_DIR) - cp $(FIRM_SRC_HEADER) $(SOURCE_DIR)/$(notdir $@) + recode ISO-8859-1..ascii < $(FIRM_SRC_HEADER) > $(SOURCE_DIR)/$(notdir $@) perl $(REMOVE_CPP_COMMANDS) $@ +# cp $(FIRM_SRC_HEADER) $(SOURCE_DIR)/$(notdir $@) +# recode ISO-8859-1..ascii < $@ > $@.x +# cp $@.x $@ + # generiert leere dateien ;-( # troff -a -C -z $(FIRM_SRC_HEADER) > $(SOURCE_DIR)/$(notdir $@)