@@ -138,10 +138,11 @@ VALID_OPTS := DEBUG DEBUGFULL FFT_TEMPERTON PRECISE_TIMING NOT_USE_LOCK ONLY_LOC
138138# in later versions of CUDA and/or icc.
139139COMPILER := gnu
140140
141- # Additional options for compiler. For instance, one may use -m32 to force 32 bit compilation in 64
142- # bit environment. Flags specified below are appended to the ones specified in the environment or
143- # command line of make (see explanation above for OPTIONS). The same value is used for all
144- # programming languages to be compiled.
141+ # Additional options for compiler. Flags specified below are appended to the ones specified in the
142+ # environment or command line of make (see explanation above for OPTIONS). The same value is used
143+ # for all programming languages to be compiled and for linker.
144+ # In particular, "-m32" may be used to force 32 bit compilation in 64 bit environment. However, it
145+ # also requires proper libraries (especially, external ones, like FFTW3 or MPI) to be supplied.
145146override EXTRA_FLAGS +=
146147
147148# --FFTW3 paths--
@@ -274,6 +275,7 @@ ifneq ($(strip $(EXTRA_FLAGS)),)
274275 CFLAGS += $(EXTRA_FLAGS )
275276 FFLAGS += $(EXTRA_FLAGS )
276277 CPPFLAGS += $(EXTRA_FLAGS )
278+ LDFLAGS += $(EXTRA_FLAGS )
277279endif
278280
279281# By default Fortran anc C++ optimization options are the same as C, but specific options can be
@@ -425,12 +427,12 @@ clean: cleanseq cleanmpi cleanocl
425427# compilation and thus contain quite heavy processing.
426428cleanseq :
427429 @echo " Removing sequential compiled files"
428- cd $(SEQ ) && rm -f * .o * .d $(OPTSFILES ) $(PROGSEQ ) $(PROGSEQ ) .exe
430+ cd $(SEQ ) && rm -f * .o * .d * .d. * $(OPTSFILES ) $(PROGSEQ ) $(PROGSEQ ) .exe
429431
430432cleanmpi :
431433 @echo " Removing MPI compiled files"
432- cd $(MPI ) && rm -f * .o * .d $(OPTSFILES ) $(PROGMPI ) $(PROGMPI ) .exe
434+ cd $(MPI ) && rm -f * .o * .d * .d. * $(OPTSFILES ) $(PROGMPI ) $(PROGMPI ) .exe
433435
434436cleanocl :
435437 @echo " Removing OpenCL compiled files"
436- cd $(OCL ) && rm -f * .o * .d $(OPTSFILES ) $(PROGOCL ) $(PROGOCL ) .exe * .clstr
438+ cd $(OCL ) && rm -f * .o * .d * .d. * $(OPTSFILES ) $(PROGOCL ) $(PROGOCL ) .exe * .clstr
0 commit comments