###############################################################################
# Variable definitions for targets to build
###############################################################################
#___INFO__MARK_BEGIN__
##########################################################################
#
#  The Contents of this file are made available subject to the terms of
#  the Sun Industry Standards Source License Version 1.2
#
#  Sun Microsystems Inc., March, 2001
#
#
#  Sun Industry Standards Source License Version 1.2
#  =================================================
#  The contents of this file are subject to the Sun Industry Standards
#  Source License Version 1.2 (the "License"); You may not use this file
#  except in compliance with the License. You may obtain a copy of the
#  License at http://gridengine.sunsource.net/Gridengine_SISSL_license.html
#
#  Software provided under this License is provided on an "AS IS" basis,
#  WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
#  WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
#  MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
#  See the License for the specific provisions governing your rights and
#  obligations concerning the Software.
#
#  The Initial Developer of the Original Code is: Sun Microsystems, Inc.
#
#  Copyright: 2001 by Sun Microsystems, Inc.
#
#  All Rights Reserved.
#
##########################################################################
#___INFO__MARK_END__
CLIENTS_COMMON_DIR = $(SDIR)/clients/common

CLIENTS_COMMON_SRC = qstat_printing.c \
                     read_defaults.c \
                     show_job.c \
                     write_job_defaults.c \
                     sge_hgroup_qconf.c \
                     sge_cqueue_qconf.c \
                     sge_resource_quota_qconf.c \
                     sge_cqueue_qstat.c \
                     sge_centry_qconf.c \
                     sge_qhost.c \
                     sge_qstat.c \
                     sge_qquota.c \
                     sge_qrsub.c \
                     sge_client_ijs.c


CLIENTS_COMMON_OBJS = $(CLIENTS_COMMON_SRC:.c=.o)

###############################################################################
# global rules: all, clean, depend, messages
###############################################################################
clients_common: $(CLIENTS_COMMON_OBJS)

clients_common_clean:
	$(RM) $(CLIENTS_COMMON_OBJS)

clients_common_depend:
	$(DEPEND) -f$(CLIENTS_COMMON_DIR)/common_dependencies $(CLIENTS_COMMON_DIR)/*.c

clients_common_messages:
	@echo Creating $@
	@for i in `ls $(CLIENTS_COMMON_DIR)/*.c`; do \
		$(CC) $(CFLAGS) -DEXTRACT_MESSAGES -E $$i | $(XGETTEXT) - ;\
	done


###############################################################################
# include dependencies for object files generated by sge_depend
###############################################################################
include $(CLIENTS_COMMON_DIR)/common_dependencies

###############################################################################
# rules to build object codes
###############################################################################
qstat_printing.o:     $(CLIENTS_COMMON_DIR)/qstat_printing.c
	   $(CC) $(CFLAGS) $(SHARED_CFLAGS) -c $(CLIENTS_COMMON_DIR)/qstat_printing.c

read_defaults.o : $(CLIENTS_COMMON_DIR)/read_defaults.c
		$(CC) $(CFLAGS) $(SHARED_CFLAGS) -c $(CLIENTS_COMMON_DIR)/read_defaults.c

show_job.o : $(CLIENTS_COMMON_DIR)/show_job.c
		$(CC) $(CFLAGS) $(SHARED_CFLAGS) -c $(CLIENTS_COMMON_DIR)/show_job.c

write_job_defaults.o:	$(CLIENTS_COMMON_DIR)/write_job_defaults.c
		$(CC) $(CFLAGS) $(SHARED_CFLAGS)  -c $(CLIENTS_COMMON_DIR)/write_job_defaults.c

sge_hgroup_qconf.o: $(CLIENTS_COMMON_DIR)/sge_hgroup_qconf.c
		$(CC) $(CFLAGS) $(SHARED_CFLAGS) -c $(CLIENTS_COMMON_DIR)/sge_hgroup_qconf.c

sge_centry_qconf.o: $(CLIENTS_COMMON_DIR)/sge_centry_qconf.c
		$(CC) $(CFLAGS) $(SHARED_CFLAGS) -c $(CLIENTS_COMMON_DIR)/sge_centry_qconf.c

sge_cqueue_qconf.o: $(CLIENTS_COMMON_DIR)/sge_cqueue_qconf.c
		$(CC) $(CFLAGS) $(SHARED_CFLAGS) -c $(CLIENTS_COMMON_DIR)/sge_cqueue_qconf.c

sge_resource_quota_qconf.o: $(CLIENTS_COMMON_DIR)/sge_resource_quota_qconf.c
		$(CC) $(CFLAGS) -c $(CLIENTS_COMMON_DIR)/sge_resource_quota_qconf.c

sge_cqueue_qstat.o: $(CLIENTS_COMMON_DIR)/sge_cqueue_qstat.c
		$(CC) $(CFLAGS) $(SHARED_CFLAGS) -c $(CLIENTS_COMMON_DIR)/sge_cqueue_qstat.c

sge_qhost.o: $(CLIENTS_COMMON_DIR)/sge_qhost.c
		$(CC) $(CFLAGS) $(SHARED_CFLAGS) -c $(CLIENTS_COMMON_DIR)/sge_qhost.c

sge_qstat.o: $(CLIENTS_COMMON_DIR)/sge_qstat.c
		$(CC) $(CFLAGS) $(SHARED_CFLAGS) -c $(CLIENTS_COMMON_DIR)/sge_qstat.c

sge_qquota.o: $(CLIENTS_COMMON_DIR)/sge_qquota.c
		$(CC) $(CFLAGS) $(SHARED_CFLAGS) -c $(CLIENTS_COMMON_DIR)/sge_qquota.c

sge_qrsub.o: $(CLIENTS_COMMON_DIR)/sge_qrsub.c
		$(CC) $(CFLAGS) $(SHARED_CFLAGS) -c $(CLIENTS_COMMON_DIR)/sge_qrsub.c

sge_client_ijs.o: $(CLIENTS_COMMON_DIR)/sge_client_ijs.c
		$(CC) $(CFLAGS) $(SHARED_CFLAGS) -c $(CLIENTS_COMMON_DIR)/sge_client_ijs.c

