
/* Do not edit.  See INSTALL for details. */

#include "Netrek.tmpl"

          TARGET = netrek
 EXTRA_LIBRARIES = $(XLIB) $(MP_LIB) $(EXTRA_LIBS) -lm
  EXTRA_INCLUDES = -I./bitmaps $(MP_INCLUDE) $(EXTRA_INCS)

STD_HEADERS = Wlib.h bitmapstuff.h copyright.h copyright2.h data.h defs.h \
	      packets.h prog_version.h struct.h

#if ShortPackets
WTEXT = wtext.h
#endif

      HEADERS = $(STD_HEADERS) $(WTEXT)

#if DynamicBitmaps
DYN_SRCS = bitmaps.c RotateBitmap.c
DYN_OBJS = bitmaps.o RotateBitmap.o
#endif

#if BD_
BD_SRCS = bd.c
BD_OBJS = bd.o
#endif

#if SPTest
SPTEST_SRCS = sptest.c
SPTEST_OBJS = sptest.o
#endif

#if RSA_
RSA_SRCS = rsa_clientutil.c rsa-client.c
RSA_OBJS = rsa_clientutil.o rsa-client.o
#endif

#if !HaveRandom
RAND_SRCS = random.c
RAND_OBJS = random.o
#endif

#if !HaveRInt
RINT_SRCS = rint.c
RINT_OBJS = rint.o
#endif

#if Feature
FEATURE_SRCS = feature.c macrowin.c
FEATURE_OBJS = feature.o macrowin.o
#endif

#if ShortPackets
SP_SRCS = spwarning.c
SP_OBJS = spwarning.o
#endif

SRCS = colors.c data.c death.c defaults.c defwin.c detonate.c dmessage.c \
       enter.c entrywin.c findslot.c getdefaults.c getname.c \
       getship.c helpwin.c inform.c input.c interface.c lagmeter.c \
       main.c netstat.c newwin.c option.c ping.c pingstats.c planetlist.c \
       planets.c playerlist.c ranklist.c redraw.c reserved.c rotate.c sintab.c \
       smessage.c socket.c stats.c udpopt.c util.c war.c warning.c \
       x11window.c $(DYN_SRCS) $(BD_SRCS) $(SPTEST_SRCS) $(RSA_SRCS) \
       $(RAND_SRCS) $(RINT_SRCS) randomize.c $(FEATURE_SRCS) $(SP_SRCS)


OBJS = colors.o data.o death.o defaults.o defwin.o detonate.o dmessage.o \
       enter.o entrywin.o findslot.o getdefaults.o getname.o \
       getship.o helpwin.o inform.o input.o interface.o lagmeter.o \
       main.o netstat.o newwin.o option.o ping.o pingstats.o planetlist.o \
       planets.o playerlist.o ranklist.o redraw.o reserved.o rotate.o sintab.o \
       smessage.o socket.o stats.o udpopt.o util.o war.o warning.o \
       x11window.o $(RAND_OBJS) $(RINT_OBJS) $(DYN_OBJS) $(BD_OBJS) \
       $(SPTEST_OBJS) $(RSA_OBJS) $(FEATURE_OBJS) $(SP_OBJS)

AllTarget(randomize)
NormalProgramTarget(randomize,randomize.o $(RAND_OBJS),,,)

#if RSA_
AllTarget(mkkey)
NormalProgramTarget(mkkey,mkkey.o $(RAND_OBJS),,,)

rsa-client.c :: mkkey
	@echo "**************************************"
	@echo If $(RSA_KEYFILE) does not exist you need to use 'mkkey' to
	@echo create it:
	@echo ./mkkey `basename $(RSA_KEYFILE) .secret` client-type "architecture/OS" creator "comments"
	@echo "**************************************"
	./mkkey -k $(RSA_KEYFILE)
depend :: rsa-client.c

#endif

AllTarget($(TARGET))
NormalProgramTargetRandomize($(TARGET),$(OBJS),,,,randomize)
InstallProgram($(TARGET),$(NETREK_BIN))
DependTarget()

#ifdef SaberProgramTarget
SaberProgramTarget($(TARGET), $(SRCS), $(OBJS),,)
#endif
