Files

83 lines
2.8 KiB
Makefile
Raw Permalink Normal View History

2026-01-23 17:03:45 +08:00
#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 Constraint Algebra C++
#
########################################################################
# July 2006 Simon Muerner
# include global definitions
include ../../makefile.env
# This is the only macro which must be changed in order to
# define a module name for an algebra. The rest of this makefile
# should work for nearly every algebra.
MODNAME = ConstraintAlgebra
# Use the mace CCFLAGS to add special compiler flags if needed.
# In this case the defaults are sufficient
CCFLAGS +=
# 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: TRIA $(OBJECTS) $(LIBOBJ)
# 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)
.PHONY: TRIA
TRIA:
$(MAKE) -C triangulation
TRIAOBJECTS = triangulation/construct.o triangulation/misc.o triangulation/monotone.o triangulation/tri.o
# 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) TRIA
ifeq ($(shared),yes)
# ... as shared object
$(LD) $(LDFLAGS) -o $(LIBOBJ) $(LDOPT) $(OBJECTS) $(TRIAOBJECTS) -L$(LIBDIR) -lStandardAlgebra $(SDBLIB) $(TOOLLIB) $(DEFAULTLIB)
else
# ... as static library
$(AR) -r $(LIBOBJ) $(OBJECTS) $(TRIAOBJECTS)
endif
# remove all generated stuff
.PHONY: clean
clean:
$(RM) $(DEP_FILES) $(OBJECTS) $(LIBOBJ)
$(MAKE) -C triangulation clean