aboutsummaryrefslogtreecommitdiff
path: root/gdb/nindy-share/Makefile
blob: 5ec99ba38e7b1eb9151a879555f51a9a26bcf976 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
#Copyright 1992 Free Software Foundation, Inc.

# This file is part of GDB.

# 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
# (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.

#-----------------------------------------------------------------------------
# Makefile for toolib.a -- host code shAred by more than one tool
#-----------------------------------------------------------------------------

RANLIB	= ranlib

# The following lines should be uncommented for system V (i386v).
#__i386v__#USG = -DUSG
#__i386v__#SYSV_INCL = ${IPATH}/sysv.h
#__i386v__#RANLIB = echo >/dev/null

# The following line should be uncommented for HP-UX
#__hp9000__#USG = -DUSG
#__hp9000__#SYSV_INCL = ${IPATH}/sysv.h
#__hp9000__#RANLIB = echo >/dev/null

# Essential under System V, harmless elsewhere
SHELL = /bin/sh

#'HOST' will be defined in the host-specific makefile by 'make make'

TARG	= toolib.a
OPT	= -g
IPATH	= ../../include
CFLAGS  = ${OPT} ${USG} -I${IPATH} -DHOST=\"${HOST}\"
OBJS	= coffstrip.o nindy.o ttybreak.o ttyflush.o Onindy.o

${TARG}: ${OBJS} VERSION
	make ver960.o
	rm -f ${TARG}
	ar cvr ${TARG} ${OBJS} ver960.o
	${RANLIB} ${TARG}

coffstrip.o:	${IPATH}/b.out.h ${IPATH}/coff.h ${IPATH}/sysv.h
nindy.o:	${IPATH}/block_io.h ${IPATH}/env.h ${IPATH}/sysv.h
nindy.o:	${IPATH}/ttycntl.h ${IPATH}/wait.h
ttybreak.o:	${IPATH}/ttycntl.h
ttyflush.o:	${IPATH}/ttycntl.h
Onindy.o:	${IPATH}/block_io.h ${IPATH}/env.h ${IPATH}/sysv.h
Onindy.o:	${IPATH}/ttycntl.h ${IPATH}/wait.h


#-----------------------------------------------------------------------------
#		'STANDARD' GNU/960 TARGETS BELOW THIS POINT
#
# 'VERSION' file must be present and contain a string of the form "x.y"
#-----------------------------------------------------------------------------

ver960.c: FORCE
	rm -f ver960.c
	echo "char toolib_ver[]= \"${TARG} `cat VERSION`, `date`\";" > ver960.c


# This target should be invoked before building a new release.
# 'VERSION' file must be present and contain a string of the form "x.y"
#
roll:
	@V=`cat VERSION`		; \
	MAJ=`sed 's/\..*//' VERSION`	; \
	MIN=`sed 's/.*\.//' VERSION`	; \
	V=$$MAJ.`expr $$MIN + 1`	; \
	rm -f VERSION			; \
	echo $$V >VERSION		; \
	echo Version $$V

# Dummy target to force execution of dependent targets.
#
FORCE:

# 'G960BASE' will be defined at invocation
#
install:
	make ${TARG}
	mv -f ${TARG} ${G960BASE}/lib

clean:
	rm -f ${TARG} *.o core

# Target to uncomment host-specific lines in this makefile.  Such lines must
# have the following string beginning in column 1: #__<hostname>__#
# Original Makefile is backed up as 'Makefile.old'.
#
# Invoke with:  make make HOST=xxx
#
make:
	-@if test $(HOST)x = x ; then \
		echo 'Specify "make make HOST=???"'; \
		exit 1; \
	fi ; \
	grep -s "^#The next line was generated by 'make make'" Makefile; \
	if test $$? = 0 ; then	\
		echo "Makefile has already been processed with 'make make'";\
		exit 1; \
	fi ; \
	mv -f Makefile Makefile.old; \
	echo "#The next line was generated by 'make make'"	 >Makefile ; \
	echo "HOST=$(HOST)"					>>Makefile ; \
	echo							>>Makefile ; \
	sed "s/^#__$(HOST)__#//" < Makefile.old			>>Makefile