diff --git a/Makefile b/Makefile index 776d109..4755f0e 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,10 @@ CXX = clang++ CFLAGS = -Wall -Wextra -pedantic INC = -Ithird_party -Ithird_party/imgui -LIBS = -lglfw -lROOTNTuple +ROOT = /opt/root/build +ROOTFLAGS = -std=c++17 -m64 -I$(ROOT)/include +ROOTLIBS = -L$(ROOT)/lib -lCore -lRIO -lROOTNTuple -Wl,-rpath,$(ROOT)/lib -pthread +LIBS = -lglfw MOLD = mold -run all: build/imgui.o d @@ -10,7 +13,7 @@ build/imgui.o: src/imgui_inc.cpp third_party/imgui/imgui.h $(CXX) -O3 -fPIC -c -Ithird_party/imgui $< -o $@ d: - $(MOLD) $(CXX) -DDEBUG -g -O0 $(CFLAGS) -fsanitize=undefined $(INC) $(shell root-config --cflags) -o rntviewer src/rntviewer.cpp build/imgui.o -lasan $(shell root-config --libs) $(LIBS) + $(MOLD) $(CXX) -DDEBUG -g -O0 $(CFLAGS) -fsanitize=undefined $(INC) $(ROOTFLAGS) -o rntviewer src/rntviewer.cpp build/imgui.o -lasan $(ROOTLIBS) $(LIBS) r: - $(MOLD) $(CXX) -O2 $(CFLAGS) $(INC) -o rntviewer src/rntviewer.cpp build/imgui.o $(shell root-config --cflags --libs) $(LIBS) + $(MOLD) $(CXX) -O2 $(CFLAGS) $(INC) $(ROOTFLAGS) -o rntviewer src/rntviewer.cpp build/imgui.o $(ROOTLIBS) $(LIBS)