#  Copyright (c) 2000-2004 Silicon Graphics, Inc All Rights Reserved.
#
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as
#  published by the Free Software Foundation; either version 2 of
#  the License, or (at your option) any later version.
#
#  This program is distributed in the hope that it would be useful, but
#  WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License along
#  with this program; if not, write to the Free Software Foundation, Inc.,
#  59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
#
#  Contact information:  Silicon Graphics, Inc., 1500 Crittenden Lane,
#  Mountain View, CA  94043, or:
#
#  http://www.sgi.com
#

include $(BUILDDEFS)

CBUILD = $(CC) -o $@ $(CFLAGS) -lc -L../lib -ljob $(INCLUDES) $@.c 

CMDS = jkill jwait jstat jsethid jdetach jattach

.PHONY: default
default: $(CMDS)

build: jkill jwait jstat jsethid jdetach jattach

jkill:
	$(CBUILD)

jwait:
	$(CBUILD)

jstat:
	$(CBUILD)

jsethid:
	$(CBUILD)

jdetach:
	$(CBUILD)

jattach:
	$(CBUILD)

.PHONY: install
install:  
	$(INSTALL) -m 755 -d $(BIN_INST_DIR)
	$(INSTALL) -m 755 $(CMDS) $(BIN_INST_DIR);

clean: 
	$(RM) -f  $(CMDS) core *~ *.o *.so *.a

extraclean: clean
	$(RM) -f *.a *.o *.so *.bak
