# CC=$(CXX) glib_cflags=$(shell pkg-config --cflags glib-2.0 gio-2.0) glib_libs=$(shell pkg-config --libs glib-2.0 gio-2.0) ROOTC=$(shell root-config --cflags) ROOTL=$(shell root-config --libs) OPT=-g -fno-inline #-std=c++11 CppFLAGS=$(OPT) -I. $(glib_cflags) CXXFLAGS=-fPIC $(CppFLAGS) LDLIBS=$(alibava_libs) extra_alibava_libs = Alibava/AsciiRoot.cc Alibava/ChanList.cc Alibava/Hit.cc Alibava/Tracer.cc Alibava/utils.cc UNAME_S := $(shell uname -s) ifeq ($(UNAME_S),Linux) SO=so SO_FLAGS=-shared CXXFLAGS += -D LINUX endif ifeq ($(UNAME_S),Darwin) SO=dylib SO_FLAGS=-dynamiclib -undefined dynamic_lookup -install_name @rpath/$@ CXXFLAGS += -D OSX endif all: TbNtupleMaker TbNtupleMaker: TbNtupleMaker.C c++ -I$(OPT) $(CXXFLAGS) $(ROOTC) $(extra_alibava_libs) -o $@ $^ $(LDLIBS) $(ROOTL) $(gliblibs) clean: rm -f *.o TbNtupleMaker rm -rf *.dSYM