#
# Warning: the cpp used on this machine replaces
# all newlines and multiple tabs/spaces in a macro
# expansion with a single space.  Imake tries to
# compensate for this, but is not always
# successful.
#

#
# This makefile is automatically generated by imake... do not modify
# or you may lose your changes when imake generates makefiles again.
# Ignore this message if you are not using imake.
#

            TOP = TOPDIR
             AS = as
             CC = cc
            CPP = /lib/cpp
             LD = ld
           LINT = lint
        INSTALL = install
           TAGS = ctags
             RM = rm -f
             MV = mv
             LN = ln -s
         RANLIB = ranlib
             AR = ar clq
             LS = ls
       LINTOPTS = -axz
    LINTLIBFLAG = -C
           MAKE = make
    STD_DEFINES =
        DEFINES = -DPURDUE
    CDEBUGFLAGS = -g
        DESTDIR =

        PATHSEP = /
         DEPEND = $(DEPENDSRC)/makedepend
          IMAKE = $(IMAKESRC)/imake
            RGB = $(RGBSRC)/rgb
         CFLAGS = $(CDEBUGFLAGS) $(INCLUDES) $(STD_DEFINES) $(DEFINES)
      LINTFLAGS = $(LINTOPTS) $(INCLUDES) $(STD_DEFINES) $(DEFINES) -DLINT
        LDFLAGS = $(CDEBUGFLAGS) $(SYS_LIBRARIES) $(SYSAUX_LIBRARIES)
   INSTUIDFLAGS = -m 4755
   INSTLIBFLAGS = -m 0664
   INSTINCFLAGS = -m 0444
   INSTMANFLAGS = -m 0444
   INSTAPPFLAGS = -m 0444

      USRLIBDIR = $(DESTDIR)/usr/new/lib
         BINDIR = $(DESTDIR)/usr/new/X11
         LIBDIR = $(USRLIBDIR)/X11
     LINTLIBDIR = $(USRLIBDIR)/lint
         INCDIR = $(DESTDIR)/usr/new/include/X11
        FONTDIR = $(LIBDIR)/fonts
         UWMDIR = $(LIBDIR)/uwm
         MANDIR = $(DESTDIR)/usr/new/man/mann
    XAPPLOADDIR = $(LIBDIR)/app-defaults
         ADMDIR = $(DESTDIR)/usr/adm

      CLIENTSRC = $(TOP)/clients
        DEMOSRC = $(TOP)/demos
         LIBSRC = $(TOP)/lib
        FONTSRC = $(TOP)/fonts
     INCLUDESRC = $(TOP)/X11
      SERVERSRC = $(TOP)/server
        UTILSRC = $(TOP)/util
     EXAMPLESRC = $(TOP)/examples
     CONTRIBSRC = $(TOP)/contrib
         DOCSRC = $(TOP)/doc
      DEPENDSRC = $(UTILSRC)/makedepend
       IMAKESRC = $(UTILSRC)/imake
       IRULESRC = $(UTILSRC)/imake.includes
         RGBSRC = $(UTILSRC)/rgb
        XLIBSRC = $(LIBSRC)/X
     TOOLKITSRC = $(LIBSRC)/Xt
     AWIDGETSRC = $(LIBSRC)/Xaw
     OLDXLIBSRC = $(LIBSRC)/oldX
   EXTENSIONSRC = $(TOP)/extensions
        XMANSRC = $(DOCSRC)/Xlib/Xman
   EXTENSIONLIB = $(EXTENSIONSRC)/lib/libXext.a
           XLIB = $(XLIBSRC)/libX11.a
        OLDXLIB = $(OLDXLIBSRC)/liboldX.a
       XTOOLLIB = $(TOOLKITSRC)/libXt.a
         XAWLIB = $(AWIDGETSRC)/libXaw.a
       LINTXLIB = $(XLIBSRC)/llib-lX11.ln
      LINTXTOOL = $(TOOLKITSRC)/llib-lXt.ln
        LINTXAW = $(AWIDGETSRC)/llib-lXaw.ln
       INCLUDES = -I$(TOP)
      MACROFILE = Sun.macros
      IMAKE_CMD = $(NEWTOP)$(IMAKE) -TImake.tmpl \
			-I$(NEWTOP)$(IRULESRC) \
			-s Makefile
         RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a \
			tags TAGS make.log

DEFINES = -I/usr/new/include -DX11
SYS_LIBRARIES = -lm
SYSAUX_LIBRARIES = -L/usr/new/lib -lXaw -lXt -lX

SRCS=	addpt.c arc.c arrow.c autoarrow.c\
	bitmap.c blink.c bound.c box.c break.c\
	canvas.c char.c color.c copy.c cursor.c curve.c\
	deletept.c dir.c drag.c draw.c ellipse.c\
	file.c flip.c font.c free.c\
	geom.c global.c glue.c graphics.c grid.c\
	intspline.c latex_line.c line.c list.c\
	main.c move.c movept.c msgsw.c\
	panel.c popup.c puterr.c\
	read.c read1_3.c redisplay.c remove.c rotate.c ruler.c\
	save.c scale.c search.c spline.c\
	text.c trans.c turn.c undo.c util.c xtra.c

OBJS=	addpt.o arc.o arrow.o autoarrow.o\
	bitmap.o blink.o bound.o box.o break.o\
	canvas.o char.o color.o copy.o cursor.o curve.o\
	deletept.o dir.o drag.o draw.o ellipse.o\
	file.o flip.o font.o free.o\
	geom.o global.o glue.o graphics.o grid.o\
	intspline.o latex_line.o line.o list.o\
	main.o move.o movept.o msgsw.o\
	panel.o popup.o puterr.o\
	read.o read1_3.o redisplay.o remove.o rotate.o ruler.o\
	save.o scale.o search.o spline.o\
	text.o trans.o turn.o undo.o util.o xtra.o

F2PSRC =	arrow.c f2p.c free.c read.c read1_3.c
F2POBJ =	arrow.o f2p.o free.o read.o read1_3.o

F2PSSRC =	arrow.c bound.c f2ps.c free.c read.c read1_3.c
F2PSOBJ =	arrow.o bound.o f2ps.o free.o read.o read1_3.o

 PROGRAM = xfig

all:: xfig

xfig: $(OBJS) $(LOCAL_LIBRARIES)
	$(RM) $@
	$(CC) -o $@ $(OBJS) $(LOCAL_LIBRARIES) $(LDFLAGS)

relink::
	$(RM) $(PROGRAM)
	$(MAKE) $(MFLAGS) $(PROGRAM)

install:: xfig
	$(INSTALL) -c $(INSTALLFLAGS) xfig $(BINDIR)

install:: xfig.man
	$(INSTALL) -c $(INSTMANFLAGS) xfig.man $(MANDIR)/xfig.n

depend:: $(DEPEND)

depend::
	$(DEPEND) -s "# DO NOT DELETE" -- $(CFLAGS) -- $(SRCS)

$(DEPEND):
	@echo "making $(DEPENDSRC)"; \
	cd $(DEPENDSRC); $(MAKE)

clean::
	$(RM) $(PROGRAM)

f2p: $(F2POBJ)
	$(RM) $@
	$(CC) -o $@ $(F2POBJ)  $(LDFLAGS)

relink::
	$(RM) f2p
	$(MAKE) $(MFLAGS) f2p

clean::
	$(RM) f2p

f2ps: $(F2PSOBJ)
	$(RM) $@
	$(CC) -o $@ $(F2PSOBJ)  $(LDFLAGS)

relink::
	$(RM) f2ps
	$(MAKE) $(MFLAGS) f2ps

clean::
	$(RM) f2ps

clean::
	$(RM_CMD) \#*

Makefile:: $(IMAKE)

Makefile:: Imakefile \
	$(IRULESRC)/Imake.tmpl \
	$(IRULESRC)/Imake.rules \
	$(IRULESRC)/$(MACROFILE)
	-$(RM) Makefile.bak; $(MV) Makefile Makefile.bak
	$(IMAKE_CMD) -DTOPDIR=$(TOP)

$(IMAKE):
	@echo "making $(IMAKESRC)"; \
	cd $(IMAKESRC); $(MAKE)

tags::
	$(TAGS) -w *.[ch]
	$(TAGS) -xw *.[ch] > TAGS

install::
	@echo "install done"

Makefiles::

