diff --git a/.gitignore b/.gitignore index 05f2931f..8bf885da 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ Makefile +!src/math/Makefile +!src/util/Makefile *.cfg diff --git a/src/math/Makefile b/src/math/Makefile new file mode 100644 index 00000000..950aaadb --- /dev/null +++ b/src/math/Makefile @@ -0,0 +1,59 @@ +#================================================================================================== +# +# Makefile for the math module of the Blaze library +# +# Copyright (C) 2011 Klaus Iglberger - All Rights Reserved +# +# This file is part of the Blaze library. This library 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 3, 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License along with a special +# exception for linking and compiling against the Blaze library, the so-called "runtime +# exception"; see the file COPYING. If not, see http://www.gnu.org/licenses/. +# +#================================================================================================== + + +# Module +MODULE = MATH + + +# Includes +CXXFLAGS += -I$(INSTALL_PATH) +ifneq ($(BOOST_INCLUDE_PATH),) +CXXFLAGS += -isystem $(BOOST_INCLUDE_PATH) +endif + + +# Setting the source, object and dependency files +SRC = $(wildcard ./solvers/*.cpp) +OBJ = $(SRC:.cpp=.o) +DEP = $(SRC:.cpp=.d) + + +# Rules +default: $(OBJ) + @$(foreach dir,$(OBJ),cp -p $(dir) $(OBJECT_PATH)/$(MODULE)_$(notdir $(dir));) + +clean: + @$(RM) $(OBJ) $(DEP) + + +# Makefile includes +ifneq ($(MAKECMDGOALS),clean) +-include $(DEP) +endif + + +# Makefile generation +%.d: %.cpp + @$(CXX) -MM -MP -MT "$*.o $*.d" -MF $@ $(CXXFLAGS) $< + + +# Setting the independent commands +.PHONY: default clean diff --git a/src/util/Makefile b/src/util/Makefile new file mode 100644 index 00000000..96c10b70 --- /dev/null +++ b/src/util/Makefile @@ -0,0 +1,59 @@ +#================================================================================================== +# +# Makefile for the utility module of the Blaze library +# +# Copyright (C) 2011 Klaus Iglberger - All Rights Reserved +# +# This file is part of the Blaze library. This library 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 3, 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License along with a special +# exception for linking and compiling against the Blaze library, the so-called "runtime +# exception"; see the file COPYING. If not, see http://www.gnu.org/licenses/. +# +#================================================================================================== + + +# Module +MODULE = UTIL + + +# Includes +CXXFLAGS += -I$(INSTALL_PATH) +ifneq ($(BOOST_INCLUDE_PATH),) +CXXFLAGS += -isystem $(BOOST_INCLUDE_PATH) +endif + + +# Setting the source, object and dependency files +SRC = $(wildcard ./*.cpp ./logging/*.cpp ./threadpool/*.cpp) +OBJ = $(SRC:.cpp=.o) +DEP = $(SRC:.cpp=.d) + + +# Rules +default: $(OBJ) + @$(foreach dir,$(OBJ),cp -p $(dir) $(OBJECT_PATH)/$(MODULE)_$(notdir $(dir));) + +clean: + @$(RM) $(OBJ) $(DEP) + + +# Makefile includes +ifneq ($(MAKECMDGOALS),clean) +-include $(DEP) +endif + + +# Makefile generation +%.d: %.cpp + @$(CXX) -MM -MP -MT "$*.o $*.d" -MF $@ $(CXXFLAGS) $< + + +# Setting the independent commands +.PHONY: default clean