147 lines
4.3 KiB
Makefile
147 lines
4.3 KiB
Makefile
|
|
#This file is part of SECONDO.
|
||
|
|
|
||
|
|
#Copyright (C) 2006, University in Hagen, Department of Computer Science,
|
||
|
|
#Database Systems for New Applications.
|
||
|
|
|
||
|
|
#SECONDO is free software; you can redistribute it and/or modify
|
||
|
|
#it under the terms of the GNU General Public License as published by
|
||
|
|
#the Free Software Foundation; either version 2 of the License, or
|
||
|
|
#(at your option) any later version.
|
||
|
|
|
||
|
|
#SECONDO 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 General Public License for more details.
|
||
|
|
|
||
|
|
#You should have received a copy of the GNU General Public License
|
||
|
|
#along with SECONDO; if not, write to the Free Software
|
||
|
|
#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||
|
|
|
||
|
|
########################################################################
|
||
|
|
#
|
||
|
|
# SECONDO makefile for General Tree Algebra
|
||
|
|
#
|
||
|
|
########################################################################
|
||
|
|
|
||
|
|
# include global definitions
|
||
|
|
include ../../makefile.env
|
||
|
|
|
||
|
|
CURRENT_ALGEBRA := GeneralTreeAlgebra
|
||
|
|
ALGEBRA_DEPENDENCIES := StandardAlgebra
|
||
|
|
ALGEBRA_DEPENDENCIES += RelationAlgebra
|
||
|
|
ALGEBRA_DEPENDENCIES += SpatialAlgebra
|
||
|
|
ALGEBRA_DEPENDENCIES += SymbolicTrajectoryBasicAlgebra
|
||
|
|
|
||
|
|
|
||
|
|
DOCU_FILES = GeneralTreeAlgebra.pd \
|
||
|
|
GeneralTreeAlgebra.h \
|
||
|
|
GTA_Config.h \
|
||
|
|
GTA_Spatial.h \
|
||
|
|
GTA_SpatialAttr.h \
|
||
|
|
HPointReg.h \
|
||
|
|
BBoxReg.h \
|
||
|
|
DistDataReg.h \
|
||
|
|
DistfunReg.h \
|
||
|
|
GTree/GTree.h \
|
||
|
|
GTree/GTree_Config.h \
|
||
|
|
GTree/GTree_EntryBase.h \
|
||
|
|
GTree/GTree_InternalEntry.h \
|
||
|
|
GTree/GTree_LeafEntry.h \
|
||
|
|
GTree/GTree_NodeConfig.h \
|
||
|
|
GTree/GTree_NodeBase.h \
|
||
|
|
GTree/GTree_GenericNodeBase.h \
|
||
|
|
GTree/GTree_LeafNode.h \
|
||
|
|
GTree/GTree_InternalNode.h \
|
||
|
|
GTree/GTree_NodeManager.h \
|
||
|
|
GTree/GTree_FileNode.h \
|
||
|
|
GTree/GTree_TreeManager.h \
|
||
|
|
GTree/GTree_Header.h \
|
||
|
|
GTree/GTree_Tree.h
|
||
|
|
|
||
|
|
DOCU = gta_docu
|
||
|
|
MODNAME = GeneralTreeAlgebra
|
||
|
|
|
||
|
|
# Use the mace CCFLAGS to add special compiler flags if needed.
|
||
|
|
# In this case the defaults are sufficient
|
||
|
|
CCFLAGS +=
|
||
|
|
|
||
|
|
# add cpp files in the defined subdirectories
|
||
|
|
GTREE_DIRS := GTree
|
||
|
|
GTREE_FILES := $(foreach dir,$(GTREE_DIRS),$(wildcard $(dir)/*.cpp))
|
||
|
|
OBJECTS += $(patsubst %.cpp, %.o, $(GTREE_FILES))
|
||
|
|
|
||
|
|
# The next rule will create a ".o" file for every ".cpp" file and
|
||
|
|
# creates a "lib$(MODNAME).a" file in the secondo/lib dir. Rules
|
||
|
|
# for creating ".dep" files and ".o" files are defined in makefile.env
|
||
|
|
.PHONY: all
|
||
|
|
all: check_dependencies $(OBJECTS) $(LIBOBJ)
|
||
|
|
|
||
|
|
check_dependencies:
|
||
|
|
$(check-algebra-dependencies)
|
||
|
|
|
||
|
|
|
||
|
|
# DEP_FILES is a macro defined in makefile.env. It will contain
|
||
|
|
# a list of files which are generated by the compiler to
|
||
|
|
# detect dependencies to other code files.
|
||
|
|
ifneq ($(MAKECMDGOALS),clean)
|
||
|
|
-include $(DEP_FILES)
|
||
|
|
endif
|
||
|
|
|
||
|
|
.PHONY: deps
|
||
|
|
deps: $(DEP_FILES)
|
||
|
|
|
||
|
|
|
||
|
|
# The rule below creates a library file. Maybe as shared or as static
|
||
|
|
# object. In case of a shared object all dependencies to other libraries
|
||
|
|
# must be defined. However, currently the command make shared=yes will
|
||
|
|
# not work. But in principle every algebra implementor has to define dependencies
|
||
|
|
# to other libraries here, since the make procedure does not know how to do this
|
||
|
|
# automatically.
|
||
|
|
$(LIBOBJ): $(OBJECTS)
|
||
|
|
ifeq ($(shared),yes)
|
||
|
|
# ... as shared object
|
||
|
|
$(LD) $(LDFLAGS) -o $(LIBOBJ) $(LDOPT) $(OBJECTS) -L$(LIBDIR) -lStandardAlgebra $(SDBLIB) $(TOOLLIB) $(DEFAULTLIB)
|
||
|
|
else
|
||
|
|
# ... as static library
|
||
|
|
$(AR) -r $(LIBOBJ) $(OBJECTS)
|
||
|
|
endif
|
||
|
|
|
||
|
|
# remove all generated stuff
|
||
|
|
.PHONY: clean
|
||
|
|
clean: cleanplugin
|
||
|
|
$(RM) $(DEP_FILES) $(OBJECTS) $(LIBOBJ) $(DOCU)
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
docu:
|
||
|
|
cat $(DOCU_FILES) > $(DOCU)
|
||
|
|
|
||
|
|
|
||
|
|
.PHONY: plugin
|
||
|
|
plugin:
|
||
|
|
rm -rf genTree
|
||
|
|
rm -rf mTree
|
||
|
|
rm -rf xTree
|
||
|
|
mkdir genTree
|
||
|
|
mkdir mTree
|
||
|
|
mkdir xTree
|
||
|
|
mkdir genTree/Figures
|
||
|
|
mkdir genTree/GTree
|
||
|
|
cp Figures/*eps genTree/Figures
|
||
|
|
cp GTree/*.h GTree/*.cpp genTree/GTree
|
||
|
|
cp *.h *.cpp *.examples *.spec *.pd *pdf makefile genTree
|
||
|
|
cp ../MTree/*.h ../MTree/*.cpp ../MTree/*.txt ../MTree/makefile ../MTree/*.spec ../MTree/*examples ../MTree/*.pdf ../MTree/MT1 ../MTree/*docu mTree
|
||
|
|
cp ../XTree/*.h ../XTree/*.cpp ../XTree/makefile ../XTree/*.spec ../XTree/*examples ../XTree/*.pdf ../XTree/XT1 ../XTree/*docu xTree
|
||
|
|
cp copyright.txt genTree
|
||
|
|
cp copyright.txt mTree
|
||
|
|
cp copyright.txt xTree
|
||
|
|
rm -f GenTree.zip
|
||
|
|
zip -r GenTree.zip genTree xTree mTree SecondoExtension.xml
|
||
|
|
rm -rf genTree mTree xTree
|
||
|
|
|
||
|
|
.PHONY: cleanplugin
|
||
|
|
cleanplugin:
|
||
|
|
rm -rf genTree mTree xTree GenTree.zip
|
||
|
|
|
||
|
|
|