#
#       Makefile for grph1
#
#       Copyright (C) 2000-2022 GFD Dennou Club. All rights reserved.
#

include ../../Mkinclude

SUBDIRS		= csgi sgpack slpack stpack swpack szpack scpack $(OLDSRC)


object:
	@for i in $(SUBDIRS) ; do \
	  cd $$i ; \
	  echo "Making object files in $$i" ; \
	  $(MAKE) object ; \
	  cd .. ; \
	done

library: archive ranlib

archive:
	@for i in $(SUBDIRS) ; do \
	  cd $$i ; \
	  echo "Archiving $$i" ; \
	  $(MAKE) archive ; \
	  cd .. ; \
	done

ranlib:
	$(RANLIB) $(LDCLLIBFILE)

clean: clean.local clean.dir

clean.local:
	$(RM) *~

clean.dir:
	@for i in $(SUBDIRS) ; do \
	  cd $$i ; \
	  echo "Cleaning $$i" ; \
	  $(MAKE) clean ; \
	  cd .. ; \
	done
