# Comment/uncomment the following line to disable/enable debugging
# DEBUG = y

ifeq ($(DEBUG),y)
  DEBFLAGS = -O -g -DSRV_DEBUG # "-O" is needed to expand inlines
else
  DEBFLAGS = -O2
endif

CC    = gcc -Wall $(DEBFLAGS)
API_DIR=../api

DBG_DIR=Obj

LIBS  =

PROGS =	srvTCPIP
OBJS  = buffers.o error.o main.o \
	sockopts.o sourcesink.o tellwait.o
	 

all:	${PROGS}

${OBJS}: SOCKET.h

srvTCPIP:	${OBJS}
		${CC} ${CCFLAGS} -o $@ ${OBJS} $(API_DIR)/cif_api.o ${LIBS}
		mv *.o $(DBG_DIR)
clean:
		rm -f ${PROGS} ${DBG_DIR}/*.o
