Commit acb4c63c authored by Jan Zapletal's avatar Jan Zapletal

MAINT: cleanup into src and include

parent b55b1150
HEATDTN_LIB_PATH=../dist/
HEATDTN_INC_PATH=../
HEATDTN_LIB_PATH=../dist
HEATDTN_INC_PATH=../include
#CXX=icpc
#CXXFLAGS=-qopenmp -O3 -g -std=c++11 -w2 -I${HEATDTN_INC_PATH}
#LDLIBSOPTIONS=-qopenmp -L${MKLROOT}/lib/intel64 -Wl,-rpath,'${MKLROOT}/lib/intel64' -lmkl_intel_lp64 -lmkl_core -lmkl_intel_thread -L${HEATDTN_LIB_PATH} -Wl,-rpath,'${HEATDTN_LIB_PATH}' -lheatdtn
CXX=g++
CXXFLAGS=-fopenmp -O3 -g -std=c++11 -Wall -I${MKLROOT}/include -I${HEATDTN_INC_PATH}
CXXFLAGS=-fopenmp -O3 -g -std=c++11 -Wall -I${HEATDTN_INC_PATH}
LDLIBSOPTIONS=-fopenmp -L${MKLROOT}/lib/intel64 -Wl,-rpath,'${MKLROOT}/lib/intel64' -lmkl_intel_lp64 -lmkl_core -lmkl_gnu_thread -L${HEATDTN_LIB_PATH} -Wl,-rpath,'${HEATDTN_LIB_PATH}' -lheatdtn
#########################DO NOT MODIFY BELOW THIS LINE##########################
......@@ -16,15 +16,17 @@ COMPILELINE=${CXX} ${CXXFLAGS} -c
OBJECTDIR=build
CXXFILES=$(wildcard *.cpp)
FILES=$(notdir $(wildcard src/*.cpp))
OBJECTFILES=$(addprefix ${OBJECTDIR}/,$(CXXFILES:.cpp=.o))
CXXFILES=$(addprefix src/,${FILES})
OBJECTFILES=$(addprefix ${OBJECTDIR}/,$(FILES:.cpp=.o))
build: ${OBJECTFILES}
mkdir -p dist
$(CXX) -o dist/testHeatDtN ${OBJECTFILES} ${LDLIBSOPTIONS}
${OBJECTDIR}/%.o: %.cpp
${OBJECTDIR}/%.o: src/%.cpp
mkdir -p ${OBJECTDIR}
rm -f "$@.d"
${COMPILELINE} -MMD -MP -MF "$@.d" -o $@ $<
......
......@@ -12,19 +12,21 @@ LDLIBSOPTIONS=-fopenmp -L${MKLROOT}/lib/intel64 -Wl,-rpath,'${MKLROOT}/lib/intel
#########################DO NOT MODIFY BELOW THIS LINE##########################
################################################################################
COMPILELINE=${CXX} ${CXXFLAGS} -c
COMPILELINE=${CXX} ${CXXFLAGS} -I./include -I./src -c
OBJECTDIR=build
CXXFILES=$(wildcard *.cpp)
FILES=$(notdir $(wildcard src/*.cpp))
OBJECTFILES=$(addprefix ${OBJECTDIR}/,$(CXXFILES:.cpp=.o))
CXXFILES=$(addprefix src/,${FILES})
OBJECTFILES=$(addprefix ${OBJECTDIR}/,$(FILES:.cpp=.o))
build: ${OBJECTFILES}
mkdir -p dist
$(CXX) -o dist/libheatdtn.so ${OBJECTFILES} ${LDLIBSOPTIONS} -shared -fPIC
${OBJECTDIR}/%.o: %.cpp
${OBJECTDIR}/%.o: src/%.cpp
mkdir -p ${OBJECTDIR}
rm -f "$@.d"
${COMPILELINE} -fPIC -MMD -MP -MF "$@.d" -o $@ $<
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment