diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..30ffdd833 --- /dev/null +++ b/Makefile @@ -0,0 +1,82 @@ +# Configuration options. +cc = not-set +cxx = not-set +prefix = not-set +shared = not-set +assert = not-set +verbose = not-set +doc = not-set +latex = not-set +build = not-set + +# Basically proxies everything to the builddir cmake. + +cputype = $(shell uname -m | sed "s/\\ /_/g") +systype = $(shell uname -s) + +BUILDDIR = build/$(systype)-$(cputype) + +# Process configuration options. +CONFIG_FLAGS = -DCMAKE_VERBOSE_MAKEFILE=0 +ifneq ($(assert), not-set) + CONFIG_FLAGS += -DNDEGUB=$(assert) +endif +ifneq ($(prefix), not-set) + CONFIG_FLAGS += -DCMAKE_INSTALL_PREFIX=$(prefix) +endif +ifneq ($(shared), not-set) + CONFIG_FLAGS += -DAKANTU_SHARED=$(shared) +endif +ifneq ($(verbose), not-set) + CONFIG_FLAGS += -DAKANTU_VERBOSE=$(verbose) +endif +ifneq ($(cxx), not-set) + CONFIG_FLAGS += -DCMAKE_CXX_COMPILER=$(cxx) +endif +ifneq ($(cc), not-set) + CONFIG_FLAGS += -DCMAKE_C_COMPILER=$(cc) +endif +ifneq ($(doc), not-set) + CONFIG_FLAGS += -DDOCUMENTATION=$(doc) +endif +ifneq ($(latex), not-set) + CONFIG_FLAGS += -DLaTeX=$(latex) +endif +ifneq ($(build), not-set) + CONFIG_FLAGS += -DCMAKE_BUILD_TYPE=$(build) +endif + + +define run-config +mkdir -p $(BUILDDIR) +cd $(BUILDDIR) && cmake $(CURDIR) $(CONFIG_FLAGS) +endef + +all clean install doc check examples package package_source depend edit_cache install/local install/strip list_install_components rebuild_cache a.out: + @if [ ! -f $(BUILDDIR)/Makefile ]; then \ + more README; \ + else \ + make -C $(BUILDDIR) $@ $(MAKEFLAGS); \ + fi + +test: + @if [ ! -f $(BUILDDIR)/Makefile ]; then \ + more README; \ + else \ + make -C $(BUILDDIR) check $(MAKEFLAGS); \ + fi + +uninstall: + xargs rm < $(BUILDDIR)/install_manifest.txt + +config: distclean + $(run-config) + +distclean: + rm -rf $(BUILDDIR) + +remake: + find . -name CMakeLists.txt -exec touch {} ';' + + +.PHONY: config distclean all clean install uninstall remake dist doc check examples package package_source depend edit_cache install/local install/strip list_install_components rebuild_cache a.out test \ No newline at end of file diff --git a/README b/README new file mode 100644 index 000000000..3ff49e496 --- /dev/null +++ b/README @@ -0,0 +1,59 @@ +=========================================== + _ _ + | | | | + __ _| | ____ _ _ __ | |_ _ _ + / _` | |/ / _` | '_ \| __| | | | + | (_| | < (_| | | | | |_| |_| | + \__,_|_|\_\__,_|_| |_|\__|\__,_| +=========================================== + +Copyright (©) 2010-2012 EPFL (Ecole Polytechnique Fédérale de Lausanne) +Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides) + +Akantu is free software: you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +Akantu 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 Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with Akantu. If not, see . + +_____________ +CONFIGURATION + +To configure with default options the library, type + + $ make config + +Several options can be added to the configure script, they include: + + - cc=[compiler] The C compiler used in cmake tests, default: gcc + - cxx=[compiler] The C++ compiler to use, default: g++ + - prefix=[path] Installation path, default: /usr/local + - shared=[bool] Build a shared library, default: true + - assert=[bool] Enable the assert macro, default: true + - doc=[bool] Configure to build the documentation, default: true + - build=[string] Build types: Debug, Release, RelWithDebInfo, MinSizeRel, + default: None + + +Authors : + + - Nicolas Richart + - Guillaume Anciaux + - David Kammer + - Leonardo Snozzi + - Peter Spijker + - Marion Chambart + - Alejandro M. Aragón + - Fabian Barras + - Alodie Schneuwly + - Alessandro D'amario + - Marco Vocialta + - Rui Wang + - Srinivasa Babu Ramisetti