[430] | 1 | # | |
---|
| 2 | # o---------------------------------------------------------------------o |
---|
| 3 | # | |
---|
| 4 | # | MAD makefile |
---|
| 5 | # | |
---|
| 6 | # o---------------------------------------------------------------------o |
---|
| 7 | # | |
---|
| 8 | # | Methodical Accelerator Design |
---|
| 9 | # | |
---|
| 10 | # | Copyright (c) 2011+ CERN, mad@cern.ch |
---|
| 11 | # | |
---|
| 12 | # | For more information, see http://cern.ch/mad |
---|
| 13 | # | |
---|
| 14 | # o---------------------------------------------------------------------o |
---|
| 15 | # | |
---|
| 16 | # | $Id$ |
---|
| 17 | # | |
---|
| 18 | |
---|
| 19 | # For makefile documentation, please read make/README |
---|
| 20 | # For information and bug report, please contact mad@cern.ch |
---|
| 21 | # |
---|
| 22 | # See below for examples of using madx Makefile (see also make/README): |
---|
| 23 | # - toggle yes/no flags to set up your configuration |
---|
| 24 | # - by default madx uses the fortran compiler for linking (i.e. LD = FC) |
---|
| 25 | # - note that gfortran 4.4 or higher is required to compile madx |
---|
| 26 | |
---|
| 27 | # clean all build files generated by Lahey 32 bits compiler for madx32 |
---|
| 28 | # - depends on OSTYPE (detected), FC and ARCH !!! |
---|
| 29 | # make FC=lf95 ARCH=32 cleanall |
---|
| 30 | |
---|
| 31 | # show all the infomation collected by the makefile for Intel 64 bits compilers |
---|
| 32 | # - depends on user setup, ARCH is detected !!! |
---|
| 33 | # make CC=icc FC=ifort infoall |
---|
| 34 | |
---|
| 35 | # use complilers famillies shortcuts (default GNU=yes) |
---|
| 36 | # make GNU=yes infoall (equiv. to CC=gcc CXX=g++ FC=gfortran LD=gfortran) |
---|
| 37 | # make Intel=yes infoall (equiv. to CC=icc CXX=icc FC=ifort LD=ifort on Unix) |
---|
| 38 | # make Intel=yes infoall (equiv. to CC=icl CXX=icl FC=ifort LD=ifort on Windows) |
---|
| 39 | |
---|
| 40 | # build madx32 static online version for debug using Nag fortran compiler/linker |
---|
| 41 | # make FC=nagfor ARCH=32 STATIC=yes ONLINE=yes DEBUG=yes |
---|
| 42 | |
---|
| 43 | # build madx64 online version using Intel ifort compiler/linker and show commands |
---|
| 44 | # make FC=ifort ONLINE=yes SHOW=yes |
---|
| 45 | |
---|
| 46 | # build madx32 static online version using gfortran44 as compiler/linker |
---|
| 47 | # make FC=gfortran44 FCNAME=gfortran ARCH=32 STATIC=yes ONLINE=yes |
---|
| 48 | |
---|
| 49 | ################### |
---|
| 50 | # Project settings |
---|
| 51 | |
---|
| 52 | PROJECT := madx |
---|
| 53 | |
---|
| 54 | # online version - includes SDDS I/O: yes/no (default is no) |
---|
| 55 | ONLINE := no |
---|
| 56 | |
---|
| 57 | # alternative DA package: yes/no (default is yes) |
---|
| 58 | NTPSA := yes |
---|
| 59 | |
---|
| 60 | # memory leaks debug: yes/no (default is no) |
---|
| 61 | MEMLEAKS := no |
---|
| 62 | |
---|
| 63 | ################# |
---|
| 64 | # Build settings |
---|
| 65 | # |
---|
| 66 | |
---|
| 67 | # architecture bit: detect/32/64 (default is detect) |
---|
| 68 | ARCH := detect |
---|
| 69 | |
---|
| 70 | # debugging mode: yes/no (default is no) |
---|
| 71 | DEBUG := no |
---|
| 72 | |
---|
| 73 | # profiling mode: yes/no (default is no) |
---|
| 74 | PROFILE := no |
---|
| 75 | |
---|
| 76 | # link with static libs: yes/no (default is no) |
---|
| 77 | STATIC := no |
---|
| 78 | |
---|
| 79 | # plugin dynamic loading: yes/no (default is no) |
---|
| 80 | PLUGIN := no |
---|
| 81 | |
---|
| 82 | ############################# |
---|
| 83 | # Compilers, Linkers, Testers settings |
---|
| 84 | # see make/compiler.* for supported compilers |
---|
| 85 | # GNU=yes sets CC=gcc, CXX=g++, FC=gfortran (default) |
---|
| 86 | # Intel=yes sets CC=icc/icl, CXX=icc/icl, FC=ifort (use icl on Windows) |
---|
| 87 | |
---|
| 88 | # C compiler (default is gcc) |
---|
| 89 | CC := gcc |
---|
| 90 | |
---|
| 91 | # C++ compiler (default is g++) |
---|
| 92 | CXX := g++ |
---|
| 93 | |
---|
| 94 | # Fortran compiler (default is gfortran) |
---|
| 95 | FC := gfortran |
---|
| 96 | |
---|
| 97 | # Linker (default is Fortran compiler, deferred) |
---|
| 98 | LD = $(FC) |
---|
| 99 | |
---|
| 100 | # Tester (default is numdiff) |
---|
| 101 | ND := numdiff |
---|
| 102 | |
---|
| 103 | #################### |
---|
| 104 | # Includes settings |
---|
| 105 | |
---|
| 106 | # makefiles to include (in this order, all optional, here are default names) |
---|
| 107 | FILE_PRE := Makefile_pre # user's preprocessing extra stuff |
---|
| 108 | FILE_VER := VERSION # setup project VERSION and VERSION_DATE |
---|
| 109 | FILE_CPP := Makefile_cpp # setup project specific CPPFLAGS defines |
---|
| 110 | FILE_C := Makefile_c # setup project CC_SRC and CC_HDR |
---|
| 111 | FILE_CXX := Makefile_cxx # setup project CXX_SRC and CXX_HDR |
---|
| 112 | FILE_F90 := Makefile_f90 # setup project FC_SRC |
---|
| 113 | FILE_LIB := Makefile_lib # setup project LIBS paths and libs |
---|
| 114 | FILE_SYS := Makefile_sys # setup project System specific stuffs |
---|
| 115 | FILE_TEST := Makefile_test # setup project tests |
---|
| 116 | FILE_POST := Makefile_post # user's postprocessing extra stuff |
---|
| 117 | |
---|
| 118 | #################### |
---|
| 119 | # Makefile includes |
---|
| 120 | |
---|
| 121 | makedir := make |
---|
| 122 | include $(makedir)/make.inc |
---|
| 123 | |
---|
| 124 | # end of makefile |
---|