aboutsummaryrefslogtreecommitdiff
path: root/contrib/bluegnu2.0.3/example/calc/Makefile.in
blob: ecd1283e21e3e527a39ecd896b0cc3ffc6751c5f (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
#   Copyright (C) 1988, 1990, 1991, 1992, 1994 Free Software Foundation, Inc.
#
# 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 1, 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., 675 Mass Ave, Cambridge, MA 02139, USA.
#

# target name
PROG=	calc

# compiler specifics
CC = @CC@
CFLAGS = -g -I$(srcdir) -I.
CALC = calc

# directory specifics
VPATH = @srcdir@
srcdir = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@

# testsuite specifics
# Setup the testing framework, if you have one
# Flags that we pass when building the testsuite.
EXPECT = ` \
	if [ -f $${rootme}/../../../expect/expect ] ; then \
	  echo $${rootme}/../../../expect/expect ; \
        else echo expect ; fi`

RUNTEST = ` \
  if [ -f $${srcdir}/../../../dejagnu/runtest ] ; then \
    echo $${srcdir}/../../../dejagnu/runtest ; \
  else echo runtest ;  fi`

RUNTESTFLAGS=

##  ---  NOTHING BELOW HERE SHOULD REQUIRE MODIFICATIONS  ---  ##

SRCS=	calc.c

OBJS=	calc.o

all:	${PROG}

calc.o: calc.c

.c.o:
	${CC} ${CFLAGS} -I$(srcdir) -I. -c $<

${PROG}: ${OBJS} ${DPADD}
	${CC} ${LDFLAGS} ${CFLAGS} -o $@ ${OBJS} ${DPADD} ${LDADD}

check:	site.exp all
	rootme=`pwd`; export rootme; \
        srcdir=${srcdir} ; export srcdir ; \
        EXPECT=${EXPECT} ; export EXPECT ; \
        if [ -f $${rootme}/../../expect/expect ] ; then  \
           TCL_LIBRARY=$${srcdir}/../../tcl/library ; \
           export TCL_LIBRARY ; fi ; \
	${RUNTEST} ${RUNTESTFLAGS} --tool ${PROG} CALC=${PROG} --srcdir ${srcdir}/testsuite

site.exp: ./config.status Makefile
	@echo "Making a new config file..."
	-@rm -f ./tmp?
	@touch site.exp

	-@mv site.exp site.bak
	@echo "## these variables are automatically generated by make ##" > ./tmp0
	@echo "# Do not edit here. If you wish to override these values" >> ./tmp0
	@echo "# add them to the last section" >> ./tmp0
	@echo "set tool calc" >> ./tmp0
	@echo "set srcdir ${srcdir}" >> ./tmp0
	@echo "set objdir `pwd`" >> ./tmp0
	@echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0
	@cat ./tmp0 > site.exp
	@cat site.bak | sed \
			-e '1,/^## All variables above are.*##/ d' >> site.exp
	-@rm -f ./tmp?

install: ${PROG}

clean mostlyclean:
	-rm -f a.out [Ee]rrs tags mklog core ${OBJS} ${PROG} 

distclean maintainer-clean realclean: clean
	-rm -f Makefile
	-rm -f config.status config.log config.cache
	-rm -f calc.h calc.log calc.plog calc.psum
	-rm -f calc.sum site.exp

Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) config.status
	@echo "Rebuilding the Makefile..."
	$(SHELL) ./config.status

configure: $(srcdir)/configure.in $(srcdir)/Makefile.in $(srcdir)/../../aclocal.m4
	@echo "Rebuilding configure..."
	@cd ${srcdir} ;\
	autoconf --localdir=${srcdir}/../..
     
config.status:
	@echo "Rebuilding config.status..."
	$(SHELL) ./config.status --recheck