# Generated automatically from Makefile.in by configure.

# This is a Makefile for the gdmo directory of scotty. If it has the
# name "Makefile.in" then it is a template for a Makefile; to generate
# the actual Makefile, run "./configure", which is a configuration
# script generated by the "autoconf" program (constructs like "@foo@"
# will get replaced in the actual Makefile.

#----------------------------------------------------------------
# Things you can change to personalize the Makefile for your own
# site (you can make these changes in either Makefile.in or
# Makefile, but changes to Makefile will get lost if you re-run
# the configuration script).
#----------------------------------------------------------------

# Default top-level directories in which to install architecture-
# specific files (exec_prefix) and machine-independent files such
# as scripts (prefix).  The values specified here may be overridden
# at configure-time with the --exec-prefix and --prefix options
# to the "configure" script.

prefix =	/usr/local
exec_prefix =	$(prefix)

# To change the compiler switches, for example to change from -O
# to -g, change the following line:
CFLAGS = -O

# To disable ANSI-C procedure prototypes reverse the comment 
# characters on the following lines:
PROTO_FLAGS =
#PROTO_FLAGS = -DNO_PROTOTYPE

# A "-I" switch that can be used when compiling to make all of the
# X11 include files accessible (the configure script will try to
# set this value, and will cause it to be an empty string if the
# include files are accessible via /usr/include).
X11_INCLUDES =   -I/usr/X11R6/include

# A "-I" switch that can be used when compiling to make all the
# Tcl include files accessible (the configure script will try to
# set this value).
TCL_INCLUDES =	-I/usr/include/tcl

# A "-I" switch that can be used when compiling to make all the
# Tk include files accessible (the configure script will try to
# set this value).
TK_INCLUDES =	-I/usr/include/tcl

# Some versions of make, like SGI's, use the following variable to
# determine which shell to use for executing commands:
SHELL =		/bin/sh

#----------------------------------------------------------------
# The symbols below provide support for dynamic loading and shared
# libraries.  The values of the symbols are normally set by the
# configure script.  You shouldn't normally need to modify any of
# these definitions by hand.  However, you can reverse the comments
# on the pairs of lines to force "no dynamic loading or shared
# libraries".
#----------------------------------------------------------------

# Flags to pass to cc when compiling the components of a shared
# library:
SHLIB_CFLAGS = 
#SHLIB_CFLAGS =

# Base command to use for combining object files into a shared
# library:
SHLIB_LD = 

# Suffix to use for the name of the shared library.  An empty string
# means we don't know how to use shared libraries on this platform.
SHLIB_SUFFIX = 
#SHLIB_SUFFIX = .a

# Library file(s) to include in tclsh and other base applications
# in order to provide facilities needed by DLOBJ above.
DL_LIBS = 
#DL_LIBS =

# Flags to pass to the compiler when linking object files into
# an executable wish or tktest binary.
LD_FLAGS = 
#LD_FLAGS =

#----------------------------------------------------------------
# The information below is modified by the configure script when
# Makefile is generated from Makefile.in.  You shouldn't normally
# modify any of this stuff by hand.
#----------------------------------------------------------------

INSTALL =		/usr/bin/install -c
INSTALL_PROGRAM =	${INSTALL}
INSTALL_DATA =		${INSTALL} -m 644
LEX =			
YACC =			
RANLIB =		ranlib
SRC_DIR =		.

#----------------------------------------------------------------
# The information below should be usable as is.  The configure
# script won't modify it and you shouldn't need to modify it
# either.
#----------------------------------------------------------------

CC =		cc
CC_SWITCHES =	${CFLAGS} -I. -I${SRC_DIR} -I.. -I${SRC_DIR}/.. $(TCL_INCLUDES) $(TK_INCLUDES) $(X11_INCLUDES) ${PROTO_FLAGS}

SRCS =	gdmoParser.c gdmoScan.c gdmoTcl.c

OBJS =	gdmoParser.o gdmoScan.o gdmoTcl.o

SOBJS =	gdmoParser.so gdmoScan.so gdmoTcl.so

.SUFFIXES: .so

.c.o:
	$(CC) -c $(CC_SWITCHES) $<

.c.so:
	$(CC) -o $*-so.o -c $(CC_SWITCHES) $(SHLIB_CFLAGS) $<
	mv $*-so.o $*.so

all: ../libscotty.a

../libscotty.a: $(OBJS)
	ar cru ../libscotty.a $(OBJS)
	$(RANLIB) ../libscotty.a

dynamic: $(SOBJS)

gdmoScan.c: gdmo.h gdmoParser.h gdmoScan.l
	$(LEX) $(SRC_DIR)/gdmoScan.l
	mv -f lex.yy.c gdmoScan.c

gdmoParser.c gdmoParser.h: gdmoParser.y
	$(YACC) -d $(SRC_DIR)/gdmoParser.y
	mv -f y.tab.c gdmoParser.c
	mv -f y.tab.h gdmoParser.h

install:
	( cd mibs; $(MAKE) install )

depend: gdmoParser.c gdmoScan.c
	cp Makefile Makefile.bak
	sed -e '/^# DO NOT DELETE THIS LINE/,$$d' < Makefile.bak > Makefile
	echo '# DO NOT DELETE THIS LINE' >> Makefile
	echo ' ' >> Makefile
	$(CC) -MM $(CC_SWITCHES) $(SRCS) >> Makefile

clean:
	@rm -f gdmoScan.c gdmoParser.c gdmoParser.h core *.o *.so *~
	@( echo "making clean in gdmo/mibs"; cd mibs; $(MAKE) clean )

distclean:
	@rm -f gdmoScan.c gdmoParser.c gdmoParser.h core *.o *~ 
	@rm -f Makefile TAGS *.bak lmake.??? 
	@( echo "making distclean in gdmo/mibs"; cd mibs; $(MAKE) distclean )

# DO NOT DELETE THIS LINE
