# Change CONFIG to the .mk file that matches your system

CONFIG = system.mk


# Do Not Change anything below this line. It should be setup in config

include ../$(CONFIG)

# this is for revised ntserv/struct.h

#OPT = -g

CFLAGS = $(OPT) $(EXTRAINCS) $(DIRS) $(FLAGS) -DROBOT

LIBS = $(EXTRALIBS)

TOOLDIR= $(LIBDIR)/tools

GETPATH = getpath.o data.o

LINTFLAGS = -habxc $(EXTRAINCS) $(FLAGS)

#	Common Objects

C_OBJS = data.o  detonate.o  enter.o  getship.o  interface.o \
	orbit.o  phaser.o sintab.o openmem.o  sysdefaults.o \
	torp.o  util.o $(RANDOMO) getpath.o smessage.o roboshar.o \
        slotmaint.o

#	Puck Objects

P_OBJS = puck.o  puckmove.o commands_puck.o $(C_OBJS)

#	Mars (dogfighter) Objects

M_OBJS = mars.o marsmove.o commands_mars.o $(C_OBJS)

#	Robot Objects

R_OBJS = robotII.o rmove.o commands.o $(C_OBJS)

#       basepractice object files

B_OBJS = basep.o commands_basep.o $(C_OBJS)  

#	INL Objects

I_OBJS = inl.o inlcomm.o commands_inl.o $(C_OBJS)


SRCS = puck.c puckmove.c mars.c marsmove.c robotII.c rmove.c getpath.c \
	data.c  detonate.c  enter.c  getship.c  interface.c \
	orbit.c  phaser.c  sintab.c openmem.c sysdefaults.c torp.c \
	util.c $(RANDOMC) commands.c smessage.c basep.c wander2.c \
	inl.c inlcomm.c slotmaint.c

EXECS =	puck mars robotII basep inl

all: $(PMAKE) $(EXECS)

puck: $(PMAKE) $(P_OBJS)
	$(CC) $(CFLAGS)  -o puck $(P_OBJS) $(EXTRALIBS)

mars: $(PMAKE) $(M_OBJS)
	$(CC) $(CFLAGS)  -o mars $(M_OBJS) $(EXTRALIBS)

robotII: $(PMAKE) $(R_OBJS)
	$(CC) $(CFLAGS)  -o robotII  $(R_OBJS) $(EXTRALIBS)

basep: $(PMAKE) $(B_OBJS)
	$(CC) $(CFLAGS)  -o basep $(B_OBJS) $(EXTRALIBS)

inl: $(PMAKE) $(I_OBJS)
	$(CC) $(CFLAGS)  -o inl $(I_OBJS) $(EXTRALIBS)

commands_mars.o: $(PMAKE) commands.c
	$(CC) $(CFLAGS) $(DEP) -DDOG -c commands.c -o commands_mars.o

commands_puck.o: $(PMAKE) commands.c
	$(CC) $(CFLAGS) $(DEP) -DPUCK -c commands.c -o commands_puck.o

commands_inl.o: $(PMAKE) commands.c
	$(CC) $(CFLAGS) $(DEP) -DINL -c commands.c -o commands_inl.o

commands.o: $(PMAKE) commands.c
	$(CC) $(CFLAGS) $(DEP) -c commands.c -o commands.o

commands_basep.o: $(PMAKE) commands.c
	$(CC) $(CFLAGS) $(DEP) -DBASEP -c commands.c -o commands_basep.o

clean:; rm -f *.o *.ln

reallyclean:; rm -f $(EXECS) *~ #*#


install: $(EXECS) 
	$(INSTALL) $(INSTALLOPTS) puck $(LIBDIR)/puck
	$(INSTALL) $(INSTALLOPTS) mars $(LIBDIR)/mars
	$(INSTALL) $(INSTALLOPTS) robotII $(LIBDIR)/robotII
	$(INSTALL) $(INSTALLOPTS) basep $(LIBDIR)/basep
	$(INSTALL) $(INSTALLOPTS) inl $(LIBDIR)/inl

updated: update.o data.o getpath.o
	$(CC) $(CFLAGS) -o updated  update.o data.o getpath.o $(EXTRALIBS)

lint: $(SRCS)
	lint $(LINTFLAGS) -u $?
	touch lint

rmdependencies:
	makedepend

depend:
	makedepend $(CFLAGS) -f Makefile $(SRCS)
#####
# DO NOT DELETE THIS LINE -- make depend depends on it.

puck.o: copyright.h /usr/include/stdio.h /usr/include/sys/types.h
puck.o: /usr/include/sys/stdtypes.h /usr/include/sys/sysmacros.h
puck.o: /usr/include/sys/time.h /usr/include/sys/time.h /usr/include/signal.h
puck.o: /usr/include/sys/signal.h /usr/include/vm/faultcode.h
puck.o: /usr/include/setjmp.h defs.h ../ntserv/copyright.h ../config.h
puck.o: /usr/include/string.h struct.h data.h puckdefs.h
puckmove.o: copyright.h /usr/include/stdio.h /usr/include/signal.h
puckmove.o: /usr/include/sys/signal.h /usr/include/vm/faultcode.h
puckmove.o: /usr/include/math.h /usr/include/floatingpoint.h
puckmove.o: /usr/include/sys/ieeefp.h defs.h ../ntserv/copyright.h
puckmove.o: ../config.h /usr/include/string.h /usr/include/sys/stdtypes.h
puckmove.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h struct.h
puckmove.o: data.h puckdefs.h
mars.o: copyright.h /usr/include/stdio.h /usr/include/sys/types.h
mars.o: /usr/include/sys/stdtypes.h /usr/include/sys/sysmacros.h
mars.o: /usr/include/sys/time.h /usr/include/sys/time.h /usr/include/signal.h
mars.o: /usr/include/sys/signal.h /usr/include/vm/faultcode.h
mars.o: /usr/include/setjmp.h defs.h ../ntserv/copyright.h ../config.h
mars.o: /usr/include/string.h struct.h data.h marsdefs.h
marsmove.o: copyright.h /usr/include/stdio.h /usr/include/signal.h
marsmove.o: /usr/include/sys/signal.h /usr/include/vm/faultcode.h
marsmove.o: /usr/include/math.h /usr/include/floatingpoint.h
marsmove.o: /usr/include/sys/ieeefp.h /usr/include/ctype.h
marsmove.o: /usr/include/fcntl.h /usr/include/sys/fcntlcom.h
marsmove.o: /usr/include/sys/stdtypes.h /usr/include/sys/stat.h
marsmove.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h
marsmove.o: /usr/include/errno.h /usr/include/sys/errno.h defs.h
marsmove.o: ../ntserv/copyright.h ../config.h /usr/include/string.h struct.h
marsmove.o: data.h marsdefs.h
robotII.o: copyright.h /usr/include/stdio.h /usr/include/sys/types.h
robotII.o: /usr/include/sys/stdtypes.h /usr/include/sys/sysmacros.h
robotII.o: /usr/include/sys/time.h /usr/include/sys/time.h
robotII.o: /usr/include/signal.h /usr/include/sys/signal.h
robotII.o: /usr/include/vm/faultcode.h /usr/include/setjmp.h defs.h
robotII.o: ../ntserv/copyright.h ../config.h /usr/include/string.h struct.h
robotII.o: data.h
rmove.o: copyright.h /usr/include/stdio.h /usr/include/signal.h
rmove.o: /usr/include/sys/signal.h /usr/include/vm/faultcode.h
rmove.o: /usr/include/math.h /usr/include/floatingpoint.h
rmove.o: /usr/include/sys/ieeefp.h defs.h ../ntserv/copyright.h ../config.h
rmove.o: /usr/include/string.h /usr/include/sys/stdtypes.h
rmove.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h struct.h
rmove.o: data.h
getpath.o: /usr/include/stdio.h /usr/include/string.h
getpath.o: /usr/include/sys/stdtypes.h ../ntserv/defs.h ../ntserv/copyright.h
getpath.o: ../config.h /usr/include/sys/types.h /usr/include/sys/sysmacros.h
getpath.o: ../ntserv/data.h copyright.h
data.o: ../ntserv/copyright.h ../ntserv/defs.h ../config.h
data.o: /usr/include/string.h /usr/include/sys/stdtypes.h
data.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h
data.o: ../ntserv/struct.h copyright.h ../ntserv/data.h
detonate.o: copyright.h /usr/include/stdio.h /usr/include/sys/types.h
detonate.o: /usr/include/sys/stdtypes.h /usr/include/sys/sysmacros.h
detonate.o: /usr/include/sys/ipc.h defs.h ../ntserv/copyright.h ../config.h
detonate.o: /usr/include/string.h struct.h data.h
enter.o: copyright.h /usr/include/stdio.h /usr/include/sys/types.h
enter.o: /usr/include/sys/stdtypes.h /usr/include/sys/sysmacros.h
enter.o: /usr/include/sys/ipc.h /usr/include/errno.h /usr/include/sys/errno.h
enter.o: /usr/include/pwd.h /usr/include/ctype.h /usr/include/sys/time.h
enter.o: /usr/include/netinet/in.h defs.h ../ntserv/copyright.h ../config.h
enter.o: /usr/include/string.h struct.h data.h packets.h copyright2.h
getship.o: copyright.h /usr/include/stdio.h /usr/include/sys/types.h
getship.o: /usr/include/sys/stdtypes.h /usr/include/sys/sysmacros.h
getship.o: /usr/include/sys/ipc.h defs.h ../ntserv/copyright.h ../config.h
getship.o: /usr/include/string.h struct.h data.h
interface.o: copyright.h /usr/include/stdio.h /usr/include/math.h
interface.o: /usr/include/floatingpoint.h /usr/include/sys/ieeefp.h
interface.o: /usr/include/signal.h /usr/include/sys/signal.h
interface.o: /usr/include/vm/faultcode.h /usr/include/sys/types.h
interface.o: /usr/include/sys/stdtypes.h /usr/include/sys/sysmacros.h
interface.o: /usr/include/netinet/in.h defs.h ../ntserv/copyright.h
interface.o: ../config.h /usr/include/string.h struct.h data.h packets.h
interface.o: copyright2.h
orbit.o: copyright.h /usr/include/stdio.h /usr/include/math.h
orbit.o: /usr/include/floatingpoint.h /usr/include/sys/ieeefp.h
orbit.o: /usr/include/sys/types.h /usr/include/sys/stdtypes.h
orbit.o: /usr/include/sys/sysmacros.h /usr/include/sys/ipc.h defs.h
orbit.o: ../ntserv/copyright.h ../config.h /usr/include/string.h struct.h
orbit.o: data.h
phaser.o: copyright.h /usr/include/stdio.h /usr/include/math.h
phaser.o: /usr/include/floatingpoint.h /usr/include/sys/ieeefp.h
phaser.o: /usr/include/signal.h /usr/include/sys/signal.h
phaser.o: /usr/include/vm/faultcode.h defs.h ../ntserv/copyright.h
phaser.o: ../config.h /usr/include/string.h /usr/include/sys/stdtypes.h
phaser.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h struct.h
phaser.o: data.h packets.h copyright2.h
sintab.o: copyright.h
openmem.o: copyright.h /usr/include/stdio.h /usr/include/sys/types.h
openmem.o: /usr/include/sys/stdtypes.h /usr/include/sys/sysmacros.h
openmem.o: /usr/include/sys/ipc.h /usr/include/sys/shm.h
openmem.o: /usr/include/sys/param.h /usr/include/sys/signal.h
openmem.o: /usr/include/vm/faultcode.h /usr/include/errno.h
openmem.o: /usr/include/sys/errno.h /usr/include/pwd.h /usr/include/ctype.h
openmem.o: /usr/include/sys/time.h defs.h ../ntserv/copyright.h ../config.h
openmem.o: /usr/include/string.h /usr/include/unistd.h struct.h data.h
sysdefaults.o: /usr/include/stdio.h /usr/include/math.h
sysdefaults.o: /usr/include/floatingpoint.h /usr/include/sys/ieeefp.h
sysdefaults.o: /usr/include/sys/types.h /usr/include/sys/stdtypes.h
sysdefaults.o: /usr/include/sys/sysmacros.h /usr/include/sys/stat.h defs.h
sysdefaults.o: ../ntserv/copyright.h ../config.h /usr/include/string.h
sysdefaults.o: struct.h copyright.h data.h copyright2.h
torp.o: copyright.h /usr/include/stdio.h /usr/include/sys/types.h
torp.o: /usr/include/sys/stdtypes.h /usr/include/sys/sysmacros.h defs.h
torp.o: ../ntserv/copyright.h ../config.h /usr/include/string.h struct.h
torp.o: data.h
util.o: copyright.h ../config.h /usr/include/string.h
util.o: /usr/include/sys/stdtypes.h /usr/include/sys/types.h
util.o: /usr/include/sys/sysmacros.h /usr/include/stdio.h /usr/include/math.h
util.o: /usr/include/floatingpoint.h /usr/include/sys/ieeefp.h
util.o: /usr/include/signal.h /usr/include/sys/signal.h
util.o: /usr/include/vm/faultcode.h /usr/include/errno.h
util.o: /usr/include/sys/errno.h /usr/include/sys/time.h
util.o: /usr/include/sys/time.h defs.h ../ntserv/copyright.h
util.o: /usr/include/unistd.h struct.h data.h
commands.o: /usr/include/stdio.h /usr/include/ctype.h /usr/include/string.h
commands.o: /usr/include/sys/stdtypes.h /usr/include/sys/time.h
commands.o: /usr/include/signal.h /usr/include/sys/signal.h
commands.o: /usr/include/vm/faultcode.h defs.h ../ntserv/copyright.h
commands.o: ../config.h /usr/include/sys/types.h /usr/include/sys/sysmacros.h
commands.o: struct.h copyright.h data.h
smessage.o: copyright.h /usr/include/stdio.h /usr/include/math.h
smessage.o: /usr/include/floatingpoint.h /usr/include/sys/ieeefp.h
smessage.o: /usr/include/signal.h /usr/include/sys/signal.h
smessage.o: /usr/include/vm/faultcode.h /usr/include/ctype.h
smessage.o: /usr/include/varargs.h defs.h ../ntserv/copyright.h ../config.h
smessage.o: /usr/include/string.h /usr/include/sys/stdtypes.h
smessage.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h struct.h
smessage.o: data.h
basep.o: /usr/include/stdio.h /usr/include/string.h
basep.o: /usr/include/sys/stdtypes.h /usr/include/sys/types.h
basep.o: /usr/include/sys/sysmacros.h /usr/include/sys/time.h
basep.o: /usr/include/sys/time.h /usr/include/sys/resource.h
basep.o: /usr/include/signal.h /usr/include/sys/signal.h
basep.o: /usr/include/vm/faultcode.h /usr/include/setjmp.h
basep.o: /usr/include/sys/file.h /usr/include/sys/fcntlcom.h
basep.o: /usr/include/sys/stat.h /usr/include/sys/wait.h
basep.o: /usr/include/sys/ipc.h /usr/include/sys/shm.h
basep.o: /usr/include/sys/param.h /usr/include/errno.h
basep.o: /usr/include/sys/errno.h /usr/include/pwd.h /usr/include/ctype.h
basep.o: defs.h ../ntserv/copyright.h ../config.h struct.h copyright.h data.h
basep.o: basepdefs.h
inl.o: /usr/include/stdio.h /usr/include/sys/types.h
inl.o: /usr/include/sys/stdtypes.h /usr/include/sys/sysmacros.h
inl.o: /usr/include/sys/time.h /usr/include/sys/time.h
inl.o: /usr/include/sys/resource.h /usr/include/signal.h
inl.o: /usr/include/sys/signal.h /usr/include/vm/faultcode.h
inl.o: /usr/include/sys/file.h /usr/include/sys/fcntlcom.h
inl.o: /usr/include/sys/stat.h /usr/include/sys/wait.h /usr/include/errno.h
inl.o: /usr/include/sys/errno.h /usr/include/pwd.h /usr/include/ctype.h
inl.o: defs.h ../ntserv/copyright.h ../config.h /usr/include/string.h
inl.o: struct.h copyright.h data.h planets.h inldefs.h
inlcomm.o: /usr/include/stdio.h /usr/include/string.h
inlcomm.o: /usr/include/sys/stdtypes.h /usr/include/sys/types.h
inlcomm.o: /usr/include/sys/sysmacros.h /usr/include/sys/time.h
inlcomm.o: /usr/include/sys/time.h /usr/include/sys/resource.h
inlcomm.o: /usr/include/signal.h /usr/include/sys/signal.h
inlcomm.o: /usr/include/vm/faultcode.h /usr/include/setjmp.h
inlcomm.o: /usr/include/varargs.h /usr/include/sys/file.h
inlcomm.o: /usr/include/sys/fcntlcom.h /usr/include/sys/stat.h
inlcomm.o: /usr/include/sys/wait.h /usr/include/sys/ipc.h
inlcomm.o: /usr/include/sys/shm.h /usr/include/sys/param.h
inlcomm.o: /usr/include/errno.h /usr/include/sys/errno.h /usr/include/pwd.h
inlcomm.o: /usr/include/ctype.h defs.h ../ntserv/copyright.h ../config.h
inlcomm.o: struct.h copyright.h data.h inldefs.h
slotmaint.o: copyright2.h /usr/include/stdio.h /usr/include/sys/types.h
slotmaint.o: /usr/include/sys/stdtypes.h /usr/include/sys/sysmacros.h defs.h
slotmaint.o: ../ntserv/copyright.h ../config.h /usr/include/string.h struct.h
slotmaint.o: copyright.h data.h
