rntviewer/Makefile

23 lines
859 B
Makefile
Raw Normal View History

2024-07-10 15:04:11 +00:00
CXX = clang++
2024-07-10 17:38:16 +00:00
CFLAGS = -Wall -Wextra -pedantic
INC = -Ithird_party -Ithird_party/imgui
2024-07-11 06:49:20 +00:00
ROOT = $(HOME)/root_build/debug
2024-07-10 19:52:48 +00:00
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
2024-07-10 15:04:11 +00:00
2024-07-10 17:38:16 +00:00
all: build/imgui.o d
build/imgui.o: src/imgui_inc.cpp third_party/imgui/imgui.h
2024-07-10 17:38:16 +00:00
$(CXX) -O3 -fPIC -c -Ithird_party/imgui $< -o $@
2024-07-10 15:04:11 +00:00
d:
2024-07-11 12:00:43 +00:00
$(MOLD) $(CXX) -DDEBUG -g -O0 -DENABLE_ASAN $(CFLAGS) -fsanitize=undefined $(INC) $(ROOTFLAGS) -o rntviewer src/rntviewer.cpp build/imgui.o -lasan $(ROOTLIBS) $(LIBS)
noasan:
$(MOLD) $(CXX) -DDEBUG -g -O0 $(CFLAGS) -fsanitize=undefined $(INC) $(ROOTFLAGS) -o rntviewer src/rntviewer.cpp build/imgui.o $(ROOTLIBS) $(LIBS)
2024-07-10 15:04:11 +00:00
r:
2024-07-10 19:52:48 +00:00
$(MOLD) $(CXX) -O2 $(CFLAGS) $(INC) $(ROOTFLAGS) -o rntviewer src/rntviewer.cpp build/imgui.o $(ROOTLIBS) $(LIBS)