Makefile.mfront 1.51 KB
Newer Older
1 2
# Makefile generated by mfront.
# tfel
3
# Version : 3.3.0
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
# Compiled with  on  - 
# Please submit bug at tfel-contact@cea.fr

export LD_LIBRARY_PATH:=$(PWD):$(LD_LIBRARY_PATH)

INCLUDES := -I../include \
	     $(shell tfel-config --cppflags --compiler-flags) \
	     -I"$(strip $(shell tfel-config --include-path))"

CXXFLAGS := -Wall -Wfatal-errors -ansi $(shell tfel-config --oflags) -fPIC $(INCLUDES) 

SRCCXX = IsotropicLinearHardeningPlasticity-generic.cxx IsotropicLinearHardeningPlasticity.cxx LogarithmicStrainPlasticity-generic.cxx LogarithmicStrainPlasticity.cxx

makefiles1 = $(SRCCXX:.cxx=.d)
makefiles2 = $(makefiles1:.cpp=.d)
makefiles  = $(makefiles2)

.PHONY = all install clean libBehaviour.so

all : libBehaviour.so 

25
libBehaviour.so : IsotropicLinearHardeningPlasticity-generic.o IsotropicLinearHardeningPlasticity.o LogarithmicStrainPlasticity-generic.o LogarithmicStrainPlasticity.o 
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
	@$(CXX) -shared $^  -o $@ -L"$(strip $(shell tfel-config --library-path))" $(patsubst %,-l%,$(shell tfel-config --library-dependency --material --mfront-profiling --physical-constants)) 

install : 

clean : 
	@rm -f *.o *.so *.d *.d.*

-include $(makefiles)

%.o:%.cxx
	@$(CXX) $(CXXFLAGS) $< -o $@ -c

%.o:%.cpp
	@$(CXX) $(CXXFLAGS) $< -o $@ -c

%.d:%.cxx
	@set -e; rm -f $@;	    \
	$(CXX) -M $(CXXFLAGS) $< > $@.$$$$; \
	sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
	rm -f $@.$$$$

%.d:%.cpp
	@set -e; rm -f $@;       \
	$(CXX) -M $(CXXFLAGS) $< > $@.$$$$; \
	sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
	rm -f $@.$$$$