#ifndef XCOMM
#define XCOMM /**/#
#endif
XCOMM X-BASED DINOSAUR
XCOMM
XCOMM	Imakefile
XCOMM
XCOMM ##
XCOMM
XCOMM Copyright (c) 1994 - 2005	David Albert Bagley, bagleyd@tux.org
XCOMM
XCOMM			All Rights Reserved
XCOMM
XCOMM Permission to use, copy, modify, and distribute this software and
XCOMM its documentation for any purpose and without fee is hereby granted,
XCOMM provided that the above copyright notice appear in all copies and
XCOMM that both that copyright notice and this permission notice appear in
XCOMM supporting documentation, and that the name of the author not be
XCOMM used in advertising or publicity pertaining to distribution of the
XCOMM software without specific, written prior permission.
XCOMM
XCOMM This program is distributed in the hope that it will be "playable",
XCOMM but WITHOUT ANY WARRANTY; without even the implied warranty of
XCOMM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
XCOMM

wIDGET = dino
WIDGET2 = $(WIDGET)2d
WIDGET3 = $(WIDGET)3d
WIDGET = Dino
NUMVER = 7.1.4
GROUP = xpuzzles
P=x
R=$(P)
V=$(P)
PROG = $(R)$(wIDGET)
XCOMM VER = $(V)$(WIDGET)-$(NUMVER)
VER = $(V)$(wIDGET)

N=
C=.c
XCOMM C++
XCOMM C=.cc
O=.o
XCOMM VMS
XCOMM O=.obj
S=$(N) $(N)
XCOMM VMS
XCOMM S=,
E=
XCOMM VMS
XCOMM E=.exe

XCOMM please define
XCOMM C as the C source code extension
XCOMM O as the object extension
XCOMM S as the separator for object code
XCOMM E as the executable extension

XCOMM CC = cc
XCOMM CC = acc
XCOMM CC = gcc -Wall
XCOMM CC = g++ -Wall

XCOMM   *** BEGIN XPM CONFIG SECTION ***

XCOMM If your system has libXpm (Xpm), remove the 'XCOMM ' from the next line.
XCOMM #define XpmLibrary

#ifdef XpmLibrary
XPMDEF = -DHAVE_XPM
XCOMM Use the following if your xpm.h file is not in an X11 directory
XCOMM  XPMDEF = -DHAVE_XPM

XCOMM If you get an error "Cannot find xpm.h" while compiling, set
XCOMM XPMINC to the directory X11/xpm.h is in.  Below is a guess
XCOMM of the location of the Motif library directory.
XPMINC = -I/usr/local/include
XCOMM SGI's ViewKit put in a link so the include is under X11 as well
XCOMM  XPMINC = -I/usr/include/Vk

XCOMM If you get an error "Cannot find libXpm" while linking, set XPMLIBPATH
XCOMM to the directory libXpm.* is in.  Below is a guess of the
XCOMM location of the Motif library directory.
XPMLIB = -L/usr/local/lib -lXpm

#endif

XCOMM   *** END XPM CONFIG SECTION ***

XCOMM   *** BEGIN XM CONFIG SECTION ***

XCOMM If your system has libXm (Motif), remove the 'XCOMM ' from the next line.
XCOMM #define XmLibrary

#ifdef XmLibrary
XCOMM If its not with your X11 stuff you should set the following
XCOMM       MOTIFHOME = /usr/local
XCOMM       MOTIFHOME = /usr/dt

XCOMM If you get an error "Cannot find Xm/PanedW.h" while compiling, set
XCOMM XMINC to the directory Xm/PanedW.h is in.  Below is a guess
XCOMM of the location of the Motif include directory.
XCOMM       XMINC = -I$(MOTIFHOME)/include
XMDEF = -DHAVE_MOTIF

XCOMM If you get an error "Connot find libXm" while linking, set XMLIBPATH
XCOMM to the directory libXpm.* is in.  Below is a guess of the
XCOMM location of the Motif library directory.
XCOMM           XMLIB = -L$(MOTIFHOME)/lib -lXm
XMLIB = -lXm

XCOMM Debugging with editres
XCOMM  EDITRESDEF = -DUSE_XMU
XCOMM  EDITRESLIB = -lXmu
#endif

XCOMM   *** END XM CONFIG SECTION ***

XCOMM   *** BEGIN RNG CONFIG SECTION ***

XCOMM Uncomment to use your system's Random Number Generator
XCOMM They usually come in 3 types

XCOMM Uncomment to use high-precision (but expensive) RNG
XCOMM SRANDDEF = -DSRAND=srand48
XCOMM LRANDDEF = -DLRAND=lrand48

XCOMM SRANDDEF = -DSRAND=srandom
XCOMM LRANDDEF = -DLRAND=random

XCOMM Least desirable RNG
XCOMM SRANDDEF = -DSRAND=srand
XCOMM LRANDDEF = -DLRAND=rand

XCOMM Normally use the above with (default)
XCOMM MAXRANDDEF = -DMAXRAND=2147483648.0
XCOMM Use the following if using srand/rand and NOT AIXV3
XCOMM MAXRANDDEF = -DMAXRAND=32767.0
RANDDEF = $(SRANDDEF) $(LRANDDEF) $(MAXRANDDEF)

XCOMM   *** END RNG CONFIG SECTION ***

#ifdef SunArchitecture
#if SystemV4
EXTRA_LDOPTIONS = -R/usr/lib:/usr/openwin/lib

XCOMM Solaris may not have its own correct OSMinorVersion
XCOMM compare with uname -a, correct if wrong at /usr/openwin/lib/config/sun.cf
XCOMM If just using gcc, you may want to remove -xF references in sun.cf and
XCOMM Imake.tmpl if you get a
XCOMM cc: language F not recognized

#if OSMajorVersion > 5 || (OSMajorVersion == 5 && OSMinorVersion > 5)
       SLEEPDEF = -DHAVE_USLEEP=1
#else
XCOMM If SunOS 5.2 or less, do not have nanosleep
#if OSMajorVersion > 5 || (OSMajorVersion == 5 && OSMinorVersion > 2)
       SLEEPDEF = -DHAVE_NANOSLEEP=1
EXTRA_LIBRARIES += -lposix4 -lthread
#else
EXTRA_LIBRARIES = -lnsl -lposix4
#endif
#endif
#else
       SLEEPDEF = -DHAVE_USLEEP=1
#endif
#endif
#if defined(FreeBSDArchitecture) || defined(NetBSDArchitecture) || defined(i386BsdArchitecture)
       SLEEPDEF = -DHAVE_USLEEP=1
#endif
#if defined(LinuxArchitecture) || defined(cygwinArchitecture)
       SLEEPDEF = -DHAVE_USLEEP=1
#endif
XCOMM If AIX 3.1 or less
#if OSMajorVersion < 3 || (OSMajorVersion == 3 && OSMinorVersion < 2)
      SYSTEMDEF = -DLESS_THAN_AIX3_2
#endif

XCOMM Set your C compiler if necessary
XCOMM CC = gcc -g -DDEBUG -Wall
XCOMM CC = gcc -O

READPATH = /usr/local/share/games/$(GROUP)
XCOMM READPATH = /usr/share/games/$(GROUP)
SCOREPATH = /var/games/$(GROUP)
SCOREFILE = $(wIDGET).scores
LOGPATH = /usr/tmp
LOGFILE = $(wIDGET).log

DEFINES = -DHAVE_FCNTL_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_UNISTD_H=1 \
$(XMDEF) $(XPMDEF) $(EDITRESDEF) $(SOUNDDEF) $(SLEEPDEF) $(RANDDEF) \
-DSOUNDPATH=\"$(READPATH)\" -DSOUNDEXT=\".au\" \
-DBUMPSOUND=\"bump\" -DMOVESOUND=\"move\" \
-DSCOREPATH=\"$(SCOREPATH)\" -DSCOREFILE=\"$(SCOREFILE)\" \
-DLOGPATH=\"$(LOGPATH)\" -DLOGFILE=\"$(LOGFILE)\" \
$(XMINC) $(XPMINC)
XWIDGETLIBS = $(XMLIB) $(XTOOLLIB) $(XLIB) $(XPMLIB) $(EDITRESLIB)
# -lICE -lSM

HDRS = $(WIDGET)P.h $(WIDGET).h \
$(WIDGET2)P.h $(WIDGET2).h \
$(WIDGET3)P.h $(WIDGET3).h \
xwin.h file.h timer.h rngs.h \
icons/$(wIDGET).xbm icons/$(wIDGET).xpm

COREOBJS = $(WIDGET)$(O)$(S)$(WIDGET)U$(O)$(S)\
$(WIDGET2)$(O)$(S)$(WIDGET3)$(O)$(S)
XWIDGETOBJS = xwin$(O)$(S)file$(O)$(S)timer$(O)$(S)rngs$(O)$(S)\
$(COREOBJS)$(S)$(P)$(wIDGET)$(O)

CORESRCS = $(WIDGET)$(C) $(WIDGET)U$(C) \
$(WIDGET2)$(C) $(WIDGET3)$(C)
XWIDGETSRCS =  xwin$(C) file$(C) timer$(C) rngs$(C) \
$(CORESRCS) $(P)$(wIDGET)$(C)

XCOMM ComplexProgramTarget($(PROG))
AllTarget($(PROG)$(E))
NormalProgramTarget($(PROG)$(E), $(XWIDGETOBJS), $(DEPXLIB), $(XWIDGETLIBS), NullParameter)

$(WIDGET)$(O) : $(WIDGET)$(C) $(WIDGET)P.h $(WIDGET).h xwin.h file.h timer.h rngs.h icons/$(wIDGET).xbm icons/$(wIDGET).xpm
$(WIDGET)U$(O) : $(WIDGET)U$(C) $(WIDGET)P.h $(WIDGET).h
$(WIDGET2)$(O) : $(WIDGET2)$(C) $(WIDGET)P.h $(WIDGET).h $(WIDGET2)P.h $(WIDGET2).h xwin.h
$(WIDGET3)$(O) : $(WIDGET3)$(C) $(WIDGET)P.h $(WIDGET).h $(WIDGET3)P.h $(WIDGET3).h xwin.h
xwin$(O) : xwin$(C) xwin.h
file$(O) : file$(C) file.h
timer$(O) : timer$(C) timer.h
rngs$(O) : rngs$(C) rngs.h
$(P)$(wIDGET)$(O) : $(P)$(wIDGET)$(C) $(WIDGET).h xwin.h file.h

run :
	./$(PROG)

distclean::	clean
	$(RM) Makefile config.status config.cache config.log
	$(RM) $(PROG)-1.html $(PROG)._man
	rm -rf autom4te.cache

clean.all::	distclean
