#
# Imakefile -- for instructions on generating a Makefile
#   for xboard from this file, see the file INSTALL
#

   SYS_LIBRARIES = -lm
 LOCAL_LIBRARIES = XawClientLibs
         DEPLIBS = XawClientDepLibs
       MANSUFFIX = 6
#    CDEBUGFLAGS = -g
#             CC = gcc -Wall -pedantic -ansi -Wno-implicit -Wno-comment
#             CC = gcc -Wall -traditional

         DEFINES = -DHAS_GETTIMEOFDAY -DATTENTION

# Uncomment the next two lines if you use "flex" instead of "lex"
# You don't need the second one if your "flex" is installed as "lex"
#        DEFINES = -DHAS_GETTIMEOFDAY -DATTENTION -DFLEX
#            LEX = flex

#ifdef HPArchitecture
#ifdef HasGcc
       CCOPTIONS = -fwritable-strings -D_HPUX_SOURCE
#else
       CCOPTIONS = -Aa -D_HPUX_SOURCE
#endif
#endif

# Uncomment the next line for Sun's Solaris 2.x:
#  SYS_LIBRARIES =  -lsocket -lnsl -lelf -lm

# If you get the following linker error messages on SunOS, you have
# hit a known bug in the SunOS linker (ld).
#	ld: Undefined symbol 
#	  _get_wmShellWidgetClass 
#	  _get_applicationShellWidgetClass 
# To work around it,  try uncommenting this if you are using Sun's C compiler:
#        XMULIB = -Bstatic -lXmu -Bdynamic
# ... or this if you are using gcc:
#        XMULIB = -static -lXmu -dynamic
# Ask Sun for patches 100512-02 and 100573-03 to get the real fix.

# Try uncommenting this if you use gcc and xboard crashes in sscanf.
# Probably needed on VAX Ultrix 3.1 and on IBM PS/2 AIX.
#      CCOPTIONS = -fwritable-strings

.SUFFIXES: .man .doc
.man.doc:
	nroff -man $*.man > $@

SRCS = parser.c xboard.c backend.c
OBJS = parser.o xboard.o backend.o
#SRCS = parser.c xboard.c backend.c zippy.c
#OBJS = parser.o xboard.o backend.o zippy.o

AllTarget(xboard)
AllTarget(cmail)
AllTarget(xboard.doc)
AllTarget(cmail.doc)

depend:: parser.c

clean::
	$(RM) parser.c chess.lst CLp*

ComplexProgramTarget(xboard)
InstallProgram(cmail,$(BINDIR))
InstallManPage(cmail,$(MANDIR))
