forked from lijiext/lammps
add "make mode=print <machine>" to print out compiler and linker flags and libs for any available makefile
This commit is contained in:
parent
8a52e5dbe7
commit
94d1aa45bb
|
@ -247,6 +247,11 @@ ifeq ($(mode),shlib)
|
||||||
@rm -f $(SHLINK)
|
@rm -f $(SHLINK)
|
||||||
@ln -s $(SHLIB) $(SHLINK)
|
@ln -s $(SHLIB) $(SHLINK)
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(mode),print)
|
||||||
|
@cd $(objdir); \
|
||||||
|
$(MAKE) $(MFLAGS) "OBJ = $(OBJLIB)" "INC = $(INC)" \
|
||||||
|
"EXE = ../$(SHLIB)" -f ../Makefile.print
|
||||||
|
endif
|
||||||
|
|
||||||
# Remove machine-specific object files
|
# Remove machine-specific object files
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
# 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
|
||||||
|
|
Loading…
Reference in New Issue