#-------------------------------------------------------------------------
# This file was automatically generated by Automake, and manually modified 
# to make it simpler and cleaner. There are three sections in the file:
# 1) Macros
# 2) Recursive Rules and Suffixes (implicit rules)
# 3) Explicit Rules
#-------------------------------------------------------------------------

#-------------------------------------------------------------------------
#   Section 1) Macros
#-------------------------------------------------------------------------
top_srcdir = @top_srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
libdir = @libdir@
includedir = @includedir@

CONDOR_DIR = @CONDOR_DIR@
CXX = @CXX@
DOCXX = @DOCXX@
MEASURE_DEFN = @MEASURE_DEFN@
MISC_DEFN = @MISC_DEFN@
MISC_LIB = @MISC_LIB@
MW_LIBDIR = @MW_LIBDIR@
MW_LIBDIR_DEBUG = @MW_LIBDIR_DEBUG@
ENABLE_MWINDEPENDENT = @ENABLE_MWINDEPENDENT@
PVM_ROOT = @PVM_ROOT@
RANLIB = @RANLIB@
INSTALL = @INSTALL@
SOCKET_LIB = @SOCKET_LIB@
PACKAGE = @PACKAGE@
VERSION = @VERSION@

mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
AR = ar

DEFS = @DEFS@ -I.
LIBS = @LIBS@
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
CXXFLAGS = @CXXFLAGS@ -Wall

# Subdirectories
SUBDIRS = 

### Libraries to be built, and dependent source files
# If ENDABLE_INDEPENDENT is yes (you can do that by configure --with-independent). 
ifeq ($(ENABLE_MWINDEPENDENT), yes)
LIBRARIES = libNWS.a libNWS_indp.a
else 
LIBRARIES = libNWS.a
endif

libNWS_a_SOURCES = MWNWSTask.C
libNWS_a_OBJECTS =  MWNWSTask.o
libNWS_indp_a_OBJECTS = MWNWSTaskInd.o

# To work with Insure, need to "setenv DEBUG_BUILD='insure'" and write/copy a good .psrc file
ifdef DEBUG_BUILD
DEBUG_CHECKER = $(DEBUG_BUILD)
MW_LIBDIR = $(MW_LIBDIR_DEBUG)
endif

INCLUDES = -I. -I.. -I../RMComm -I../RMComm/MW-File -I../RMComm/MW-CondorPVM -I../RMComm/MW-Socket $(MISC_DEFN) $(MEASURE_DEFN)
CXXCOMPILE = $(DEBUG_CHECKER) $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
INDP_CXXCOMPILE = $(CXXCOMPILE) -DINDEPENDENT

INCLUDEFILES = MWNWSTask.h

#-------------------------------------------------------------------------
#   Section 2) Explicit and Implicit Rules
#-------------------------------------------------------------------------

all: $(LIBRARIES)
	[ "__$(SUBDIRS)" = "__" ] || for subdir in `echo "$(SUBDIRS)"`; do (cd $$subdir && $(MAKE) $@) ; done

libNWS.a: $(libNWS_a_OBJECTS) $(libNWS_a_DEPENDENCIES)
	-rm -f libNWS.a
	$(AR) cru libNWS.a $(libNWS_a_OBJECTS) $(libNWS_a_LIBADD)
	$(RANLIB) libNWS.a
	cp libNWS.a $(MW_LIBDIR)

ifeq ($(ENABLE_MWINDEPENDENT), yes)
libNWS_indp.a: $(libNWS_indp_a_OBJECTS)
	-rm -f libNWS_indp.a
	$(AR) cru libNWS_indp.a $(libNWS_indp_a_OBJECTS)
	$(RANLIB) libNWS_indp.a
	cp libNWS_indp.a $(MW_LIBDIR)
MWNWSTaskInd.o:MWNWSTask.C
	$(INDP_CXXCOMPILE) -o MWNWSTaskInd.o -c MWNWSTask.C
endif

.SUFFIXES: .C .o

.C.o:
	$(CXXCOMPILE) -c $<

#-------------------------------------------------------------------------
#   Section 3) Recursive Rules: Common
#-------------------------------------------------------------------------
install: $(LIBRARIES)
	$(mkinstalldirs) $(libdir)
	@list='$(LIBRARIES)'; for p in $$list; do \
	  if test -f $$p; then \
	    echo "  ${INSTALL} -m 644 $$p $(libdir)/$$p"; \
	    $(INSTALL) -m 644 $$p $(libdir)/$$p; \
	    echo " $(RANLIB) $(libdir)/$$p"; \
	    $(RANLIB) $(libdir)/$$p; \
	  fi; \
	done
	$(mkinstalldirs) $(includedir)
	@list='$(INCLUDEFILES)'; for p in $$list; do \
	  if test -f $$p; then \
	    echo "  ${INSTALL} -m 644 $$p $(includedir)/$$p"; \
	    $(INSTALL) -m 644 $$p $(includedir)/$$p; \
	  fi; \
	done	
	[ "__$(SUBDIRS)" = "__" ] || for subdir in `echo "$(SUBDIRS)"`; do (cd $$subdir && $(MAKE) $@) ; done

check:

clean:
	-rm -f *.o *.a core
	[ "__$(SUBDIRS)" = "__" ] || for subdir in `echo "$(SUBDIRS)"`; do (cd $$subdir && $(MAKE) $@) ; done

distclean:
	-rm -f Makefile *.tar *.gz
	-rm -rf .deps
	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
	-rm -f *.o *.a core
	[ "__$(SUBDIRS)" = "__" ] || for subdir in `echo "$(SUBDIRS)"`; do (cd $$subdir && $(MAKE) $@) ; done

.PHONY: all check clean distclean install
