* EOInterface: New directory.

* EOInterface/GNUmakefile: New file.
        * EOInterface/Makefile.preamble: Ditto.
        * EOInterface/EOInterface.h: Ditto.
        * EOInterface/EODisplayGroup.h: Ditto.
        * EOInterface/EODisplayGroup.m: Ditto.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20223 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
David Ayers 2004-10-14 17:34:59 +00:00
parent 9517b6b6fd
commit 271ea5171d
6 changed files with 1027 additions and 0 deletions

View file

@ -1,3 +1,12 @@
2004-10-14 David Ayers <d.ayers@inode.at>
* EOInterface: New directory.
* EOInterface/GNUmakefile: New file.
* EOInterface/Makefile.preamble: Ditto.
* EOInterface/EOInterface.h: Ditto.
* EOInterface/EODisplayGroup.h: Ditto.
* EOInterface/EODisplayGroup.m: Ditto.
2004-10-07 David Ayers <d.ayers@inode.at>
* EOAccess/EOAttribute.m (encodeIntoPropertyList:): Encode numeric

View file

@ -0,0 +1,318 @@
/** -*-ObjC-*-
EODisplayGroup.h
Copyright (C) 2004 Free Software Foundation, Inc.
Author: David Ayers <d.ayers@inode.at>
This file is part of the GNUstep Database Library
The GNUstep Database 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,
or (at your option) any later version.
The GNUstep Database 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 the GNUstep Database Library; see the file COPYING. If not,
write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __EOInterface_EODisplayGroup_h__
#define __EOInterface_EODisplayGroup_h__
#ifdef GNUSTEP
#include <Foundation/NSObject.h>
#else
#include <Foundation/Foundation.h>
#endif
@class NSString;
@class NSArray;
@class NSMutableArray;
@class NSDictionary;
@class NSMutableDictionary;
@class NSNotification;
@class EODataSource;
@class EOQualifier;
@class EOAssociation;
@interface EODisplayGroup : NSObject <NSCoding>
{
@private
EODataSource *_dataSource;
NSMutableArray *_allObjects;
NSMutableArray *_displayedObjects;
id _delegate;
NSArray *_selection;
NSArray *_sortOrdering;
EOQualifier *_qualifier;
NSArray *_localKeys;
NSMutableArray *_selectedObjects;
id _observerNotificationBeginProxy;
id _observerNotificationEndProxy;
int _updatedObjectIndex;
NSDictionary *_insertedObjectDefaultValues;
NSMutableArray *_savedAllObjects;
NSMutableDictionary *_queryMatch;
NSMutableDictionary *_queryMin;
NSMutableDictionary *_queryMax;
NSMutableDictionary *_queryOperator;
NSString *_defaultStringMatchOperator;
NSString *_defaultStringMatchFormat;
NSMutableDictionary *_queryBindings;
void *_reserved;
struct {
unsigned selectsFirstObjectAfterFetch:1;
unsigned didChangeContents:1;
unsigned didChangeSelection:1;
unsigned autoFetch:1;
unsigned haveFetched:1;
unsigned validateImmediately:1;
unsigned queryMode:1;
unsigned optimisticRefresh:1;
unsigned fetchAll:1;
unsigned _initialized:1;
unsigned _reserved:22;
} _flags;
EOAssociation *_editingAssociation;
}
/* Global configurations. */
+ (NSString *)globalDefaultStringMatchOperator;
+ (void)setGlobalDefaultStringMatchOperator: (NSString *)operator;
+ (BOOL)globalDefaultForValidatesChangesImmediately;
+ (void)setGlobalDefaultForValidatesChangesImmediately: (BOOL)flag;
/* Configuring behavior. */
- (BOOL)fetchesOnLoad;
- (void)setFetchesOnLoad: (BOOL)flag;
- (BOOL)selectsFirstObjectAfterFetch;
- (void)setSelectsFirstObjectAfterFetch: (BOOL)flag;
- (BOOL)validatesChangesImmediately;
- (void)setValidatesChangesImmediately: (BOOL)flag;
- (BOOL)usesOptimisticRefresh;
- (void)setUsesOptimisticRefresh: (BOOL)flag;
- (NSDictionary *)queryBindingValues;
- (void)setQueryBindingValues: (NSDictionary *)values;
- (NSDictionary *)queryOperatorValues;
- (void)setQueryOperatorValues: (NSDictionary *)values;
- (NSString *)defaultStringMatchFormat;
- (void)setDefaultStringMatchFormat: (NSString *)format;
- (NSString *)defaultStringMatchOperator;
- (void)setDefaultStringMatchOperator: (NSString *)operator;
/* Configuring data source. */
- (EODataSource *)dataSource;
- (void)setDataSource: (EODataSource *)dataSource;
/* Configuring qualifier. */
- (EOQualifier *)qualifier;
- (void)setQualifier: (EOQualifier *)qualifier;
/* Configuring sort orderings. */
- (NSArray *)sortOrderings;
- (void)setSortOrderings: (NSArray *)orderings;
/* Managing queries. */
- (EOQualifier *)qualifierFromQueryValues;
- (NSDictionary *)equalToQueryValues;
- (void)setEqualToQueryValues: (NSDictionary *)values;
- (NSDictionary *)greaterThanQueryValues;
- (void)setGreaterThanQueryValues: (NSDictionary *)values;
- (NSDictionary *)lessThanQueryValues;
- (void)setLessThanQueryValues: (NSDictionary *)values;
- (void)qualifyDisplayGroup;
- (void)qualifyDataSource;
- (BOOL)inQueryMode;
- (void)setInQueryMode: (BOOL)flag;
/* Fetching. */
- (BOOL)fetch;
/* Accessing objects. */
- (NSArray *)allObjects;
- (void)setObjectArray: (NSArray *)objects;
- (NSArray *)displayedObjects;
/* Updating displayed values. */
- (void)redisplay;
- (void)updateDisplayedObjects;
/* Manage selection. */
- (NSArray *)selectionIndexes;
- (BOOL)setSelectionIndexes: (NSArray *)selection;
- (BOOL)selectObject: (id)object;
- (BOOL)selectObjectsIdenticalTo: (NSArray *)selection;
- (BOOL)selectObjectsIdenticalTo: (NSArray *)selection
selectFirstOnNoMatch: (BOOL)flag;
- (BOOL)selectNext;
- (BOOL)selectPrevious;
- (BOOL)clearSelection;
- (NSArray *)selectedObjects;
- (void)setSelectedObjects: (NSArray *)objects;
- (id)selectedObject;
- (void)setSelectedObject: (id)object;
/* Inserting objects. */
- (id)insertObjectAtIndex: (unsigned)index;
- (void)insertObject: (id)object atIndex: (unsigned)index;
- (NSDictionary *)insertedObjectDefaultValues;
- (void)setInsertedObjectDefaultValues: (NSDictionary *)values;
/* Deleting objects. */
- (BOOL)deleteObjectAtIndex: (unsigned)index;
- (BOOL)deleteSelection;
/* Manage local keys. */
- (NSArray *)localKeys;
- (void)setLocalKeys: (NSArray *)keys;
/* Manage delegate. */
- (id)delegate;
- (void)setDelegate: (id)delegate;
/* Associations. */
- (NSArray *)observingAssociations;
- (EOAssociation *)editingAssociation;
- (BOOL)endEditing;
@end
@interface EODisplayGroup (EODisplayGroupTargetAction)
- (void)selectNext: (id)sender;
- (void)selectPrevious: (id)sender;
- (void)fetch: (id)sender;
- (void)insert: (id)sender;
- (void)delete: (id)sender;
- (void)qualifyDataSource: (id)sender;
- (void)qualifyDisplayGroup: (id)sender;
- (void)enterQueryMode: (id)sender;
@end
@interface EODisplayGroup (EOAssociationInteraction)
- (BOOL)selectionChanged;
- (BOOL)contentsChanged;
- (int)updatedObjectIndex;
- (id)valueForObject: (id)object key: (NSString *)key;
- (id)selectedObjectValueForKey: (NSString *)key;
- (id)valueForObjectAtIndex: (unsigned)index key: (NSString *)key;
- (BOOL)setValue: (id)value forObject: (id)object key: (NSString *)key;
- (BOOL)setSelectedObjectValue: (id)value forKey: (NSString *)key;
- (BOOL)setValue: (id)value forObjectAtIndex: (unsigned)index
key: (NSString *)key;
- (BOOL)enabledToSetSelectedObjectValueForKey:(NSString *)key;
- (BOOL)association: (EOAssociation *)association
failedToValidateValue: (NSString *)value
forKey: (NSString *)key
object: (id)object
errorDescription: (NSString *)description;
- (void)associationDidBeginEditing: (EOAssociation *)association;
- (void)associationDidEndEditing: (EOAssociation *)association;
@end
@interface EODisplayGroup (EOEditors)
- (BOOL)editorHasChangesForEditingContext: (EOEditingContext *)editingContext;
- (void)editingContextWillSaveChanges: (EOEditingContext *)editingContext;
@end
@interface EODisplayGroup (EOMessageHandlers)
- (void)editingContext: (EOEditingContext *)editingContext
presentErrorMessage: (NSString *)message;
@end
@interface NSObject (EODisplayGroupDelegate)
- (BOOL)displayGroup: (EODisplayGroup *)displayGroup
shouldRedisplayForEditingContextChangeNotification: (NSNotification *)notif;
- (BOOL)displayGroup: (EODisplayGroup *)displayGroup
shouldRefetchForInvalidatedAllObjectsNotification: (NSNotification *)notif;
- (BOOL)displayGroup: (EODisplayGroup *)displayGroup
shouldChangeSelectionToIndexes: (NSArray *)indices;
- (void)displayGroupDidChangeSelection: (EODisplayGroup *)displayGroup;
- (void)displayGroupDidChangeSelectedObjects: (EODisplayGroup *)displayGroup;
- (BOOL)displayGroupShouldFetch: (EODisplayGroup *)displayGroup;
- (void)displayGroup: (EODisplayGroup *)displayGroup
didFetchObjects: (NSArray *)objects;
- (NSArray *)displayGroup: (EODisplayGroup *)displayGroup
displayArrayForObjects: (NSArray *)objects;
- (void)displayGroup: (EODisplayGroup *)displayGroup
didSetValue: (id)value
forObject: (id)object
key: (NSString *)key;
- (void)displayGroup: (EODisplayGroup *)displayGroup
createObjectFailedForDataSource: (EODataSource *)dataSource;
- (BOOL)displayGroup: (EODisplayGroup *)displayGroup
shouldInsertObject: (id)object
atIndex: (unsigned)index;
- (void)displayGroup: (EODisplayGroup *)displayGroup
didInsertObject: (id)object;
- (BOOL)displayGroup: (EODisplayGroup *)displayGroup
shouldDeleteObject: (id)object;
- (void)displayGroup: (EODisplayGroup *)displayGroup
didDeleteObject: (id)object;
- (void)displayGroupDidChangeDataSource: (EODisplayGroup *)displayGroup;
- (BOOL)displayGroup: (EODisplayGroup *)displayGroup
shouldDisplayAlertWithTitle: (NSString *)title
message: (NSString *)message;
@end
#endif

View file

@ -0,0 +1,527 @@
/*
EODisplayGroup.m
Copyright (C) 2004 Free Software Foundation, Inc.
Author: David Ayers <d.ayers@inode.at>
This file is part of the GNUstep Database Library
The GNUstep Database 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,
or (at your option) any later version.
The GNUstep Database 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 the GNUstep Database Library; see the file COPYING. If not,
write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "config.h"
RCS_ID("$Id$")
#ifdef GNUSTEP
#include <Foundation/NSString.h>
#include <Foundation/NSArray.h>
#include <Foundation/NSDictionary.h>
#include <Foundation/NSNotification.h>
#include <Foundation/NSValue.h>
#else
#include <Foundation/Foundation.h>
#endif
#include <EOControl/EODataSource.h>
#include <EOControl/EOQualifier.h>
#include "EODisplayGroup.h"
/*
#include "EOAssociation.h"
*/
@implementation EODisplayGroup
/* TODO: Check default setting */
static NSString *_globalDefaultStringMatchOperator = nil;
+ (NSString *)globalDefaultStringMatchOperator
{
return _globalDefaultStringMatchOperator;
}
+ (void)setGlobalDefaultStringMatchOperator: (NSString *)operator
{
ASSIGNCOPY(_globalDefaultStringMatchOperator, operator);
}
/* TODO: Check default setting */
static BOOL _globalDefaultForValidatesChangesImmediately= NO;
+ (BOOL)globalDefaultForValidatesChangesImmediately
{
return _globalDefaultForValidatesChangesImmediately;
}
+ (void)setGlobalDefaultForValidatesChangesImmediately: (BOOL)flag
{
_globalDefaultForValidatesChangesImmediately = flag ? YES : NO;
}
- (id)init
{
if ((self = [super init]))
{
}
return self;
}
- (void)dealloc
{
DESTROY(_dataSource);
DESTROY(_allObjects);
DESTROY(_displayedObjects);
DESTROY(_selection);
DESTROY(_sortOrdering);
DESTROY(_qualifier);
DESTROY(_localKeys);
DESTROY(_selectedObjects);
DESTROY(_observerNotificationBeginProxy);
DESTROY(_observerNotificationEndProxy);
DESTROY(_insertedObjectDefaultValues);
DESTROY(_savedAllObjects);
DESTROY(_queryMatch);
DESTROY(_queryMin);
DESTROY(_queryMax);
DESTROY(_queryOperator);
DESTROY(_defaultStringMatchOperator);
DESTROY(_defaultStringMatchFormat);
DESTROY(_queryBindings);
DESTROY(_editingAssociation);
[super dealloc];
}
- (id)initWithCoder: (NSCoder *)coder
{
return [self init];
}
- (void)encodeWithCoder: (NSCoder *)coder
{
}
- (BOOL)fetchesOnLoad
{
return _flags.autoFetch;
}
- (void)setFetchesOnLoad: (BOOL)flag
{
_flags.autoFetch = flag ? YES : NO;
}
- (BOOL)selectsFirstObjectAfterFetch
{
return _flags.selectsFirstObjectAfterFetch;
}
- (void)setSelectsFirstObjectAfterFetch: (BOOL)flag
{
_flags.selectsFirstObjectAfterFetch = flag ? YES : NO;
}
- (BOOL)validatesChangesImmediately
{
return _flags.validateImmediately;
}
- (void)setValidatesChangesImmediately: (BOOL)flag
{
_flags.validateImmediately = flag ? YES : NO;
}
- (BOOL)usesOptimisticRefresh
{
return _flags.optimisticRefresh;
}
- (void)setUsesOptimisticRefresh: (BOOL)flag
{
_flags.optimisticRefresh = flag ? YES : NO;
}
- (NSDictionary *)queryBindingValues
{
return AUTORELEASE([_queryBindings copy]);
}
- (void)setQueryBindingValues: (NSDictionary *)values
{
ASSIGN(_queryBindings, [values mutableCopyWithZone: [self zone]]);
}
- (NSDictionary *)queryOperatorValues
{
return AUTORELEASE([_queryOperator copy]);
}
- (void)setQueryOperatorValues: (NSDictionary *)values
{
ASSIGN(_queryOperator,
AUTORELEASE([values mutableCopyWithZone: [self zone]]));
}
- (NSString *)defaultStringMatchFormat
{
return _defaultStringMatchFormat;
}
- (void)setDefaultStringMatchFormat: (NSString *)format
{
ASSIGNCOPY(_defaultStringMatchFormat, format);
}
- (NSString *)defaultStringMatchOperator
{
return _defaultStringMatchOperator;
}
- (void)setDefaultStringMatchOperator: (NSString *)operator
{
ASSIGNCOPY(_defaultStringMatchOperator, operator);
}
- (EODataSource *)dataSource
{
return _dataSource;
}
- (void)setDataSource: (EODataSource *)dataSource
{
ASSIGN(_dataSource, dataSource);
}
- (EOQualifier *)qualifier
{
return _qualifier;
}
- (void)setQualifier: (EOQualifier *)qualifier
{
ASSIGN(_qualifier, qualifier);
}
- (NSArray *)sortOrderings
{
return _sortOrdering;
}
- (void)setSortOrderings: (NSArray *)orderings
{
ASSIGNCOPY(_sortOrdering, orderings);
}
- (EOQualifier *)qualifierFromQueryValues
{
return nil;
}
- (NSDictionary *)equalToQueryValues
{
return nil;
}
- (void)setEqualToQueryValues: (NSDictionary *)values
{
}
- (NSDictionary *)greaterThanQueryValues
{
return nil;
}
- (void)setGreaterThanQueryValues: (NSDictionary *)values
{
}
- (NSDictionary *)lessThanQueryValues
{
return nil;
}
- (void)setLessThanQueryValues: (NSDictionary *)values
{
}
- (void)qualifyDisplayGroup
{
}
- (void)qualifyDataSource
{
}
- (BOOL)inQueryMode
{
return _flags.queryMode;
}
- (void)setInQueryMode: (BOOL)flag
{
_flags.queryMode = flag ? YES : NO;
}
- (BOOL)fetch
{
return NO;
}
- (NSArray *)allObjects
{
return AUTORELEASE([_allObjects copy]);
}
- (void)setObjectArray: (NSArray *)objects
{
ASSIGN(_allObjects,
AUTORELEASE([objects mutableCopyWithZone: [self zone]]));
}
- (NSArray *)displayedObjects
{
return AUTORELEASE([_displayedObjects copy]);
}
- (void)redisplay
{
}
- (void)updateDisplayedObjects
{
}
- (NSArray *)selectionIndexes
{
return nil;
}
- (BOOL)setSelectionIndexes: (NSArray *)selection
{
return NO;
}
- (BOOL)selectObject: (id)object
{
return NO;
}
- (BOOL)selectObjectsIdenticalTo: (NSArray *)selection
{
return NO;
}
- (BOOL)selectObjectsIdenticalTo: (NSArray *)selection
selectFirstOnNoMatch: (BOOL)flag
{
return NO;
}
- (BOOL)selectNext
{
return NO;
}
- (BOOL)selectPrevious
{
return NO;
}
- (BOOL)clearSelection
{
return NO;
}
- (NSArray *)selectedObjects
{
return nil;
}
- (void)setSelectedObjects: (NSArray *)objects
{
}
- (id)selectedObject
{
return nil;
}
- (void)setSelectedObject: (id)object
{
}
- (id)insertObjectAtIndex: (unsigned)index
{
}
- (void)insertObject: (id)object atIndex: (unsigned)index
{
}
- (NSDictionary *)insertedObjectDefaultValues
{
return _insertedObjectDefaultValues;
}
- (void)setInsertedObjectDefaultValues: (NSDictionary *)values
{
ASSIGNCOPY(_insertedObjectDefaultValues, values);
}
- (BOOL)deleteObjectAtIndex: (unsigned)index
{
return NO;
}
- (BOOL)deleteSelection
{
return NO;
}
- (NSArray *)localKeys
{
return _localKeys;
}
- (void)setLocalKeys: (NSArray *)keys
{
ASSIGNCOPY(_localKeys, keys);
}
- (id)delegate
{
return _delegate;
}
- (void)setDelegate: (id)delegate
{
_delegate = delegate;
}
- (NSArray *)observingAssociations
{
return nil;
}
- (EOAssociation *)editingAssociation
{
return _editingAssociation;
}
- (BOOL)endEditing
{
return NO;
}
@end
@implementation EODisplayGroup (EODisplayGroupTargetAction)
/* TODO: check for return value handling and exception handling. */
- (void)selectNext: (id)sender
{
[self selectNext];
}
- (void)selectPrevious: (id)sender
{
[self selectPrevious];
}
- (void)fetch: (id)sender
{
[self fetch];
}
- (void)insert: (id)sender
{
NSArray *selections = [self selectionIndexes];
NSNumber *index = [selections lastObject];
unsigned idx = [index unsignedIntValue];
[self insertObjectAtIndex: idx];
}
- (void)delete: (id)sender
{
[self deleteSelection];
}
- (void)qualifyDataSource: (id)sender
{
[self qualifyDataSource];
}
- (void)qualifyDisplayGroup: (id)sender
{
[self qualifyDisplayGroup];
}
- (void)enterQueryMode: (id)sender
{
[self setInQueryMode: YES];
}
@end
@implementation EODisplayGroup (EOAssociationInteraction)
- (BOOL)selectionChanged
{
return NO;
}
- (BOOL)contentsChanged
{
return NO;
}
- (int)updatedObjectIndex
{
return 0;
}
- (id)valueForObject: (id)object key: (NSString *)key
{
return nil;
}
- (id)selectedObjectValueForKey: (NSString *)key
{
return nil;
}
- (id)valueForObjectAtIndex: (unsigned)index key: (NSString *)key
{
return nil;
}
- (BOOL)setValue: (id)value forObject: (id)object key: (NSString *)key
{
return NO;
}
- (BOOL)setSelectedObjectValue: (id)value forKey: (NSString *)key
{
return NO;
}
- (BOOL)setValue: (id)value forObjectAtIndex: (unsigned)index
key: (NSString *)key
{
return NO;
}
- (BOOL)enabledToSetSelectedObjectValueForKey:(NSString *)key
{
return NO;
}
- (BOOL)association: (EOAssociation *)association
failedToValidateValue: (NSString *)value
forKey: (NSString *)key
object: (id)object
errorDescription: (NSString *)description
{
return NO;
}
- (void)associationDidBeginEditing: (EOAssociation *)association
{
}
- (void)associationDidEndEditing: (EOAssociation *)association
{
}
@end
@implementation EODisplayGroup (EOEditors)
- (BOOL)editorHasChangesForEditingContext: (EOEditingContext *)editingContext
{
return NO;
}
- (void)editingContextWillSaveChanges: (EOEditingContext *)editingContext
{
}
@end
@implementation EODisplayGroup (EOMessageHandlers)
- (void)editingContext: (EOEditingContext *)editingContext
presentErrorMessage: (NSString *)message
{
}
@end

32
EOInterface/EOInterface.h Normal file
View file

@ -0,0 +1,32 @@
/*
EOInterface.h
Copyright (C) 2004 Free Software Foundation, Inc.
Author: David Ayers <d.ayers@inode.at>
Date: October 2004
This file is part of the GNUstep Database Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __EOInterface_h__
#define __EOInterface_h__
#include <EOInterface/EODisplayGroup.h>
#endif /* __EOInterface_h__ */

76
EOInterface/GNUmakefile Normal file
View file

@ -0,0 +1,76 @@
#
# EOInterface makefile for GNUstep Database Library.
#
# Copyright (C) 2004 Free Software Foundation, Inc.
#
# Author: David Ayers <d.ayers@inode.at>
#
# This file is part of the GNUstep Database Library.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library 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
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
include $(GNUSTEP_MAKEFILES)/common.make
include ../Version
# The library to be compiled
LIBRARY_NAME=EOInterface
# The C source files to be compiled
EOInterface_C_FILES =
# The Objective-C source files to be compiled
EOInterface_OBJC_FILES = \
EODisplayGroup.m \
EOInterface_HEADER_FILES_DIR = .
EOInterface_HEADER_FILES = \
EODisplayGroup.h \
EOInterface.h
gdl2_AUTOGSDOC_HEADERS = $(EOInterface_HEADER_FILES)
gdl2_AUTOGSDOC_SOURCE = $(EOInterface_OBJC_FILES)
DOCUMENT_NAME = gdl2
gdl2_HEADER_FILES_DIR = $(HEADER_DIR)
gdl2_AGSDOC_FILES = gdl2.gsdoc $(gdl2_AUTOGSDOC_HEADERS)
#$(gdl2_AUTOGSDOC_SOURCE)
gdl2_AGSDOC_FLAGS = \
-Declared EOInterface \
-Standards YES \
-Project gdl2 \
-WordMap '{\
FOUNDATION_EXPORT=extern;FOUNDATION_STATIC_INLINE="";\
GS_GEOM_SCOPE=extern;GS_GEOM_ATTR="";\
GS_EXPORT=extern;GS_DECLARE="";\
GS_RANGE_SCOPE=extern;GS_RANGE_ATTR="";\
GS_ZONE_SCOPE=extern;GS_ZONE_ATTR="";\
}' -Up gdl2
-include Makefile.preamble
-include GNUmakefile.local
include $(GNUSTEP_MAKEFILES)/library.make
# Only build the doc if doc=yes was passed on the command line
ifeq ($(doc),yes)
include $(GNUSTEP_MAKEFILES)/documentation.make
endif
-include Makefile.postamble

View file

@ -0,0 +1,65 @@
#
# Makefile.preamble
#
# Copyright (C) 2004 Free Software Foundation, Inc.
#
# Written by: David Ayers <d.ayers@inode.at>
#
# This file is part of the GNUstep Database Library.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library 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
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#
# Flags dealing with compiling and linking
#
# Additional flags to pass to the preprocessor
ADDITIONAL_CPPFLAGS = $(FND_DEFINE) $(RUNTIME_DEFINE) -g
# Additional flags to pass to the Objective-C compiler
ADDITIONAL_OBJCFLAGS =
# Additional flags to pass to the C compiler
ADDITIONAL_CFLAGS =
# Additional include directories the compiler should search
ADDITIONAL_INCLUDE_DIRS = -I../EOControl/$(GNUSTEP_TARGET_DIR) -I..
# Additional LDFLAGS to pass to the linker
ADDITIONAL_LDFLAGS =
# Additional library directories the linker should search
ADDITIONAL_LIB_DIRS = -L../EOControl/$(GNUSTEP_OBJ_DIR)
#
# Flags dealing with installing and uninstalling
#
# Additional directories to be created during installation
ADDITIONAL_INSTALL_DIRS =
# What are the libraries this library depends upon. This is needed for some
# systems where building a shared library requires to pass to the linker
# all the libraries the target library depends upon.
ifneq ($(FOUNDATION_LIBRARY_NAME),)
LIBRARIES_DEPEND_UPON = -l$(FOUNDATION_LIBRARY_NAME)
endif
ifneq ($(FOUNDATION_LIB),gnu)
LIBRARIES_DEPEND_UPON += -lgnustep-baseadd
endif
LIBRARIES_DEPEND_UPON += -lgnustep-db2control