# 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)

LIBS = $(EXTRALIBS)

TOOLDIR= $(LIBDIR)/tools

GETPATH = ../ntserv/getpath.o ../ntserv/data.o

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

#	Common Objects

C_OBJS = ../ntserv/data.o  \
	../ntserv/openmem.o  \
	../ntserv/smessage.o \
        $(STRDUPO) \
        roboshar.o \
        ../ntserv/slotmaint.o

#	Sequencer Objects

S_OBJS = sequencer.o  commands_sequencer.o $(C_OBJS)

SRCS = rmove.c getpath.c \
	../ntserv/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) ../ntserv/commands.c smessage.c basep.c wander2.c \
	inl.c inlcomm.c slotmaint.c

EXECS =	sequencer 

all: $(PMAKE) $(EXECS)

sequencer: $(PMAKE) $(S_OBJS)
	$(CC) $(CFLAGS)  -o sequencer $(S_OBJS) $(EXTRALIBS)

commands_sequencer.o: $(PMAKE) ../ntserv/commands.c
	$(CC) $(CFLAGS) $(DEP) -DSEQUENCER -c ../ntserv/commands.c -o commands_sequencer.o

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

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


install: $(EXECS) 
	$(INSTALL) $(INSTALLOPTS) sequencer $(LIBDIR)/sequencer

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.
