16 lines
586 B
Makefile
16 lines
586 B
Makefile
CXX = clang++
|
|
CFLAGS = -Wall -Wextra -pedantic
|
|
INC = -Ithird_party -Ithird_party/imgui
|
|
LIBS = -lglfw -lROOTNTuple
|
|
MOLD = mold -run
|
|
|
|
all: build/imgui.o d
|
|
|
|
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)
|
|
|
|
r:
|
|
$(MOLD) $(CXX) -O2 $(CFLAGS) $(INC) -o rntviewer src/rntviewer.cpp build/imgui.o $(shell root-config --cflags --libs) $(LIBS)
|