Parcourir la source

Initial version from pylam

Andrew Savchenko il y a 9 ans
Parent
commit
914d4f71a6
1 fichiers modifiés avec 51 ajouts et 0 suppressions
  1. 51 0
      tof_resolution/Makefile

+ 51 - 0
tof_resolution/Makefile

@@ -0,0 +1,51 @@
+# defaults
+ifndef DEBUG
+CXXFLAGS ?= -O3 -march=native -fomit-frame-pointer -pipe -DDEBUG
+else
+CXXFLAGS += -ggdb3
+endif
+#LDFLAGS ?= -Wl,-O1
+LDFLAGS ?= -Wl,-O1 -Wl,--as-needed
+STRIP ?= strip --strip-unneeded -R .comment
+
+# root-dependant stuff
+ROOTCFLAGS ?= $(shell root-config --cflags)
+CXXFLAGS += -Wall -pipe -D_FILE_OFFSET_BITS=64 $(ROOTCFLAGS) -fvisibility-inlines-hidden
+ROOTLIBS = $(shell root-config --libs) -lEG -lpythia6 -lEGPythia6
+DEPFLAGS = -isystem $(shell root-config --incdir)
+
+SRCS = pylam.cpp
+OBJS = $(SRCS:.cpp=.o)
+DEPS = $(SRCS:.cpp=.d)
+
+##### RULES #####
+.PHONY: all clean deps distclean tags
+
+all: pylam
+
+deps: $(DEPS)
+
+%.d: %.cpp
+	$(CXX) $(DEPFLAGS) -MM -MG $< > $@
+
+### Binaries rules
+pylam: $(DEPS) $(OBJS) Makefile
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(OBJS) $(ROOTLIBS) -o $@
+ifndef DEBUG
+	$(STRIP) $@
+endif
+
+# misc and cleanup
+tags:
+	ctags $(SRCS)
+clean:
+	rm -f $(OBJS) $(DEPS)
+distclean: clean
+	rm -f $(BINS) tags
+
+# on distclean per-file deps will be removed anyway
+ifneq ($(MAKECMDGOALS),clean)
+ifneq ($(MAKECMDGOALS),distclean)
+-include $(DEPS)
+endif
+endif