Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-10-17 22:59:08

0001 include ${SADIR}/Makefile.config
0002 
0003 CPPFLAGS := -I. -I${SRCDIR} -I../mkFit-external ${CPPFLAGS}
0004 
0005 CORE_DIR := ${SRCDIR}/RecoTracker/MkFitCore
0006 
0007 LIB_CORE := ../libMicCore.so
0008 
0009 TGTS := ${LIB_CORE}
0010 
0011 .PHONY: all clean distclean
0012 
0013 
0014 SRCS := $(wildcard ${CORE_DIR}/src/*.cc) \
0015                 $(wildcard ${CORE_DIR}/src/Matriplex/*.cc) \
0016                 $(wildcard ${SADIR}/*.cc)
0017 SRCB := $(notdir ${SRCS})
0018 DEPS := $(SRCB:.cc=.d)
0019 OBJS := $(SRCB:.cc=.o)
0020 
0021 vpath %.cc ${CORE_DIR}/src ${CORE_DIR}/src/Matriplex ${SADIR}
0022 
0023 AUTO_TGTS :=
0024 
0025 # Begin ROOT dumpers
0026 # XXX can remove, is var empty if undefined ????
0027 RNTD_OBJS :=
0028 
0029 ifdef WITH_ROOT
0030 
0031 LIB_RNTDUMP := ../libMicRntDump.so
0032 RNTDUMP_DICT_PCM := ../MicRntDumpDict_rdict.pcm
0033 
0034 RNTD_SRCS := $(wildcard ${SADIR}/RntDumper/*.cc)
0035 RNTD_SRCB := $(notdir ${RNTD_SRCS})
0036 RNTD_OBJS := $(RNTD_SRCB:.cc=.o)
0037 DEPS += $(RNTD_SRCB:.cc=.d)
0038 TGTS += ${LIB_RNTDUMP}
0039 
0040 #LIB_CORE_DEPS := ${LIB_RNTDUMP}
0041 #LIB_CORE_LD_EXTRA := -L.. -lMicRntDump
0042 
0043 vpath %.cc ${SADIR}/RntDumper
0044 
0045 endif
0046 # End ROOT dumpers
0047 
0048 all: ${TGTS}
0049 
0050 # Begin Matriplex
0051 
0052 auto-matriplex:
0053 ### Matriplex auto-generated fragments are included in source.
0054 ###     ${MAKE} -f ${CORE_DIR}/src/Matriplex auto && touch $@
0055         touch $@
0056 
0057 AUTO_TGTS += auto-matriplex
0058 
0059 ${DEPS}: auto-matriplex
0060 
0061 # End Matriplex
0062 
0063 ifeq ($(filter clean-local clean distclean, ${MAKECMDGOALS}),)
0064 include ${DEPS}
0065 endif
0066 
0067 clean-local:
0068         -rm -f ${TGTS} *.d *.o *.om *.so
0069         -rm -rf MicRntDumpDict.cc auto-matriplex main.dSYM
0070         -rm -rf plotting/*.so plotting/*.d plotting/*.pcm
0071 
0072 clean: clean-local
0073 
0074 distclean: clean-local
0075         -rm -f ${AUTO_TGTS}
0076         -rm -f *.optrpt
0077         -rm -f ${LIB_CORE}
0078 ###     cd Matriplex && ${MAKE} distclean
0079 
0080 ${LIB_CORE}: ${OBJS} ${LIB_RNTDUMP}
0081         @mkdir -p $(@D)
0082         ${CXX} ${CXXFLAGS} ${VEC_HOST} ${OBJS} -shared -o $@ ${LDFLAGS_HOST} ${LDFLAGS} ${LIB_CORE_LD_EXTRA}
0083 
0084 ifdef WITH_ROOT
0085 ${LIB_RNTDUMP}: ${RNTD_OBJS} MicRntDumpDict.o
0086         ${CXX} ${CXXFLAGS} ${VEC_HOST} ${RNTD_OBJS} MicRntDumpDict.o -shared -o $@ ${LDFLAGS_HOST} ${LDFLAGS} -lROOTEve
0087 MicRntDumpDict.cc ${RNTDUMP_DICT_PCM} &: ${SADIR}/RntDumper/RntStructs.h ${SADIR}/RntDumper/RntStructs_Linkdef.h
0088         rootcling -I. -I${SRCDIR} -f MicRntDumpDict.cc ${SADIR}/RntDumper/RntStructs.h ${SADIR}/RntDumper/RntStructs_Linkdef.h
0089         mv MicRntDumpDict_rdict.pcm ${RNTDUMP_DICT_PCM}
0090 endif
0091 
0092 ${OBJS} ${RNTD_OBJS}: %.o: %.cc %.d
0093         ${CXX} ${CPPFLAGS} ${CXXFLAGS} ${VEC_HOST} -c -o $@ $<
0094 
0095 %.s: %.cc
0096         ${CXX} ${CPPFLAGS} ${CXXFLAGS} ${VEC_HOST} -S -o $@ $<
0097 
0098 %.d: %.cc
0099         ${MAKEDEPEND} -o $@ $<
0100 
0101 echo:
0102         @echo "CXX=${CXX}"
0103         @echo SRCS = ${SRCS}
0104         @echo DEPS = ${DEPS}
0105         @echo OBJS = ${OBJS}
0106         @echo RNTD_OBJS = ${RNTD_OBJS}
0107 
0108 echo_cc_defs:
0109         ${CXX} -dM -E -mavx2 - < /dev/null
0110 
0111 echo-srcs:
0112         @echo ${SRCS}
0113 
0114 echo-flags:
0115         @echo "CPPFLAGS=${CPPFLAGS}"
0116 
0117 echo-tbb:
0118         @echo "TBB_GCC=${TBB_GCC}, TBB_PREFIX=${TBB_PREFIX}, TBB_ROOT=${TBB_ROOT}"