############################ -*- Mode: Makefile -*- ###########################
## Makefile
## 
## Description     : NDMP daemon Makefile.
## 
## Copyright (c) 1996,1997 PDC, Network Appliance. All Rights Reserved.
##
## $Id: Makefile,v 1.5 1997/02/03 06:13:03 tim Exp $
## 
###############################################################################

.KEEP_STATE:

INCLUDES = -I../common

CC = gcc
CFLAGS = -g $(INCLUDES) -Wall -W -Wstrict-prototypes
#-Wmissing-prototypes -Wmissing-declarations 

SRCS = main.c handler_tbl.c connect.c scsi.c tape.c config.c data.c mover.c \
       file_history.c callbacks.c \
       simple.c simple_dump.c simple_restore.c util.c 
OBJS = $(SRCS:.c=.o)

SYSLIBS = -lsocket -lnsl -lgen
NDMPLIB = ../common/libndmp.a

all: ndmpd

ndmpd: $(NDMPLIB) $(OBJS)
	$(LINK.c) -o $@ $(OBJS) $(NDMPLIB) $(SYSLIBS)

$(NDMPLIB): FORCE
	cd $(@D); $(MAKE) $($F)

FORCE:

tags:
	etags -t *.[ch] ../common/*.[ch]

clean:
	rm -f ndmpd *.o core *~ TAGS .make.state
