#
#  Source makefile for the Foundation Extensions Library.
#  
#  Copyright (C) 1997 NET-Community
#
#  Written by:	Scott Christley <scottc@net-community.com>
#
#  This file is part of the Foundation Extensions Library.
#
#  Permission to use, copy, modify, and distribute this software and its
#  documentation for any purpose and without fee is hereby granted, provided
#  that the above copyright notice appear in all copies and that both that
#  copyright notice and this permission notice appear in supporting
#  documentation.
#
#  We disclaim all warranties with regard to this software, including all
#  implied warranties of merchantability and fitness, in no event shall
#  we be liable for any special, indirect or consequential damages or any
#  damages whatsoever resulting from loss of use, data or profits, whether in
#  an action of contract, negligence or other tortious action, arising out of
#  or in connection with the use or performance of this software.
#

GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_SYSTEM_ROOT)

GNUSTEP_MAKEFILES = $(GNUSTEP_SYSTEM_ROOT)/Makefiles

include $(GNUSTEP_MAKEFILES)/common.make

include ../Version

# The library to be compiled
LIBRARY_NAME=libFoundationExt

# The C source files to be compiled
libFoundationExt_C_FILES = 

ifneq ($(FOUNDATION_LIB), fd)
MFILES = \
objc-runtime.m \
NSException.m \
GarbageCollector.m \
GCObject.m \
GCArray.m \
GCDictionary.m \
FormatScanner.m \
PrintfFormatScanner.m \
DefaultScannerHandler.m \
PrintfScannerHandler.m

EXCEPTION_MFILES = \
exceptions/FoundationException.m \
exceptions/GeneralExceptions.m \
exceptions/NSCoderExceptions.m
endif

# Additional files for gnustep-base and NeXT's Foundation
ifneq ($(FOUNDATION_LIB), fd)
  ADDITIONAL_HFILES = MissingMethods.h
  ADDITIONAL_MFILES = MissingMethods.m
    ifeq ($(OBJC_RUNTIME_LIB), nx)
      ADDITIONAL_HFILES += encoding.h objc-api.h
      ADDITIONAL_MFILES += encoding.m misc.m behavior.m
    endif
endif

# The Objective-C source files to be compiled
libFoundationExt_OBJC_FILES = \
	$(MFILES) $(ADDITIONAL_MFILES) $(EXCEPTION_MFILES)

MFILES += GMArchiver.m

libFoundationExt_HEADER_FILES_DIR = .
libFoundationExt_HEADER_FILES_INSTALL_DIR = /$(GNUSTEP_FND_DIR)/extensions

HFILES = $(MFILES:.m=.h)
EXCEPTION_HFILES = $(EXCEPTION_MFILES:.m=.h)

libFoundationExt_HEADER_FILES = \
	$(HFILES) $(ADDITIONAL_HFILES) $(EXCEPTION_HFILES)

-include GNUmakefile.preamble

-include GNUmakefile.local

include $(GNUSTEP_MAKEFILES)/library.make

-include GNUmakefile.postamble
