Unverified Commit 94d1aa45 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

add "make mode=print <machine>" to print out compiler and linker flags and...

add "make mode=print <machine>" to print out compiler and linker flags and libs for any available makefile
parent 8a52e5db
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -247,6 +247,11 @@ ifeq ($(mode),shlib)
	@rm -f $(SHLINK)
	@ln -s $(SHLIB) $(SHLINK)
endif
ifeq ($(mode),print)
	@cd $(objdir); \
	$(MAKE) $(MFLAGS) "OBJ = $(OBJLIB)" "INC = $(INC)" \
	  "EXE = ../$(SHLIB)" -f ../Makefile.print
endif

# Remove machine-specific object files

src/Makefile.print

0 → 100644
+22 −0
Original line number Diff line number Diff line
# Makefile to allow printing current COMPILER/LINKER flags and settings

print: do-print

include Makefile

# get location of the LAMMPS tree
LMPDIR=$(shell echo $${PWD} | sed -e 's,/src/Obj_[+0-9a-z_-]\+$$,,')

do-print:
	@echo '# LAMMPS source tree is in:' $(LMPDIR)
	@echo '# Compiler: '
	@echo CXX=$(CC)
	@echo '# Linker: '
	@echo LD=$(LINK)
	@echo '# Compilation: '
	@echo CXXFLAGS=$(CCFLAGS) $(EXTRA_INC) | sed -e s,-I\\.\\./\\.\\./,-I${LMPDIR}/,g -e s,-I\\.\\./,-I${LMPDIR}/src/,g -e s,$(HOME),\\$$\\{HOME\\},g
	@echo '# Linking: '
	@echo LDFLAGS=$(LINKFLAGS)
	@echo '# Libraries: '
	@echo LDLIBS=$(EXTRA_PATH) $(EXTRA_LIB) $(LIB) | sed -e s,-L\\.\\./\\.\\./,-L${LMPDIR}/,g -e s,-L\\.\\./,-L${LMPDIR}/src/,g -e s,$(HOME),\\$$\\{HOME\\},g