Repository navigation
Expand file tree
/
Copy pathmakefile.algebra-common
More file actions
61 lines (54 loc) · 2.28 KB
/
Copy pathmakefile.algebra-common
File metadata and controls
61 lines (54 loc) · 2.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#This file is part of SECONDO.
#
#Copyright (C) 2004, 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
#
########################################################################
#
# The common body of an algebra makefile.
#
# Nearly every Algebras/<X>/makefile said exactly the same thing. A leaf now
# declares only what is specific to it and includes this file:
#
# CURRENT_ALGEBRA := FooAlgebra # enables the dependency check
# ALGEBRA_DEPENDENCIES := BarAlgebra # algebras Foo needs
# ALGEBRA_CCFLAGS += -DSOMETHING # extra compile flags
# include ../../makefile.algebra-common
#
# All of those are optional. Set them BEFORE the include -- makefile.env
# assigns CCFLAGS outright, so anything added to CCFLAGS before it is included
# would be lost; that is what ALGEBRA_CCFLAGS is for.
#
########################################################################
include $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))/makefile.env
CCFLAGS += -Werror
CCFLAGS += $(ALGEBRA_CCFLAGS)
# The values of OBJECTS and LIBOBJ are computed by makefile.env from the *.cpp
# in this directory and the directory name.
.PHONY: all
all: $(if $(ALGEBRA_DEPENDENCIES),check_dependencies) $(OBJECTS) $(LIBOBJ)
# Phony -- it names no file. It was declared in only one of the 68 makefiles
# that used to define it, so a stray file called "check_dependencies" would
# have silently disabled every algebra dependency check in the tree.
.PHONY: check_dependencies
check_dependencies:
$(check-algebra-dependencies)
$(LIBOBJ): $(OBJECTS)
$(create-lib)
.PHONY: clean
clean:
$(clean-algebra)