# 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) 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: TbUTLandauFits TbUTLandauFits: TbUTLandauFits.C c++ -I$(OPT) $(CXXFLAGS) $(ROOTC) -o $@ $^ $(LDLIBS) $(ROOTL) -lRooFit -lRooFitCore -lMinuit -lRooStats $(gliblibs) clean: rm -f *.o TbUTLandauFits.C