/*   CrossFire, A Multiplayer game for X-windows
 *
 *   $Id: Imakefile,v 1.9 1994/06/20 08:44:27 master Exp $
 *
 *   Copyright (C) 1992 Frank Tore Johansen
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program; if not, write to the Free Software
 *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 *   The author can be reached via e-mail to frankj@ifi.uio.no.
 */

#include "../config/crossfire.tmpl"

INCLUDES = -I. -I../include

#ifdef XPM_PIX
XPM_LIB = $(XPM_LIBDIR) -lXpm
#endif

/* LOCAL_LDFLAGS = -L../common /* SGI doesn't understand this... */
LOCAL_LIBRARIES = -L../common -lcross $(XPM_LIB) $(XLIB) $(DLSYM)

#ifdef OSFArchitecture
LOCAL_LIBRARIES = $(LOCAL_LIBRARIES) -lbsd
TARGET = -Dosf1
#endif

DEFINES = -DFONTDIR=\"${FONTDIR}\" -DFONTNAME=\"$(FONTNAME)\" $(TARGET) \
      -DLIBDIR=\"$(C_LIBDIR)\" $(COMPRESS_DEF)

SRCS = client.c
OBJS = client.o

PROGRAMS = crossclient

DEPLIBS = ../common/libcross.a

AllTarget(crossclient)
DependTarget()
NormalProgramTarget(crossclient, $(OBJS),$(DEPLIBS), $(LOCAL_LIBRARIES), )
InstallProgram(crossclient,$(C_BINDIR))

../common/libcross.a:
	(cd ../common; $(MAKE) $(MFLAGS) all)

proto:
	cextract +Ap -o proto.h -I$(INCROOT) $(INCLUDES) $(SRCS)
	chmod 664 proto.h

InsertArchive(Imakefile client.c proto.h,client)

ifi: crossclient install
	$(RM) crossclient
	$(MV) $(C_BINDIR)/crossclient $(C_BINDIR)/../$(HOSTTYPE)
	chmod 755 $(C_BINDIR)/../$(HOSTTYPE)/crossclient
