# $Id: Makefile.in,v 1.6 2000/12/22 02:51:46 m-hirano Exp $
# $RWC_Release: Omni-1.6 $
# $RWC_Copyright:
#  Omni Compiler Software Version 1.5-1.6
#  Copyright (C) 2002 PC Cluster Consortium
#  
#  This software is free software; you can redistribute it and/or modify
#  it under the terms of the GNU Lesser General Public License version
#  2.1 published by the Free Software Foundation.
#  
#  Omni Compiler Software Version 1.0-1.4
#  Copyright (C) 1999, 2000, 2001.
#   Tsukuba Research Center, Real World Computing Partnership, Japan.
#  
#  Please check the Copyright and License information in the files named
#  COPYRIGHT and LICENSE under the top  directory of the Omni Compiler
#  Software release kit.
#  
#  
#  $

TOPDIR		=	../..
prefix		=	@prefix@
exec_prefix	=	@exec_prefix@

bindir		=	$(exec_prefix)/bin
libdir		=	$(prefix)/lib

ompcdir		=	$(libdir)/openmp
ompclibexecdir	=	$(ompcdir)/libexec
ompclibdir	=	$(ompcdir)/lib
ompcclassdir	=	$(ompcdir)/java
ompctempldir	=	$(ompcdir)/template

INSTALLDIR	=	$(bindir)
INSTALL		= 	@INSTALLCOM@
MKDIR		=	@MKDIRCOM@

OMPC_DIR = $(prefix)

TARGET = tlogview.jar tlogview

all: $(TARGET)

tlogview.jar:
	@JAVACCOM@ *.java
	rm -f $@
	sh @GENJAR@ $@ *.class 

tlogview:	tlogview.in
	sed -e "s:%OMPC_DIR%:$(OMPC_DIR):g" \
		-e 's:%JAVACOM%:@JAVACOM@:g' tlogview.in > $@
	chmod 755 $@

install: $(TARGET)
	@if [ ! -d $(INSTALLDIR) ] ; then \
		(echo "Making directory $(INSTALLDIR)" ; \
		$(MKDIR) $(INSTALLDIR) ; \
		chmod 775 $(INSTALLDIR)); \
	else \
		true ; \
	fi
	$(INSTALL) -c -m 755 tlogview $(INSTALLDIR)
	@if [ ! -d $(ompcclassdir) ] ; then \
		(echo "Making directory $(ompcclassdir)" ; \
		$(MKDIR) $(ompcclassdir) ; \
		chmod 775 $(ompcclassdir)); \
	else \
		true ; \
	fi
	$(INSTALL) -c -m 644 tlogview.jar $(ompcclassdir)

clean:
	rm -f $(TARGET) core *~ *.class

distclean:	clean
	rm -f config.* Makefile .depend*

depend:

test:

Makefile::
	(cd $(TOPDIR); sh ./config.status)
