#
# $Id: GNUmakefile.postamble,v 1.14 2005/05/16 20:29:37 will_mason Exp $
#
# vi: set ft=make:

# ObjectiveLib - a library of containers and algorithms for Objective-C
#
# Copyright (c) 2004
# Will Mason
#
# Portions:
#
# Copyright (c) 1994
# Hewlett-Packard Company
#
# Copyright (c) 1996,1997
# Silicon Graphics Computer Systems, Inc.
#
# Copyright (c) 1997
# Moscow Center for SPARC Technology
#
# Copyright (c) 1999 
# Boris Fomitchev
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#
# You may contact the author at will_mason@users.sourceforge.net.

after-all::
	rm -rf ObjectiveLib

after-clean::
	$(MAKE) --directory=test clean
	-rm -rf ObjectiveLib derived_src objectivelib.def

after-distclean::
	$(MAKE) --directory=test distclean
	rm -fr autom4te.cache config.log config.status GNUmakefile Config.h \
	ConfigPrivate.h test/GNUmakefile test/Config.h DocTools/Doxygen.cfg \
	ObjectiveLib.h

after-install::
	$(MAKE) install-doc

before-all:: ObjectiveLib.h
ifneq ($(GNUSTEP_HOST_OS), mingw32)
	-ln -s . ObjectiveLib
else
# Symbolic links are not well supported on MinGW.
	-mkdir ObjectiveLib
	cp --preserve $(libObjectiveLib_HEADER_FILES) Objectivelib
endif

objectivelib.def: $(OBJ_FILES_TO_LINK)
	-rm -f $@
	-rm -f _tmp.def
	cat win32-def.top > $@
	nm $^ | grep '^........ [TR] _' | sed 's/[^_]*_//' > _tmp.def
	cat _tmp.def | grep "_class_name_" >> $@
	rm -f _tmp.def
