#
# $Id: Makefile.in,v 2.0 1998/10/14 22:57:15 hender Exp $
#
#
# Makefile for PBS commands
#
#
# the first non-comment line must be .POSIX to assure POSIX make behavior
#
@MAKE_POSIX_TARGET@

srcdir = @srcdir@
top_srcdir = @top_srcdir@
MK_VPATH = @srcdir@:@srcdir@/../scheduler.tcl
INSTALL = @INSTALL@

@mk_head@
@mk_dirs@

XPBS_LIB = $(libdir)/xpbs

BUILD_INCS = -I@top_builddir@/src/include
INCS = $(BUILD_INCS) -I$(PBS_SRCINC)
CFLAGS = @CFLAGS@ $(INCS) @DEFS@

OBJS = xpbs_datadump.o xpbs_scriptload.o
TARGETS = xpbs_datadump xpbs_scriptload

PBSLIBS = ../../lib/Libcmds/libcmds.a \
          ../../lib/Libnet/libnet.a  \
          ../../lib/Libpbs/libpbs.a

LIBRARIES = $(LDFLAGS) $(PBSLIBS) $(LIBS)


all: autodepend
	@MAKE_POSIX_PLUS@@$(MAKE) build

build: $(TARGETS)

install: build
	-test -d $(XPBS_LIB)/bin || $(INSTALL) -d $(XPBS_LIB)/bin
	for f in $(TARGETS); do \
	    $(INSTALL) -m 755 $$f $(XPBS_LIB)/bin; \
	done

DFLT_ACTION = $(CC) $(CFLAGS) $@.o -o $@ $(LIBRARIES)

xpbs_datadump: xpbs_datadump.o;        $(DFLT_ACTION)
xpbs_scriptload: xpbs_scriptload.o;    $(DFLT_ACTION)

@mk_cleanup@
@mk_tail@


