#	This is a generic system.mk file for
#
#       Autoconfig done by: Kurt Siegl <007@netrek.org>
#
#	Directories:
#	   LIBDIR     - where the lib files will go (.sysdef, .motd, etc)
#	   XTREKDIR   - root src dir
#	   XTREKOWNER - Owner of the game

XTREKDIR = .
prefix = /afs/club.cc.cmu.edu/usr/chaos/bin/netrek/
exec_prefix = /afs/club.cc.cmu.edu/usr/chaos/bin/netrek/
LIBDIR = /afs/club.cc.cmu.edu/usr/chaos/bin/netrek//lib
BINDIR = /afs/club.cc.cmu.edu/usr/chaos/bin/netrek//bin
SYSCONFDIR = /afs/club.cc.cmu.edu/usr/chaos/bin/netrek//etc
LOCALSTATEDIR = /afs/club.cc.cmu.edu/usr/chaos/bin/netrek//var
XTREKOWNER = chaos

PORT = -DPORT=2592

#       Some systems dont have install so you may need to use cp instead
#	A script call install in the root dir is also provided but isn't
#       very robust. To use this put the full path

SHELL = /bin/sh
INSTALL = /usr/bin/install -c
INSTALLPROG = ${INSTALL}
INSTALLDATA = ${INSTALL} -m 644

#	Compiler:
#	   NOTE: many systems' /bin/cc may choke on much of the code in 
#		 ntserv/ use with # caution!

CC  = gcc
CPP = gcc -E
CPPFLAGS = 
LN  = ln -s
LDFLAGS = 

#LINKFLAGS = -s -N
LINKFLAGS = 

# Compile in parallel
# PMAKE = &

# compile in parallel with gnu's parallel make!
# MAKE = gmake -j 8


#	SysV defines:
#	Use only -lm (EXTRALIBS) if you're not on SysV

EXTRALIBS = $(LINKFLAGS)  -lgdbm -lresolv -lnsl -lm 
LIBCRYPT = -lcrypt
LIBCURSES = -lncurses
LIBTERMCAP = -ltermcap

#	Some systems need X11R5 in the include path
#	Comment out if you don't need this

EXTRAINCS = # -I/usr/local/X11R5/include

# NETREK_INCLUDES = -I../ntserv -I./../ntserv
#
#	Some systems don't have strdup() or random()
#	Comment out if you have strdup() and random()

#STRDUPC = ./strdup.c ./random.c
#STRDUPO = strdup.o random.o
RANDOMO = 

# Location of X include files if not standard
# Use -I<path>
X11INCLUDE = 

# Name of X libraries 	(xsg only)
# Put -L<path> before library if non-standard location.
X11LIB = -L/usr/X11R6/lib  -lX11

# GNU MP stuff
GNUMP_INC = @GNUMPINC@
GNUMP_LIB = @GNUMPLIB@

# RSA stuff
RSA_FLAGS =  -DRSA
RSA_OBJS =  rsa_key.o
RSA_SRC =  rsa_key.c
RSA_INCS =  
RSA_LIB =  -L/afs/club.cc.cmu.edu/usr/chaos/www/netrek-server/Vanilla/res-rsa -lrsa -lmp -lgmp

EXTRAFLAGS = $(CPPFLAGS)

FLAGS = -g -O2 -Wall $(EXTRAFLAGS) $(RSA_FLAGS)