# -*- Makefile -*-
# $Id: Makefile,v 1.15 1997/06/02 04:39:42 miyazaki Exp $
#
# Copyright (C) 1996-1997 by Haruo Yokota, 
#	Japan Advanced Inst. of Sci. and Tech.,
#	1-1 Asahidai, Tatsunokuchi, Ishikawa 923-12, Japan.
#

SHELL		= /bin/sh
RM		= /bin/rm -f

SUBDIRS		= sqlclt oqlclt

FLAGS_TO_PASS = \
	MAKE='$(MAKE)' \
	KLIC='$(KLIC)' \
	KLICFLAGS='$(KLICFLAGS)' \
	KLICDP='$(KLICDP)' \
	NKLIC='$(NKLIC)' \
	NKLICFLAGS='$(NKLICFLAGS)' \
	PARADEROOT='$(PARADEROOT)'

###
.PHONY:	all install.sun ncube install.ncube all-clean clean

all: sun

sun:
	@ for subdir in $(SUBDIRS); do \
	   echo "making $$subdir"; \
	   ( cd $$subdir && $(MAKE) $(FLAGS_TO_PASS) $@ ) || exit 1; \
	done

install.sun:
	@ for subdir in $(SUBDIRS); do \
	   echo "installing $$subdir"; \
	   ( cd $$subdir && $(MAKE) $(FLAGS_TO_PASS) $@ ) || exit 1; \
	done

ncube:
install.ncube:

###
all-clean:
	@ for subdir in $(SUBDIRS); do \
	   echo "cleaning $$subdir"; \
	   ( cd $$subdir && $(MAKE) $(FLAGS_TO_PASS) $@ ) || exit 1; \
	done

clean:
	@ for subdir in $(SUBDIRS); do \
	   ( cd $$subdir && $(MAKE) $(FLAGS_TO_PASS) $@) || exit 1; \
	done
