25 lines
1 KiB
Makefile
25 lines
1 KiB
Makefile
CXX = clang++
|
|
CFLAGS = -Wall -Wextra -pedantic
|
|
INC = -Ithird_party -Ithird_party/imgui
|
|
ROOT = $(HOME)/root_build/debug
|
|
ROOTFLAGS = -std=c++17 -m64 -I$(ROOT)/include
|
|
ROOTLIBS = -L$(ROOT)/lib -lCore -lRIO -lROOTNTuple -lxxhash -Wl,-rpath,$(ROOT)/lib -pthread
|
|
LIBS = -lglfw
|
|
MOLD = mold -run
|
|
|
|
all: build/imgui.o build/root_stuff.o noasan
|
|
|
|
build/imgui.o: src/imgui_inc.cpp third_party/imgui/imgui.h
|
|
$(CXX) -O3 -fPIC -c -Ithird_party/imgui $< -o $@
|
|
|
|
build/root_stuff.o: src/PseudoMiniFile.cxx
|
|
$(CXX) -fPIC -c $(ROOTFLAGS) $< -o $@
|
|
|
|
d:
|
|
$(MOLD) $(CXX) -DDEBUG -g -O0 -DENABLE_ASAN $(CFLAGS) -fsanitize=undefined $(INC) $(ROOTFLAGS) -o rntviewer src/rntviewer.cpp build/imgui.o build/root_stuff.o -lasan $(ROOTLIBS) $(LIBS)
|
|
|
|
noasan:
|
|
$(MOLD) $(CXX) -DDEBUG -g -O0 $(CFLAGS) -fsanitize=undefined $(INC) $(ROOTFLAGS) -o rntviewer src/rntviewer.cpp build/imgui.o build/root_stuff.o $(ROOTLIBS) $(LIBS)
|
|
|
|
r:
|
|
$(MOLD) $(CXX) -O2 $(CFLAGS) $(INC) $(ROOTFLAGS) -o rntviewer src/rntviewer.cpp build/imgui.o build/root_stuff.o $(ROOTLIBS) $(LIBS)
|