#
# $Id: Makefile.in,v 2.0 1998/10/14 23:19:44 hender Exp $
#
#
#       Makefile for the pbs server: pbs_server
#
# 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@
top_builddir = @top_builddir@
MK_VPATH = @srcdir@
INSTALL = @INSTALL@

@mk_head@
@mk_dirs@

PBS_MKDIRS = $(SHELL) @top_builddir@/@PBS_MKDIRS@

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

TARGET = pbs_server

OBJS =	accounting.o \
	attr_recov.o \
	dis_read.o \
	geteusernam.o \
	issue_request.o \
	job_attr_def.o \
	job_func.o \
	job_recov.o \
	job_route.o \
	list_link.o \
	node_attr_def.o \
	node_func.o \
	node_manager.o \
	pbsd_init.o \
	pbsd_main.o \
	process_request.o \
	queue_attr_def.o \
	queue_func.o \
	queue_recov.o \
	reply_send.o \
	req_delete.o \
	req_getcred.o \
	req_holdjob.o \
	req_jobobit.o \
	req_locate.o \
	req_manager.o \
	req_message.o \
	req_modify.o \
	req_movejob.o \
	req_quejob.o \
	req_register.o \
	req_rerun.o \
	req_rescq.o \
	req_runjob.o \
	req_signal.o \
	req_track.o \
	req_select.o \
	req_shutdown.o \
	req_stat.o \
	resc_def_all.o \
	run_sched.o \
	stat_job.o \
	svr_attr_def.o \
	svr_chk_owner.o \
	svr_connect.o \
	svr_func.o \
	svr_jobfunc.o \
	svr_mail.o \
	svr_movejob.o \
	svr_recov.o \
	svr_resccost.o \
	svr_task.o


PBSLIBS	= ../lib/Libattr/libattr.a \
	  ../lib/Liblog/liblog.a \
	  ../lib/Libnet/libnet.a \
	  ../lib/Libpbs/libpbs.a \
	  ../lib/Libsite/libsite.a

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

build: $(TARGET)

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

pbs_server: $(OBJS) $(PBSLIBS) 
	$(CC) $(CFLAGS) -o $@ $(OBJS) $(PBSLIBS) $(LIBS)

clean::
	-$(RM) pbs_server *.o

@mk_cleanup@
@mk_tail@

