X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=firmjni%2FMakefile.in;h=7371b5c08e4e8117633c10f6d01233dba25b0fed;hb=675816614886714d11b7f6ebe30a52077f7e2101;hp=14716a73295354263161aaa3fb17ccc3a3bcd8e2;hpb=0fdb2b1cd38cc0e659db222531e33f71451d4d07;p=libfirm diff --git a/firmjni/Makefile.in b/firmjni/Makefile.in index 14716a732..7371b5c08 100644 --- a/firmjni/Makefile.in +++ b/firmjni/Makefile.in @@ -1,5 +1,14 @@ - -# $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@ @@ -33,13 +42,13 @@ CLASSFILES = $(MEMBERS:.m=.class) 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@ \ - -D_SIZE_T_ + -I$(top_srcdir)/ir/ana -I$(top_srcdir)/ir/st @CPPFLAGS@ LDFLAGS += $(topdir) FIRM_HEADERS=$(notdir $(FIRM_PATH_HEADERS)) MEMBERS=$(subst .h,.m,$(shell echo $(FIRM_HEADERS)|$(SHELL_TOUPPER))) +MEMBERS += $(IMPL_MEMBERS) # How to pass function pointers? Therefore removed. # irgwalk.h typewalk.h @@ -48,7 +57,7 @@ MEMBERS=$(subst .h,.m,$(shell echo $(FIRM_HEADERS)|$(SHELL_TOUPPER))) # Irgwalk.m Typewalk.m # FIRM_PATH_HEADERS=common/firm.h common/firm_common.h \ - debug/dbginfo.h ident/ident.h tv/tv.h \ + ident/ident.h tv/tv.h \ tr/type.h tr/entity.h tr/type_or_entity.h tr/tpop.h tr/mangle.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 \ @@ -57,6 +66,9 @@ FIRM_PATH_HEADERS=common/firm.h common/firm_common.h \ ir/irgmod.h tr/typegmod.h FIRM_SOURCE_DIR_HEADERS=$(addprefix $(SOURCE_DIR)/,$(FIRM_HEADERS)) +# hand implemented members +IMPL_MEMBERS = Dbginfo.m + # The directory containing crecoder.jar and, for now, # remove_cpp_comands.perl FIRM_JNI_TOOLS_DIR=$(top_srcdir)/tools @@ -76,7 +88,7 @@ classfiles: $(CLASSFILES) javafiles: $(JAVAFILES) %.class: %.java - javac $< + javac -classpath .. $< # javah renames these files. the jnibuilder doesn't anticipate this # and generates #includes with the original names. @@ -88,6 +100,12 @@ Type_or_entity.h: Type_or_entity.class ln -sf Type_0005for_0005fentity.h Type_or_entity.h javah -classpath $(topdir) -o $@ $(PACKAGENAME).$(<:.class=) + +Dbginfo.java: + cp $(srcdir)/Dbginfo.java . + cp $(srcdir)/Dbginfo.c . + + %.h: %.class javah -classpath $(topdir) -o $@ $(PACKAGENAME).$(<:.class=) @@ -106,6 +124,10 @@ install: # cp *.java @javadir@ # cp *.class @javadir@ + +test: jni + $(MAKE) -C testprograms test + clean: rm -rf sources *.c *.h *.o @@ -128,10 +150,19 @@ $(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) - troff -a -C -z $(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 $@) + $(FIRM_HEADERS):$(FIRM_SOURCE_DIR_HEADERS) $(SOURCE_DIR)/firm_typedefs.h gcc $(CPPFLAGS) -E -C -P $(SOURCE_DIR)/$@ -o $@ @@ -144,5 +175,8 @@ $(FIRM_HEADERS):$(FIRM_SOURCE_DIR_HEADERS) $(SOURCE_DIR)/firm_typedefs.h H_FROM_JAVA=$(subst .java,.h,$(shell echo $@|$(SHELL_TOLOWER))) -%.java: $(FIRM_HEADERS) +%.java: $(FIRM_SOURCE_DIR_HEADERS) $(SOURCE_DIR)/firm_typedefs.h + gcc $(CPPFLAGS) -E -C -P $(SOURCE_DIR)/$(H_FROM_JAVA) -o $(H_FROM_JAVA) env CLASSPATH=$(FIRM_JNI_TOOLS_DIR)/crecoder.jar:$$CLASSPATH java crecoder/tools/jniBuilder/BuildJNI $(H_FROM_JAVA);\ + rm $(H_FROM_JAVA); +# remove the patched header so that further compilation finds the proper firm headers