##############################################################################
#FILE:				GNUmakefile
#LANGUAGE:			GNU-make
#SYSTEM:			UNIX
#USER-INTERFACE:	None
#DESCRIPTION
#	This is the makefile for the Oracle7 Adaptor of the
#   GNUstep Database Library.
#AUTHORS
#	<PJB> Pascal J. Bourguignon
#MODIFICATIONS
#	2000/02/10 <PJB> Added this comment.
#BUGS
#LEGAL
#   Written by:  Pascal J. Bourguignon <pjb@imaginet.fr>
#   Funds from:  Orange Concept (http://www.orange-concept.com/)
#   Date:        August 1999 - February 2000
#
#   This file is part of the Oracle7 Adaptor, GNUstep Database Library.
#   The Oracle7 Adaptor allows access to Oracle[678] databases from GDL.
#
#   Copyright (C) 2000 Free Software Foundation, Inc.
#
#   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 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
##############################################################################

GNUSTEP_MAKEFILES = $(GNUSTEP_SYSTEM_ROOT)/Makefiles

include $(GNUSTEP_MAKEFILES)/common.make

include ../../Version
include ../../config.mak

# The bundles to be compiled
BUNDLE_NAME=Oracle7

Oracle7_PRINCIPAL_CLASS=Oracle7Adaptor

# The bundle Objective-C source files to be compiled
Oracle7_OBJC_FILES = \
	Oracle7Adaptor.m \
	Oracle7Context.m \
	Oracle7Channel.m \
	Oracle7Buffer.m \
	Oracle7Utilities.m \
	Oracle7SQLExpression.m \
	Oracle7Exceptions.m \
	O2CI7Column.m \
	O2CI7Context.m \
	O2CI7Cursor.m \
	O2CI7Object.m \
	NSArray-Oracle7Adaptor_Perform.m \
	NSString-Oracle7Adaptor_LongLong.m 


# The bundle resource files and directories
Oracle7_RESOURCES = Info.plist
Oracle7_RESOURCE_DIRS = English.lproj

# The bundles libraries to link against
# This does not work!!!
# Oracle7_BUNDLE_LIBS = Oracle7_BUNDLE_LIBS_BEG $(ORACLE_LIBS) Oracle7_BUNDLE_LIBS_END
# Oracle7_LIBS= Oracle7_LIBS_BEG $(ORACLE_LIBS) Oracle7_LIBS_END

Oracle7_LIB_DIRS=$(ORACLE_LIB_DIRS)

# The bundles to be installed
BUNDLE_INSTALL = $(BUNDLE_NAME)
BUNDLE_INSTALL_DIR = $(GNUSTEP_LIBRARIES_ROOT)/Adaptors

# Use .gdladaptor as the bundle extension
BUNDLE_EXTENSION = .gdladaptor

# The library to be compiled
LIBRARY_NAME=libgdl-oracle7

# The bundle Objective-C source files to be compiled
libgdl-oracle7_OBJC_FILES = $(Oracle7_OBJC_FILES)

libgdl-oracle7_HEADER_FILES_DIR = .
libgdl-oracle7_HEADER_FILES_INSTALL_DIR = \
   /$(GNUSTEP_FND_DIR)/eoadaptors/Oracle7

libgdl-oracle7_HEADER_FILES = \
	Oracle7Adaptor.h \
	Oracle7Context.h \
	Oracle7Channel.h \
	Oracle7SQLExpression.h \
	Oracle7Exceptions.h

libgdl-oracle7_LIB_DIRS=$(ORACLE_LIB_DIRS)

-include Makefile.preamble

-include GNUmakefile.local

ifeq ($(ORACLE7_DATABASE),yes)
all::
	@echo 
	@echo ORACLE7_DATABASE=\"$(ORACLE7_DATABASE)\"
	@echo
include $(GNUSTEP_MAKEFILES)/bundle.make
include $(GNUSTEP_MAKEFILES)/library.make
else
all::
	@echo 
	@echo ORACLE7_DATABASE=\"$(ORACLE7_DATABASE)\"
	@echo
	@echo "Nothing will be done if you don't define ORACLE7_DATABASE=yes,"
	@echo "  either:    make ORACLE7_DATABASE=yes"
	@echo "  or:        ORACLE7_DATABASE=yes make"
	@echo "  or:        export ORACLE7_DATABASE=yes ; make"
	@echo "  or:        setenv ORACLE7_DATABASE yes ; make"
	@echo ""
	@echo "And define also ORACLE_HOME to the oracle product directory:"
	@echo "setenv ORACLE_HOME /home/oracle/app/oracle/product/8.0.5"
	@echo 
include $(GNUSTEP_MAKEFILES)/rules.make
endif

-include Makefile.postamble


#### GNUmakefile                      -- 2000-02-21 07:11:15 -- PJB ####
