Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-11-04 00:02:33

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 
0088 MicRntDumpDict.cc ${RNTDUMP_DICT_PCM} &: ${SADIR}/RntDumper/RntStructs.h ${SADIR}/RntDumper/RntStructs_Linkdef.h
0089         rootcling -I. -I${SRCDIR} -f MicRntDumpDict.cc ${SADIR}/RntDumper/RntStructs.h ${SADIR}/RntDumper/RntStructs_Linkdef.h
0090         mv MicRntDumpDict_rdict.pcm ${RNTDUMP_DICT_PCM}
0091 endif
0092 
0093 ${OBJS} ${RNTD_OBJS}: %.o: %.cc %.d
0094         ${CXX} ${CPPFLAGS} ${CXXFLAGS} ${VEC_HOST} -c -o $@ $<
0095 
0096 %.s: %.cc
0097         ${CXX} ${CPPFLAGS} ${CXXFLAGS} ${VEC_HOST} -S -o $@ $<
0098 
0099 %.d: %.cc
0100         ${MAKEDEPEND} -o $@ $<
0101 
0102 echo:
0103         @echo "CXX=${CXX}"
0104         @echo SRCS = ${SRCS}
0105         @echo DEPS = ${DEPS}
0106         @echo OBJS = ${OBJS}
0107         @echo RNTD_OBJS = ${RNTD_OBJS}
0108 
0109 echo_cc_defs:
0110         ${CXX} -dM -E -mavx2 - < /dev/null
0111 
0112 echo-srcs:
0113         @echo ${SRCS}
0114 
0115 echo-flags:
0116         @echo "CPPFLAGS=${CPPFLAGS}"
0117 
0118 echo-tbb:
0119         @echo "TBB_GCC=${TBB_GCC}, TBB_PREFIX=${TBB_PREFIX}, TBB_ROOT=${TBB_ROOT}"