# 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

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

#	Common Objects

C_OBJS = ../ntserv/data.o  ../ntserv/openmem.o  ../ntserv/smessage.o \
        roboshar.o ../ntserv/slotmaint.o 

#	Sequencer Objects

S_OBJS = sequencer.o  commands_sequencer.o $(C_OBJS) ../ntserv/ltd_stats.o

SRCS = roboshar.c sequencer.c ../ntserv/commands.c ../ntserv/data.c \
	../ntserv/openmem.c ../ntserv/smessage.c ../ntserv/slotmaint.c

EXECS =	sequencer 

all: $(PMAKE) $(EXECS)

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

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

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

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

depend::
	touch .depend
	makedepend -f.depend  $(CFLAGS) $(SRCS)

etags::
	@etags $(SRCS)

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

reallyclean:: clean
	@rm -f $(EXECS) *~ #*# .depends

sinclude .depend
