Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-04-07 05:53:41

0001 include ${SADIR}/Makefile.config
0002 
0003 CPPFLAGS := -I. -I${SRCDIR} -I../mkFit-external ${CPPFLAGS}
0004 
0005 CMS_DIR := ${SRCDIR}/RecoTracker/MkFitCMS
0006 
0007 LIB_CMS := ../libMicCMS.so
0008 MAIN    := ../mkFit
0009 WRMEMF  := ../writeMemoryFile
0010 
0011 TGTS := ${LIB_CMS} ${MAIN}
0012 ifdef WITH_ROOT
0013 TGTS += ${WRMEMF}
0014 endif
0015 
0016 .PHONY: all clean distclean
0017 
0018 all: ${TGTS}
0019 
0020 SRCS := $(wildcard ${CMS_DIR}/src/*.cc) $(wildcard ${SACMS}/*.cc)
0021 ifdef WITH_ROOT
0022 SRCS += ${SACMS}/tkNtuple/WriteMemoryFile.cc
0023 endif
0024 SRCB := $(notdir ${SRCS})
0025 DEPS := $(SRCB:.cc=.d)
0026 OBJS := $(SRCB:.cc=.o)
0027 
0028 CMS_OBJS := $(filter-out mkFit.o WriteMemoryFile.o, ${OBJS})
0029 
0030 vpath %.cc ${CMS_DIR}/src ${SACMS} ${SACMS}/tkNtuple
0031 
0032 ifeq ($(filter clean-local clean distclean, ${MAKECMDGOALS}),)
0033 include ${DEPS}
0034 endif
0035 
0036 clean-local:
0037         -rm -f ${TGTS} *.d *.o *.om *.so
0038         -rm -rf main.dSYM
0039         -rm -rf plotting/*.so plotting/*.d plotting/*.pcm
0040 
0041 clean: clean-local
0042 
0043 distclean: clean-local
0044         -rm -f *.optrpt
0045         -rm -f ${TGTS}
0046 
0047 ${LIB_CMS}: ${CMS_OBJS}
0048         @mkdir -p $(@D)
0049         ${CXX} ${CXXFLAGS} ${VEC_HOST} ${CMS_OBJS} -shared -o $@ ${LDFLAGS_HOST} ${LDFLAGS}
0050 
0051 ${MAIN}: ${LIB_CMS} mkFit.o
0052         ${CXX} ${CXXFLAGS} ${VEC_HOST} ${LDFLAGS} mkFit.o -o $@ ${LDFLAGS_HOST} -ltbb -L.. -lMicCore -lMicCMS -Wl,-rpath=.
0053 
0054 ${WRMEMF}: WriteMemoryFile.o
0055         ${CXX} ${CXXFLAGS} ${LDFLAGS} $^ -o $@ ${LDFLAGS_HOST} -ltbb -L.. -lMicCore -Wl,-rpath=.
0056 
0057 ${OBJS}: %.o: %.cc %.d
0058         ${CXX} ${CPPFLAGS} ${CXXFLAGS} ${VEC_HOST} -c -o $@ $<
0059 
0060 %.d: %.cc
0061         ${MAKEDEPEND} -o $@ $<
0062 
0063 echo:
0064         @echo "CXX=${CXX}"
0065         @echo SRCS = ${SRCS}
0066         @echo DEPS = ${DEPS}
0067         @echo OBJS = ${OBJS}
0068 
0069 echo_cc_defs:
0070         ${CXX} -dM -E -mavx2 - < /dev/null
0071 
0072 echo-srcs:
0073         @echo ${SRCS}
0074 
0075 echo-flags:
0076         @echo "CPPFLAGS=${CPPFLAGS}"
0077 
0078 echo-tbb:
0079         @echo "TBB_GCC=${TBB_GCC}, TBB_PREFIX=${TBB_PREFIX}, TBB_ROOT=${TBB_ROOT}"