1#==================================================================================================
2#
3#  Makefile for the rowtrait module of the Blaze test suite
4#
5#  Copyright (C) 2012-2020 Klaus Iglberger - All Rights Reserved - All Rights Reserved
6#
7#  This file is part of the Blaze library. You can redistribute it and/or modify it under
8#  the terms of the New (Revised) BSD License. Redistribution and use in source and binary
9#  forms, with or without modification, are permitted provided that the following conditions
10#  are met:
11#
12#  1. Redistributions of source code must retain the above copyright notice, this list of
13#     conditions and the following disclaimer.
14#  2. Redistributions in binary form must reproduce the above copyright notice, this list
15#     of conditions and the following disclaimer in the documentation and/or other materials
16#     provided with the distribution.
17#  3. Neither the names of the Blaze development group nor the names of its contributors
18#     may be used to endorse or promote products derived from this software without specific
19#     prior written permission.
20#
21#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
22#  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23#  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
24#  SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25#  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
26#  TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
27#  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28#  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
29#  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
30#  DAMAGE.
31#
32#==================================================================================================
33
34
35# Including the compiler and library settings
36ifneq ($(MAKECMDGOALS),reset)
37ifneq ($(MAKECMDGOALS),clean)
38-include ../../../Makeconfig
39endif
40endif
41
42
43# Setting the source, object and dependency files
44SRC = $(wildcard ./*.cpp)
45DEP = $(SRC:.cpp=.d)
46OBJ = $(SRC:.cpp=.o)
47BIN = $(SRC:.cpp=)
48
49
50# General rules
51default: all
52all: $(BIN)
53essential: $(BIN)
54single: $(BIN)
55
56
57# Build rules
58ClassTest: ClassTest.o
59	@$(CXX) $(CXXFLAGS) -o $@ $< $(LIBRARIES)
60
61
62# Cleanup
63reset:
64	@$(RM) $(OBJ) $(BIN)
65clean:
66	@$(RM) $(OBJ) $(BIN) $(DEP)
67
68
69# Makefile includes
70ifneq ($(MAKECMDGOALS),reset)
71ifneq ($(MAKECMDGOALS),clean)
72-include $(DEP)
73endif
74endif
75
76
77# Makefile generation
78%.d: %.cpp
79	@$(CXX) -MM -MP -MT "$*.o $*.d" -MF $@ $(CXXFLAGS) $<
80
81
82# Setting the independent commands
83.PHONY: default all essential single reset clean
84