rntviewer/Makefile

34 lines
1.2 KiB
Makefile
Raw Normal View History

2024-07-10 17:04:11 +02:00
CXX = clang++
2024-07-10 19:38:16 +02:00
CFLAGS = -Wall -Wextra -pedantic
INC = -Ithird_party -Ithird_party/imgui
2024-07-11 08:49:20 +02:00
ROOT = $(HOME)/root_build/debug
2024-07-10 21:52:48 +02:00
ROOTFLAGS = -std=c++17 -m64 -I$(ROOT)/include
2024-07-11 16:29:44 +02:00
ROOTLIBS = -L$(ROOT)/lib -lCore -lRIO -lROOTNTuple -lxxhash -Wl,-rpath,$(ROOT)/lib -pthread
2024-07-10 21:52:48 +02:00
LIBS = -lglfw
MOLD = mold -run
2024-07-12 09:53:01 +02:00
ROOT_IFACE = build/libroot_iface.so
2024-07-10 17:04:11 +02:00
2024-07-11 16:49:18 +02:00
.PHONY: all clean
2024-07-12 09:53:01 +02:00
all: build/imgui.o $(ROOT_IFACE) noasan
2024-07-10 19:38:16 +02:00
2024-07-11 16:49:18 +02:00
clean:
2024-07-12 09:53:01 +02:00
rm build/*.o rntviewer $(ROOT_IFACE)
2024-07-11 16:49:18 +02:00
build/imgui.o: src/imgui_inc.cpp third_party/imgui/imgui.h
2024-07-10 19:38:16 +02:00
$(CXX) -O3 -fPIC -c -Ithird_party/imgui $< -o $@
2024-07-11 16:29:44 +02:00
2024-07-12 09:53:01 +02:00
# $(ROOT_IFACE): src/root/RMicroFileReader.cxx
# $(CXX) -O3 -fPIC -c $(ROOTFLAGS) $< -o $@
$(ROOT_IFACE): src/root/RMicroFileReader.cxx
$(CXX) -O3 -fPIC -shared $(ROOTFLAGS) $< -o $@ $(ROOTLIBS)
2024-07-11 14:00:43 +02:00
2024-07-12 09:53:01 +02:00
d: $(ROOT_IFACE) build/imgui.o
$(MOLD) $(CXX) -DDEBUG -g -O0 -DENABLE_ASAN $(CFLAGS) -fsanitize=undefined $(INC) -o rntviewer src/rntviewer.cpp build/imgui.o $(ROOT_IFACE) -lasan $(LIBS)
noasan: $(ROOT_IFACE) build/imgui.o
$(MOLD) $(CXX) -DDEBUG -g -O0 $(CFLAGS) -fsanitize=undefined $(INC) -o rntviewer src/rntviewer.cpp build/imgui.o $(ROOT_IFACE) $(LIBS)
2024-07-10 17:04:11 +02:00
2024-07-12 09:53:01 +02:00
r: $(ROOT_IFACE) build/imgui.o
$(MOLD) $(CXX) -O2 $(CFLAGS) $(INC) -o rntviewer src/rntviewer.cpp build/imgui.o $(ROOT_IFACE) $(LIBS)