Makefile 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #========================================
  2. # Makefile for MpdRoot Analysis team
  3. # by V. Kireyeu and A. Mudrokh
  4. # v2017-04-18
  5. #
  6. # This Makefile uses for analysis script
  7. # compilation via the system compiler.
  8. # Please do not forget to run config.sh
  9. # script from MpdRoot build directory!!!
  10. # =======================================
  11. # Used compiler
  12. CC=g++
  13. # Makefile will proceed all files with .cc suffix
  14. # SOURCES=$(wildcard src/*.cc)
  15. # Output executable has the same name without suffix
  16. # OBJECTS=$(patsubst src/%.cc,%, $(SOURCES))
  17. #SOURCES=$(wildcard *.c)
  18. SOURCES=get_dca.c
  19. OBJECTS=$(patsubst %.c,%, $(SOURCES))
  20. ROOTCONFIG := root-config
  21. # Path to the MpdRoot installation
  22. MPDROOTDIR := /lustre/nyx/hades/user/parfenov/Soft/MPDROOT/mpdroot_dev_260719/
  23. FAIRINCDIR := $(shell $(ROOTCONFIG) --prefix)/include/
  24. FAIRROOTDIR := /lustre/nyx/hades/user/parfenov/Soft/FAIRROOT/fairroot_18_04
  25. CFLAGS := $(shell $(ROOTCONFIG) --cflags)
  26. CFLAGS += -I${FAIRROOTDIR}/install/include
  27. CFLAGS += -I$(FAIRROOTDIR)/base/event
  28. CFLAGS += -I$(FAIRROOTDIR)/base/source
  29. CFLAGS += -I$(FAIRROOTDIR)/base/steer
  30. CFLAGS += -I$(FAIRROOTDIR)/base/field
  31. CFLAGS += -I$(FAIRROOTDIR)/base/sim
  32. CFLAGS += -I$(FAIRROOTDIR)/geobase
  33. CFLAGS += -I$(MPDROOTDIR)/tpc
  34. CFLAGS += -I$(MPDROOTDIR)/kalman
  35. CFLAGS += -I$(MPDROOTDIR)/lhetrack
  36. CFLAGS += -I$(MPDROOTDIR)/mcstack
  37. CFLAGS += -I$(MPDROOTDIR)/strawendcap
  38. CFLAGS += -I$(MPDROOTDIR)/etof
  39. CFLAGS += -I$(MPDROOTDIR)/tof
  40. CFLAGS += -I$(MPDROOTDIR)/sft
  41. CFLAGS += -I$(MPDROOTDIR)/sts
  42. CFLAGS += -I$(MPDROOTDIR)/mpddst
  43. CFLAGS += -I$(MPDROOTDIR)/mpdbase
  44. CFLAGS += -I$(MPDROOTDIR)/mpdpid
  45. CFLAGS += -I$(FAIRROOTDIR)/parbase
  46. LDFLAGS += $(shell $(ROOTCONFIG) --glibs)
  47. LDFLAGS += -L$(MPDROOTDIR)/build/lib
  48. LDFLAGS += -lMCStack -lPassive -lMpdField
  49. LDFLAGS += -lMpdBase -lMpdDst -lMpdGeneralGenerator
  50. LDFLAGS += -lKalman -lCluster -ltpc -lTof -lEtof -lStrawendcap
  51. LDFLAGS += -lZdc -lFfd -lCpc -lStrawECT -lLHETrack -lSts -lMpdPid -g -O2
  52. all: $(OBJECTS)
  53. # $(OBJECTS): % : src/%.cc
  54. $(OBJECTS): % : %.c
  55. $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@
  56. clean:
  57. rm -vf $(OBJECTS)