#ifndef XCOMM
#define XCOMM /**/#
#endif
XCOMM X-BASED PANEX
XCOMM
XCOMM	Imakefile
XCOMM
XCOMM ##
XCOMM
XCOMM Copyright (c) 1996	David Albert Bagley, bagleyd@hertz.njit.edu
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


XCOMM      *** BEGIN XM CONFIG SECTION ***

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

#ifdef XmLibrary
          XMDEF = -DHAS_XM
            PRE = xm

XCOMM Below is a guess of the location of the Motif include directory.
          XMINC = -I/usr/local/include

XCOMM If you get an error "Connot find libXm" while linking, set XMLIBPATH
XCOMM to the directory libXpm.* is in.  Below is a guess.
          XMLIB = -L/usr/local/lib -lXm
#else
            PRE = x
#endif

XCOMM      *** END XM 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

XCOMM If SunOS 5.2 or less, do not have nanosleep
#if OSMajorVersion > 5 || (OSMajorVersion == 5 && OSMinorVersion > 2)
       SLEEPDEF = -DHAS_NANOSLEEP
EXTRA_LIBRARIES += -lposix4 -lthread
#else
EXTRA_LIBRARIES = -lnsl -lposix4
#endif
#else
       SLEEPDEF = -DHAS_USLEEP
#endif
#endif
#if defined(FreeBSDArchitecture) || defined(NetBSDArchitecture) || defined(i386BsdArchitecture)
       SLEEPDEF = -DHAS_USLEEP
#endif
#ifdef LinuxArchitecture
       SLEEPDEF = -DHAS_USLEEP
#endif
XCOMM If AIX 3.1 or less, do not have struct passwd and other things
#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

wIDGET		= panex
WIDGET		= Panex

SCOREFILE = ./${wIDGET}.scores
DATAFILE  = ./${wIDGET}.data

DEFINES		= $(SLEEPDEF) ${XMDEF}\
	-DSCOREFILE=\"${SCOREFILE}\" -DDATAFILE=\"${DATAFILE}\"\
	${XMINC}
LOCAL_LIBRARIES	= ${XMLIB} ${XTOOLLIB} ${XLIB}
SRCS		= ${WIDGET}.c ${WIDGET}S.c ${WIDGET}U.c ${PRE}${wIDGET}.c
OBJS		= ${WIDGET}.o ${WIDGET}S.o ${WIDGET}U.o ${PRE}${wIDGET}.o
PROGRAMS	= ${PRE}${wIDGET}

ComplexProgramTarget(${PROGRAMS})

${WIDGET}.o: ${WIDGET}.c ${WIDGET}P.h ${WIDGET}.h
${WIDGET}S.o: ${WIDGET}S.c ${WIDGET}P.h ${WIDGET}.h
${WIDGET}U.o: ${WIDGET}U.c ${WIDGET}P.h ${WIDGET}.h
${PRE}${wIDGET}.o: ${PRE}${wIDGET}.c ${WIDGET}.h

clean.all::	clean
	${RM} Makefile
