New optimization flag handling, get_opt functions are always inlined now
[libfirm] / Makefile.in
index 7d6162f..6dc97d6 100644 (file)
@@ -1,9 +1,13 @@
-# Hey Emacs, this is a -*- makefile -*-
 #
-# libFIRM Project
-#
-# Top level Makefile
-# $Id$
+# Project:     libFIRM
+# File name:   Makefile.in
+# Purpose:     Top level Makefile
+# Author:      Till Riedel
+# Modified by:
+# Created:
+# CVS-ID:      $Id$
+# Copyright:   (c) 2002-2003 Universität Karlsruhe
+# Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
 #
 
 
@@ -16,7 +20,7 @@ topdir := .
 # subdirectory under topdir
 subdir := .
 
-subdirs := ir ir/adt ir/debug ir/tv ir/common ir/ident ir/ir ir/tr ir/ana ir/st
+subdirs := ir/adt ir/debug ir/tv ir/common ir/ident ir/ir ir/tr ir/ana ir/st
 
 SOURCES := Makefile.in MakeRules.in MakeTargets\
           aclocal.m4 config.h.in\
@@ -34,18 +38,28 @@ XOFILES += $(addsuffix /subdir.o, $(subdirs))
 
 include $(top_srcdir)/MakeTargets
 
+# add target firmjni if configured with --enable-firmjni
+all: firm
+
+firm: libfirm.a
+
+$(OFILES): config.h Makefile
 
-all: config.h Makefile libfirm.a
+$(XOFILES): subdir_all
 
-libfirm.a: subdir_all $(XOFILES) $(OFILES)
+libfirm.a: $(XOFILES) $(OFILES)
        $(AR) $(ARFLAGS) $@.new $(XOFILES) $(OFILES)
        $(RANLIB) $@.new
        mv -f $@.new $@
 
+libfirm.so: subdir_all $(XOFILES) $(OFILES)
+       ld -Bshareable -o ./libfirm.so $(XOFILES) -lm
+
 testprograms:  libfirm.a
        $(MAKE) -C testprograms
-#      $(MAKE) -C firmjni  test  Tut nicht in craks Makefile
 
+firmjni:: libfirm.a
+       $(MAKE) -C firmjni
 
 # gernerate program documentation
 .PHONY: autodoc
@@ -75,8 +89,11 @@ stamp-h: config.h.in config.status
 config.status: configure
        ./config.status --recheck
 
+# add target test-firmjni if configured with --enable-firmjni
 test::
        $(MAKE) -C testprograms test;
+
+test-firmjni::
        $(MAKE) -C firmjni test;
 
 test-reference::
@@ -84,3 +101,4 @@ test-reference::
 
 test-clean:
        $(MAKE) -C testprograms realclean
+       $(MAKE) -C firmjni/testprograms clean;