]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - sim/common/Make-common.in
Switch the license of all files explicitly copyright the FSF
[thirdparty/binutils-gdb.git] / sim / common / Make-common.in
index ee72b42b160560201941205a31daadeb1d80f2f0..4ef3f56662918145dc7ac448093ac9fef2e2f188 100644 (file)
@@ -1,20 +1,20 @@
 # Makefile fragment for common parts of all simulators.
-# Copyright 1997, 1998, 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
+# Copyright 1997, 1998, 1999, 2000, 2001, 2004, 2005, 2007
+# Free Software Foundation, Inc.
 # Contributed by Cygnus Support.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# the Free Software Foundation; either version 3 of the License, or
 # (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # This Makefile fragment consists of two separate parts.
 # They are merged into the final Makefile at points denoted by
@@ -228,7 +228,7 @@ CSEARCH = -I. -I$(srcdir) -I../common -I$(srccom) \
   -I../../include -I$(srcroot)/include \
   -I../../bfd -I$(srcroot)/bfd \
   -I../../opcodes -I$(srcroot)/opcodes \
-  -I../../intl -I$(srcroot)/intl
+  @INCINTL@
 ALL_CFLAGS = $(CONFIG_CFLAGS) $(CSEARCH) $(CFLAGS)
 BUILD_CFLAGS = -g -O $(CSEARCH)
 
@@ -237,12 +237,12 @@ COMMON_DEP_CFLAGS = $(CONFIG_CFLAGS) $(CSEARCH)
 LIBIBERTY_LIB = ../../libiberty/libiberty.a
 BFD_LIB = ../../bfd/libbfd.a
 OPCODES_LIB = ../../opcodes/libopcodes.a
-INTLLIBS = @INTLLIBS@
-INTLDEPS = @INTLDEPS@
+LIBINTL = @LIBINTL@
+LIBINTL_DEP = @LIBINTL_DEP@
 CONFIG_LIBS = @LIBS@
-LIBDEPS = $(BFD_LIB) $(OPCODES_LIB) $(INTLLIBS) $(LIBIBERTY_LIB) \
+LIBDEPS = $(BFD_LIB) $(OPCODES_LIB) $(LIBINTL_DEP) $(LIBIBERTY_LIB) \
        $(SIM_EXTRA_LIBDEPS)
-EXTRA_LIBS = $(BFD_LIB) $(OPCODES_LIB) $(INTLLIBS) $(LIBIBERTY_LIB) \
+EXTRA_LIBS = $(BFD_LIB) $(OPCODES_LIB) $(LIBINTL) $(LIBIBERTY_LIB) \
        $(CONFIG_LIBS) $(SIM_EXTRA_LIBS)
 
 LIB_OBJS = callback.o syscall.o targ-map.o $(SIM_OBJS)
@@ -252,14 +252,14 @@ RUNTESTFLAGS =
 callback_h = $(srcroot)/include/gdb/callback.h
 remote_sim_h = $(srcroot)/include/gdb/remote-sim.h
 
-all: $(SIM_EXTRA_ALL) libsim.a run .gdbinit
+all: $(SIM_EXTRA_ALL) libsim.a run$(EXEEXT) .gdbinit
 
 libsim.a: $(LIB_OBJS)
        rm -f libsim.a
        $(AR) $(AR_FLAGS) libsim.a $(LIB_OBJS)
        $(RANLIB) libsim.a
 
-run: $(SIM_RUN_OBJS) libsim.a $(LIBDEPS)
+run$(EXEEXT): $(SIM_RUN_OBJS) libsim.a $(LIBDEPS)
        $(CC) $(ALL_CFLAGS) -o run$(EXEEXT) \
          $(SIM_RUN_OBJS) libsim.a $(EXTRA_LIBS)
 
@@ -616,14 +616,14 @@ install: install-common $(SIM_EXTRA_INSTALL)
 
 install-common: installdirs
        n=`echo run | sed '$(program_transform_name)'`; \
-       $(INSTALL_PROGRAM) run$(EXEEXT) $(bindir)/$$n$(EXEEXT)
+       $(INSTALL_PROGRAM) run$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT)
        n=`echo libsim.a | sed s/libsim.a/lib$(target_alias)-sim.a/`; \
-       $(INSTALL_DATA) libsim.a $(libdir)/$$n ; \
-       ( cd $(libdir) ; $(RANLIB) $$n )
+       $(INSTALL_DATA) libsim.a $(DESTDIR)$(libdir)/$$n ; \
+       ( cd $(DESTDIR)$(libdir) ; $(RANLIB) $$n )
 
 installdirs:
-       $(SHELL) $(srcdir)/../../mkinstalldirs $(bindir)
-       $(SHELL) $(srcdir)/../../mkinstalldirs $(libdir)
+       $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(bindir)
+       $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(libdir)
 
 check:
        cd ../testsuite && $(MAKE) check RUNTESTFLAGS="$(RUNTESTFLAGS)"
@@ -646,7 +646,7 @@ TAGS: force
 
 clean: $(SIM_EXTRA_CLEAN)
        rm -f *.[oa] *~ core
-       rm -f run libsim.a
+       rm -f run$(EXEEXT) libsim.a
        rm -f gentmap targ-map.c targ-vals.h stamp-tvals
        if [ ! -f Make-common.in ] ; then \
                rm -f $(BUILT_SRC_FROM_COMMON) ; \
@@ -682,7 +682,7 @@ stamp-h: config.in config.status
 # CGEN support
 
 CGENDIR = @cgendir@
-CGEN = `if [ -f ../../guile/libguile/guile ]; then echo ../../guile/libguile/guile; else echo guile ; fi`
+CGEN = "`if [ -f ../../guile/libguile/guile ]; then echo ../../guile/libguile/guile; else echo guile ; fi` -l $(CGENDIR)/guile.scm -s"
 CGENFLAGS = -v
 CGEN_CPU_DIR = $(CGENDIR)/cpu
 
@@ -700,7 +700,7 @@ CGEN_CPU_SEM = -S tmp-sem.c1
 CGEN_CPU_SEMSW = -X tmp-semsw.c1
 
 CGEN_FLAGS_TO_PASS = \
-       CGEN=$(CGEN) \
+       CGEN='$(CGEN)' \
        CGENFLAGS="$(CGENFLAGS)"
 
 # We store the generated files in the source directory until we decide to