#
# $RCSfile: Makefile,v $ 
# $Revision: 1.3 $ $Date: 1996/05/05 04:30:10 $
#
MODULE = formatvolume
PARENT = src
PATHTOROOT=..

MAKEFILES=Makefile
SPECIALINCLUDE = -I$(PATHTOROOT)/serverlib/include
LOCAL_FLAGS = -DSERVER_MAKE  -DFORMATVOL_MAKE

LIBS = $(PATHTOROOT)/serverlib/libsm_server.a \
	   	$(PATHTOROOT)/config/config.o

FILESO = formatvol.o processCommandLine.o  volumeOpts.o
FILESC = formatvol.c  

LOCALCLEANFILES=diskrw* sm_server* \
	`find . -type exec -name "formatvol*"`

#
OTHERTAGS=
# This (OTHERTAGS) must not include serverlib, or else 
# we'll get into a loop making tags.  Instead, we just link
# tags.all to serverlib, so that by putting 
#	tags=tags tags.all tags.baseline
# in our .exrc, we'll get everything.
# Meanwhile, making tags in serverlib will make tags here, but that's 
# ok.

#
# makefile.options is included explicitly so that we can get
# $(SERVER), $(DISKRW), $(FORMATVOL) defined.
include $(PATHTOROOT)/makefile.options

EXECS=$(FORMATVOL)
LINKS=$(PATHTOROOT)/server/$(SERVER)\
	$(PATHTOROOT)/diskproc/$(DISKRW) \
	$(PATHTOROOT)/server/volumeOpts.C \
	$(PATHTOROOT)/server/processCommandLine.C

include $(PATHTOROOT)/makefile.common

$(EXECS): $(FILESO) $(LIBS)
	$(CPLUSPLUS) $(LDFLAGS) $(CFLAGS) $(FILESO) $(LIBS) -o $@

#
# The dependency here must be on links, not $(LINKS).
# links just makes the symbolic links; $(LINKS) makes their targets as well.
#
getbaseline:  links $(COPIES)
	-ln -s $(BASELINE)/$(PARENT)/$(MODULE)/tags .
	-ln -s $(BASELINE)/$(PARENT)/$(MODULE)/$(FORMAVOL) .
# 	don't mess with the library

baseline.mod: $(EXECS)
	;

include makefile.depend
