Skip to content
Snippets Groups Projects
Commit 0fe0df03 authored by nadolski's avatar nadolski
Browse files

Simplification des makefile avec automake

parent ae58a5d5
No related branches found
No related tags found
No related merge requests found
......@@ -4,4 +4,4 @@ libTPSALib_a_SOURCES = TPSALib.f
libLieLib_a_SOURCES = LieLib.f
AM_FFLAGS = -g -O2 -Wall -fbounds-check -fPIC
AM_FFLAGS = -fPIC
# Process this file with autoconf to produce a configure script.
#AC_INIT(tracy/src/t2elem.cc)
AC_INIT([Tracy], [3.0], [nadolski@synchrotron-soleil.fr])
# Set auxilliary directory for config files
AC_CONFIG_AUX_DIR(config)
# Set system variables build host target
AC_CANONICAL_SYSTEM
#INIT AUTOMAKE
......@@ -9,7 +11,11 @@ AM_INIT_AUTOMAKE([-Wall])
# Configuration for autoconf
AC_CONFIG_SRCDIR([tracy/src/t2elem.cc])
AC_CONFIG_HEADER([config.h])
# Important header files
#AC_CONFIG_HEADER([config.h])
AC_HEADER_RESOLV
AC_CHECK_HEADERS([config.h sys/time.h malloc.h memory.h stdio.h stddef.h time.h])
# Checks for programs.
# Check for AWK
......@@ -27,9 +33,6 @@ AC_PROG_INSTALL
#Check for ln -s
AC_PROG_LN_S
#Check for make
AC_PROG_MAKE_SET
#Check for C preprocessor
AC_PROG_CPP
......@@ -56,6 +59,9 @@ AC_ARG_ENABLE([mpi_exec],
# Checks for libraries.
#AC_SEARCH_LIBS([mpi_init], [mpichcxx], [have_pthreads=yes])
# Force malloc(0) to be NULL pointer
AC_FUNC_MALLOC
# NR
#AC_SEARCH_LIBS([dsvbk], [recipes_c_icc])
......@@ -97,22 +103,22 @@ case $target_os in
#Define isei special compilers
if test "x$have_mpi" = xyes; then
# mpi compilers
AC_MSG_NOTICE([MPI compilation available for $HOSTNAME])
AC_MSG_NOTICE([MPI compilation available for $HOSTNAME])
CC=mpiicc
F77=mpiifort
CXX=mpiicpc
F77=mpiifort
CXX=mpiicpc
else
AC_MSG_NOTICE([Intel compilation for $HOSTNAME])
AC_MSG_NOTICE([Intel compilation for $HOSTNAME])
CC=icc
F77=ifort
CXX=icpc
F77=ifort
CXX=icpc
fi
fi;;
apple-darwin);;
#INSTALL-DATA-EXEC=$(HOME)/bin
*)
CC=gcc;;
esac
......
#Per-Makefile Option Variables
#AM_FFLAGS = -O2 -Wall -fbounds-check
#AM_CXXFLAGS = -O2 -Wall -fno-implicit-templates
AM_CPPFLAGS = -I$(top_srcdir)/tracy/inc -I$(NUM_REC)/inc
bin_PROGRAMS = soltracy #for single cpu
bin_PROGRAMS = soltracy #main code: single or parallel
#max4_SOURCES = max4.cc nrutil.c nrcheck.c nrlinwww.c nrframe.c
soltracy_SOURCES = soltracy.cc nrutil.c nrcheck.c nrlinwww.c nrframe.c ../tracy/src/tracy_lib.cc
LIBS = -L$(NUM_REC)/lib -lrecipes_c_gcc
soltracy_LDADD = -L$(NUM_REC)/lib -lrecipes_c_gcc
# test factory
check_SCRIPTS = soltracy_demo1.sh soltracy_demo2.sh
......@@ -16,27 +12,20 @@ TESTS = $(check_SCRIPTS)
demodir=demo
soltracy_demo1.sh:
soltracy_demo1.sh: $(bin_PROGRAMS)
echo "cd $(demodir)/demo1; ../../soltracy Input_demo1.prm;" > soltracy_demo1.sh
chmod +x soltracy_demo1.sh
soltracy_demo2.sh:
soltracy_demo2.sh: $(bin_PROGRAMS)
echo "cd $(demodir)/demo2; ../../soltracy Input_demo2.prm;" > soltracy_demo2.sh
chmod +x soltracy_demo2.sh
#CLEANING
CLEANFILES = $(check_SCRIPTS)
# -I/opt/intel/impi/3.2.2.006/include64
#LIBS = -L$(NUM_REC)/lib -lrecipes_c_icc \
# -lstdc++ -L$(LIBPATH) -lgfortran
# -L$(LIBPATH)
#-lmpichcxx -lgfortran -lstdc++ -L/opt/intel/impi/3.2.2.006/lib64
#INCLUDES = -I$(TRACY_LIB)/tracy/inc -I$(NUM_REC)/inc
clean-local:
-rm -rf $(demodir)/*.lax
-rm -rf $(demodir)/demo1/*.out
-rm -rf $(demodir)/demo1/*.dat
-rm -rf $(demodir)/demo2/*.out
-rm -rf $(demodir)/demo2/*.dat
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment