1 #Copyright 1992 Free Software Foundation, Inc.
3 # This file is part of GDB.
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 #-----------------------------------------------------------------------------
20 # Makefile for toolib.a -- host code shAred by more than one tool
21 #-----------------------------------------------------------------------------
25 # The following lines should be uncommented for system V (i386v).
26 #__i386v__#USG = -DUSG
27 #__i386v__#SYSV_INCL = ${IPATH}/sysv.h
28 #__i386v__#RANLIB = echo >/dev/null
30 # The following line should be uncommented for HP-UX
31 #__hp9000__#USG = -DUSG
32 #__hp9000__#SYSV_INCL = ${IPATH}/sysv.h
33 #__hp9000__#RANLIB = echo >/dev/null
35 # Essential under System V, harmless elsewhere
38 #'HOST' will be defined in the host-specific makefile by 'make make'
43 CFLAGS
= ${OPT} ${USG} -I
${IPATH} -DHOST
=\"${HOST}\"
44 OBJS
= coffstrip.o nindy.o ttybreak.o ttyflush.o Onindy.o
46 ${TARG}: ${OBJS} VERSION
49 ar cvr
${TARG} ${OBJS} ver960.o
52 coffstrip.o
: ${IPATH}/b.out.h
${IPATH}/coff.h
${IPATH}/sysv.h
53 nindy.o
: ${IPATH}/block_io.h
${IPATH}/env.h
${IPATH}/sysv.h
54 nindy.o
: ${IPATH}/ttycntl.h
${IPATH}/wait.h
55 ttybreak.o
: ${IPATH}/ttycntl.h
56 ttyflush.o
: ${IPATH}/ttycntl.h
57 Onindy.o
: ${IPATH}/block_io.h
${IPATH}/env.h
${IPATH}/sysv.h
58 Onindy.o
: ${IPATH}/ttycntl.h
${IPATH}/wait.h
61 #-----------------------------------------------------------------------------
62 # 'STANDARD' GNU/960 TARGETS BELOW THIS POINT
64 # 'VERSION' file must be present and contain a string of the form "x.y"
65 #-----------------------------------------------------------------------------
69 echo
"char toolib_ver[]= \"${TARG} `cat VERSION`, `date`\";" > ver960.c
72 # This target should be invoked before building a new release.
73 # 'VERSION' file must be present and contain a string of the form "x.y"
77 MAJ
=`sed 's/\..*//' VERSION` ; \
78 MIN
=`sed 's/.*\.//' VERSION` ; \
79 V
=$$MAJ.
`expr $$MIN + 1` ; \
84 # Dummy target to force execution of dependent targets.
88 # 'G960BASE' will be defined at invocation
92 mv
-f
${TARG} ${G960BASE}/lib
95 rm -f
${TARG} *.o core
97 # Target to uncomment host-specific lines in this makefile. Such lines must
98 # have the following string beginning in column 1: #__<hostname>__#
99 # Original Makefile is backed up as 'Makefile.old'.
101 # Invoke with: make make HOST=xxx
104 -@if
test $(HOST
)x
= x
; then \
105 echo
'\aSpecify "make make HOST=???"'; \
108 grep
-s
"^#The next line was generated by 'make make'" Makefile
; \
109 if
test $$?
= 0 ; then \
110 echo
"\aMakefile has already been processed with 'make make'";\
113 mv
-f Makefile Makefile.old
; \
114 echo
"#The next line was generated by 'make make'" >Makefile
; \
115 echo
"HOST=$(HOST)" >>Makefile
; \
117 sed
"s/^#__$(HOST)__#//" < Makefile.old
>>Makefile