diff options
Diffstat (limited to 'sim/sh/Makefile.in')
-rw-r--r-- | sim/sh/Makefile.in | 62 |
1 files changed, 41 insertions, 21 deletions
diff --git a/sim/sh/Makefile.in b/sim/sh/Makefile.in index a270062..6bfb402 100644 --- a/sim/sh/Makefile.in +++ b/sim/sh/Makefile.in @@ -17,12 +17,16 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. srcdir = . +srcroot = $(srcdir)/../../ + prefix = /usr/local + program_transform_name = exec_prefix = $(prefix) bindir = $(exec_prefix)/bin libdir = $(exec_prefix)/lib +tooldir = $(libdir)/$(target_alias) datadir = $(prefix)/lib mandir = $(prefix)/man @@ -42,43 +46,56 @@ docdir = $(srcdir)/doc SHELL = /bin/sh -INSTALL = install -c + + +INSTALL = $(srcroot)/install.sh -c INSTALL_PROGRAM = $(INSTALL) INSTALL_DATA = $(INSTALL) +INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)' +INSTALL_XFORM1= $(INSTALL_XFORM) -b=.1 + + +CC_FOR_BUILD = cc AR = ar AR_FLAGS = qc CFLAGS = -g BISON = bison MAKEINFO = makeinfo RANLIB = ranlib - +X=xstuff.o +XL=-lX11 +X= +XL= INCDIR = $(srcdir)/../../include -CSEARCH = -I.-I$(srcdir) -I../../include -I../../bfd -I$(INCDIR) -I$(srcdir)/../../bfd +CSEARCH = -I. -I$(srcdir) -I../../include -I../../bfd -I$(INCDIR) -I$(srcdir)/../../bfd -I$(srcdir)/../../gdb DEP = mkdep #### host, target, and site specific Makefile frags come in here. -all: run +all: run libsim.a -run: interp.o run.o table.o - $(CC) -o run interp.o table.o run.o ../../bfd/libbfd.a ../../libiberty/libiberty.a +run: interp.o $(X) run.o table.o + $(CC) $(CFLAGS) -o run $(X) interp.o table.o run.o ../../bfd/libbfd.a ../../libiberty/libiberty.a $(XL) interp.o:interp.c code.c table.c run.o:run.c +libsim.a:interp.o table.o + $(AR) $(ARFLAGS) libsim.a interp.o table.o + $(RANLIB) libsim.a + code.c:gencode ./gencode -x >code.c - indent code.c +# indent code.c table.c:gencode ./gencode -s >table.c - indent table.c +# indent table.c -gencode.o:gencode.c - -gencode:gencode.o +gencode:gencode.c + $(CC_FOR_BUILD) -o gencode $< #### host and target dependent Makefile fragments come in here. @@ -148,17 +165,20 @@ roll: # force: +# Copy the files into directories where they will be run. install: - -parent=`echo $(bindir)|sed -e 's@/[^/]*$$@@'`; \ - if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi - -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; fi - -parent=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \ - if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi - -if [ -d $(man1dir) ] ; then true ; else mkdir $(man1dir) ; fi - -n=`t='$(program_transform_name)'; echo run | sed -e "" $$t`; \ - $(INSTALL_PROGRAM) run $(bindir)/$$n; \ - $(M_INSTALL) - + srcroot=`cd $(srcroot); pwd`; export srcroot; \ + $(INSTALL_XFORM) run $(bindir)/run ; \ + n=`t='$(program_transform_name)'; echo run | sed -e "" $$t`; \ + if [ -d $(tooldir) ] ; then \ + if [ -d $(tooldir)/bin ] ; then true ; else mkdir $(tooldir)/bin ; fi; \ + rm -f $(tooldir)/bin/run; \ + ln $(bindir)/$$n $(tooldir)/bin/run \ + || $(INSTALL_PROGRAM) run $(tooldir)/bin/run; \ + else true; fi + +install-man: run.1 + $(INSTALL_XFORM1) $(srcdir)/run.1 $(man1dir)/run.1 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) |