include .config
CC=gcc
#DEBUG=-g -Wall -DDEBUG
DEBUG=
COPTIONS=-O2 -fstrength-reduce -fpcc-struct-return
CFLAGS=${COPTIONS} ${DEBUG} ${CONFIGS} -I../include

# LDLIBS should include the name of your X library path if not /usr/lib;
# Also, it is possible that -lXmu is required
# Linux
LDLIBS=-L/usr/X386/lib -lXpm -lXaw -lXmu -lXext -lXt -lX11
# Sun
#LDLIBS=-lXpm -lXaw3d -lXmu -lXt -lX11
LDOPTIONS=

# There should be no need to configure anything below here

OBJS =\
  piece.o \
  main.o \
  xif.o \
  init.o \
  engine.o \
  net.o \
  DrawingA.o

all: 3Dc

3Dc: ${OBJS}
	${CC} -o $@ ${OBJS} ${LDOPTIONS} ${LDLIBS}

config:
	@${RM} .config
	@echo -n CONFIGS= > .config
	@if [ -f /usr/include/unistd.h ] ; then \
	  echo -n -DHAVE_UNISTD_H\  >> .config ; \
	fi
	@if [ -f /usr/include/ulimit.h ] ; then \
	  echo -n -DHAVE_ULIMIT_H\  >> .config ; \
	fi
	@echo >> .config

clean:
	${RM} *.o *~ .config
