# Makefile generated by imake - do not edit!
# $XConsortium: imake.c,v 1.65 91/07/25 17:50:17 rws Exp $
#
# The cpp used on this machine replaces all newlines and multiple tabs and
# spaces in a macro expansion with a single space.  Imake tries to compensate
# for this, but is not always successful.
#

#  -------------------------------------------------------------------------
#  Makefile generated from "Imake.tmpl"  and <Imakefile>
#  $XConsortium: Imake.tmpl,v 1.138 91/07/30 14:59:20 rws Exp $
#
#  Platform-specific parameters may be set in the appropriate <vendor>.cf
#  configuration files.  Site-specific parameters should be set in the file
#  site.def.  Full rebuilds are recommended if any parameters are changed.
#
#  If your C preprocessor does not define any unique symbols, you will need
#  to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing
#  "make World" the first time).
#

#  -------------------------------------------------------------------------
#  site-specific configuration parameters that need to come before
#  the platform-specific parameters - edit site.def to change

          XLIBSRC = /ch/x11
           TWMDIR = /gcc/src/x11/twm
             XLIB = -lXt -lX11
     EXTENSIONLIB = -lXext
           XMULIB = -lXmu

#  -------------------------------------------------------------------------
#  platform-specific configuration parameters - edit amiga.cf  to change

#  -------------------------------------------------------------------------
#  site-specific configuration parameters that go after
#  the platform-specific parameters - edit site.def to change

          XLIBSRC = /ch/x11
           TWMDIR = /gcc/src/x11/twm
             XLIB = -lXt -lX11
     EXTENSIONLIB = -lXext
           XMULIB = -lXmu

            SHELL = /bin/sh

              TOP =
      CURRENT_DIR =

               AR = ar clq
  BOOTSTRAPCFLAGS =
               CC = gcc
               AS = as

         COMPRESS = compress
              CPP = cpp  $(STD_CPP_DEFINES)
    PREPROCESSCMD = gcc  -E  $(STD_CPP_DEFINES)
          INSTALL = copy
               LD = ld
             LINT = lint
      LINTLIBFLAG = -C
         LINTOPTS = -axz
               LN = makelink
             MAKE = dmake
               MV = rename
               CP = copy

           RANLIB = ranlib
  RANLIBINSTFLAGS =

               RM = rm
            TROFF = groff
         MSMACROS = -man
              TBL = tbl
              EQN = eqn
     STD_INCLUDES =
  STD_CPP_DEFINES =
      STD_DEFINES =
 EXTRA_LOAD_FLAGS =
  EXTRA_LIBRARIES = -lnet -lc -lamiga
             TAGS = ctags

    PROTO_DEFINES =

     INSTPGMFLAGS =

     INSTBINFLAGS = -m 0755
     INSTUIDFLAGS = -m 4755
     INSTLIBFLAGS = -m 0644
     INSTINCFLAGS = -m 0444
     INSTMANFLAGS = -m 0444
     INSTDATFLAGS = -m 0444
    INSTKMEMFLAGS = -m 4755

      CDEBUGFLAGS =
        CCOPTIONS = -O2 -m68020 -m68881

      ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES)
       ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(DEFINES)
           CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES)
        LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES)

           LDLIBS = $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)

        LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(LOCAL_LDFLAGS)

   LDCOMBINEFLAGS = -X -r
      DEPENDFLAGS =

        MACROFILE = amiga.cf
           RM_CMD = $(RM) *.bak *.o *.a tags make.log MakeOut

    IMAKE_DEFINES =

         IRULESRC = $(CONFIGDIR)
        IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES)

     ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Imake.rules 			$(IRULESRC)/Project.tmpl $(IRULESRC)/site.def 			$(IRULESRC)/$(MACROFILE) $(EXTRA_ICONFIGFILES)

#  -------------------------------------------------------------------------
#  Imake rules for building libraries, programs, scripts, and data files
#  rules:  $XConsortium: Imake.rules,v 1.121 91/08/22 16:32:50 rws Exp $

#  -------------------------------------------------------------------------
#  start of Imakefile

#  $XConsortium: Imakefile,v 1.33 91/07/17 00:48:06 gildea Exp $
#
#  Here is an Imakefile for twm.  It depends on having TWMDIR defined
#  in Imake.tmpl.  I like to use Imakefiles for everything, and I am sure
#  other people do also, so perhaps you could do us all a favor and
#  distribute this one.
#

         YFLAGS = -d
        DEPLIBS = $(DEPXMULIB) $(DEPEXTENSIONLIB) $(DEPXLIB)
LOCAL_LIBRARIES = $(XMULIB) $(EXTENSIONLIB) $(XLIB)
       LINTLIBS = $(LINTXMU) $(LINTEXTENSIONLIB) $(LINTXLIB)
        DEFINES = $(SIGNAL_DEFINES)

   ALLTWMDEBUGS = -DDEBUG -DDEBUG_MENUS -DDEBUG_EVENTS -DDEBUG_IC0NMGR -DTRACE

           SRCS = gram.c lex.c deftwmrc.c add_window.c gc.c list.c twm.c 		parse.c menus.c events.c resize.c util.c version.c iconmgr.c 		cursor.c icons.c

           OBJS = gram.o lex.o deftwmrc.o add_window.o gc.o list.o twm.o 		parse.o menus.o events.o resize.o util.o version.o iconmgr.o 		cursor.o icons.o

all:: twm

depend:: lex.c gram.c deftwmrc.c

 PROGRAM = twm

all:: twm

twm: $(OBJS) $(DEPLIBS)
	$(RM) $@
	$(CC) -o $@ $(OBJS) $(LDOPTIONS) $(LOCAL_LIBRARIES) $(LDLIBS) $(EXTRA_LOAD_FLAGS)

install:: twm
	 @if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \
	else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi
	$(INSTALL) -c $(INSTPGMFLAGS)   twm $(DESTDIR)$(BINDIR)

install.man:: twm.man
	 @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \
	else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi
	$(INSTALL) -c $(INSTMANFLAGS) twm.man $(DESTDIR)$(MANDIR)/twm.$(MANSUFFIX)

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

lint:
	$(LINT) $(LINTFLAGS) $(SRCS) $(LINTLIBS)
lint1:
	$(LINT) $(LINTFLAGS) $(FILE) $(LINTLIBS)

clean::
	$(RM) $(PROGRAM)

install:: system.twmrc
	 @if [ -d $(DESTDIR)$(TWMDIR) ]; then set +x; \
	else (set -x; $(MKDIRHIER) $(DESTDIR)$(TWMDIR)); fi
	$(INSTALL) -c $(INSTDATFLAGS) system.twmrc $(DESTDIR)$(TWMDIR)

gram.o: gram.y
	yacc $(YFLAGS) gram.y
	$(RM) gram.c gram.h
	$(MV) y.tab.c gram.c
	$(MV) y.tab.h gram.h
	$(CC) $(CFLAGS) -c gram.c

lex.o: lex.l
	flex $(LFLAGS) lex.l
	$(RM) lex.c
	$(MV) lex.yy.c lex.c
	$(CC) $(CFLAGS) -c lex.c

clean::
	$(RM) y.tab.h y.tab.c lex.yy.c gram.h gram.c lex.c deftwmrc.c

deftwmrc.o:  system.twmrc
	sed -f sed.commands system.twmrc >sed.output
	join sed.begin sed.output sed.end as deftwmrc.c
	$(CC) $(CFLAGS) -c deftwmrc.c

#  -------------------------------------------------------------------------
#  common rules for all Makefiles - do not edit

emptyrule::

clean::
	$(RM_CMD) "#"*

Makefile::
	-@if [ -f Makefile ]; then set -x; \
	$(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \
	else exit 0; fi
	$(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)

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

#  -------------------------------------------------------------------------
#  empty rules for directories that do not have SUBDIRS - do not edit

install::
	@echo "install in $(CURRENT_DIR) done"

install.man::
	@echo "install.man in $(CURRENT_DIR) done"

Makefiles::

includes::

#  -------------------------------------------------------------------------
#  dependencies generated by makedepend

