RM = @rm@
TAR = @tar@

ROOTDIR = @rootdir@
PREFIX = $(ROOTDIR)
GTL_ROOT = GTL-0.3.2

LIBGTL = $(GTL_ROOT)/src/libGTL.la

all:	$(LIBGTL)

$(LIBGTL):	# import
	( cd $(GTL_ROOT); \
	  if [ ! -f Makefile ]; then \
		./configure --prefix=$(PREFIX) \
			    --disable-shared --enable-static; \
	  fi; \
	  $(MAKE) all )

install:	all
	( cd $(GTL_ROOT); $(MAKE) $@ )

#import:
#	( cd files; $(TAR) cf - * ) | ( cd $(GTL_ROOT); $(TAR) xf - )

clean:
	$(RM) core *.core *~ *.bak *.out

distclean:	clean
	$(RM) Makefile
	( if [ -f $(GTL_ROOT)/Makefile ]; then cd $(GTL_ROOT); $(MAKE) $@; fi )
