#
# $Id: Makefile.in,v 2.0 1998/10/14 23:19:15 hender Exp $
#
#
#       Makefile for the PBS schduler
#
# This program is confidential and proprietary to MRJ Technology Solutions
# and may not be reproduced, published or disclosed to others without
# written authorization from MRJ.
# 
# Copyright (c) 1998 MRJ Technology Solutions, Inc. All Rights Reserved.
# 
# This program is derived from prior work some of which was originally
# written as a joint project between the Numerical Aerospace Simulation
# (NAS) Systems Division of NASA Ames Research Center and the National
# Energy Research Supercomputer Center (NERSC) of Lawrence Livermore
# National Laboratory.
#
# 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.cc
INSTALL = @INSTALL@

@mk_head@
@mk_dirs@
@mk_tcl@

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

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

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

OBJS = pbs_sched.o pbs_tclWrap.o site_tclWrap.o get_4byte.o

TARGET = pbs_sched


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

build: $(TARGET)


install: build
	@$(INSTALL) -d -m 755 $(sbindir) && \
	$(INSTALL) -m 700 $(TARGET) $(sbindir)

$(TARGET): $(OBJS)
	$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBRARIES)

@mk_cleanup@
@mk_tail@


