Commits

Lisandro Dalcin  committed ed181ec

Improve makefile targets related to CMake support

  • Participants
  • Parent commits 1dfaed0

Comments (0)

Files changed (1)

 ${PETIGA_DIR}/${PETSC_ARCH}/CMakeCache.txt:
 	@${MKDIR} ${PETIGA_DIR}/${PETSC_ARCH}/conf
 	@cd ${PETIGA_DIR}/${PETSC_ARCH} && ${CMAKE} ${PETIGA_DIR} ${cmake_cc} ${cmake_fc} 2>&1 > ${PETIGA_DIR}/${PETSC_ARCH}/conf/cmake.log
-all-cmake: ${PETIGA_DIR}/${PETSC_ARCH}/CMakeCache.txt
-	@cd ${PETIGA_DIR}/${PETSC_ARCH} && ${OMAKE} -j ${MAKE_NP} 2>&1 | tee ${PETIGA_DIR}/${PETSC_ARCH}/conf/make.log
+cmake-boot: ${PETIGA_DIR}/${PETSC_ARCH}/CMakeCache.txt
+cmake-build: cmake-boot
+	@cd ${PETIGA_DIR}/${PETSC_ARCH} && ${OMAKE} -j ${MAKE_NP} 2>&1
+all-cmake:
+	@${OMAKE} cmake-build PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} PETIGA_DIR=${PETIGA_DIR} 2>&1 | tee ./${PETSC_ARCH}/conf/make.log
 all-legacy:
-	-@${MKDIR} ${PETSC_ARCH}/conf
-	-@${MKDIR} ${PETSC_ARCH}/include ${PETSC_ARCH}/lib
-	-@${OMAKE} all_build PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} PETIGA_DIR=${PETIGA_DIR} 2>&1 | tee ./${PETSC_ARCH}/conf/make.log
+	@${MKDIR} ${PETSC_ARCH}/conf ${PETSC_ARCH}/include ${PETSC_ARCH}/lib
+	@${OMAKE} all_build PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} PETIGA_DIR=${PETIGA_DIR} 2>&1 | tee ./${PETSC_ARCH}/conf/make.log
+	@${MV} -f ${PETIGA_DIR}/src/petiga*.mod ${PETIGA_DIR}/${PETSC_ARCH}/include
 all_build: chk_petsc_dir chk_petiga_dir chklib_dir deletelibs deletemods build sharedlibs
-.PHONY: all all-cmake all-legacy all_build
+.PHONY: all cmake-boot cmake-build all-cmake all-legacy all_build
 
 #
 # Check if PETSC_DIR variable specified is valid