fix makefile
This commit is contained in:
parent
e66ecfe8a7
commit
d21bceac89
4 changed files with 13 additions and 9 deletions
12
Makefile
12
Makefile
|
@ -7,19 +7,23 @@ ROOTLIBS = -L$(ROOT)/lib -lCore -lRIO -lROOTNTuple -lxxhash -Wl,-rpath,$(ROOT)/l
|
||||||
LIBS = -lglfw
|
LIBS = -lglfw
|
||||||
MOLD = mold -run
|
MOLD = mold -run
|
||||||
|
|
||||||
|
.PHONY: all clean
|
||||||
all: build/imgui.o build/root_stuff.o noasan
|
all: build/imgui.o build/root_stuff.o noasan
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm build/*.o rntviewer
|
||||||
|
|
||||||
build/imgui.o: src/imgui_inc.cpp third_party/imgui/imgui.h
|
build/imgui.o: src/imgui_inc.cpp third_party/imgui/imgui.h
|
||||||
$(CXX) -O3 -fPIC -c -Ithird_party/imgui $< -o $@
|
$(CXX) -O3 -fPIC -c -Ithird_party/imgui $< -o $@
|
||||||
|
|
||||||
build/root_stuff.o: src/PseudoMiniFile.cxx
|
build/root_stuff.o: src/PseudoMiniFile.cxx
|
||||||
$(CXX) -fPIC -c $(ROOTFLAGS) $< -o $@
|
$(CXX) -O3 -fPIC -c $(ROOTFLAGS) $< -o $@
|
||||||
|
|
||||||
d:
|
d: build/root_stuff.o build/imgui.o
|
||||||
$(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)
|
$(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:
|
noasan: build/root_stuff.o build/imgui.o
|
||||||
$(MOLD) $(CXX) -DDEBUG -g -O0 $(CFLAGS) -fsanitize=undefined $(INC) $(ROOTFLAGS) -o rntviewer src/rntviewer.cpp build/imgui.o build/root_stuff.o $(ROOTLIBS) $(LIBS)
|
$(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:
|
r: build/root_stuff.o build/imgui.o
|
||||||
$(MOLD) $(CXX) -O2 $(CFLAGS) $(INC) $(ROOTFLAGS) -o rntviewer src/rntviewer.cpp build/imgui.o build/root_stuff.o $(ROOTLIBS) $(LIBS)
|
$(MOLD) $(CXX) -O2 $(CFLAGS) $(INC) $(ROOTFLAGS) -o rntviewer src/rntviewer.cpp build/imgui.o build/root_stuff.o $(ROOTLIBS) $(LIBS)
|
||||||
|
|
|
@ -10,7 +10,7 @@ String8 rntuple_description(Arena *arena, const RNTuple &anchor)
|
||||||
}
|
}
|
||||||
|
|
||||||
internal
|
internal
|
||||||
RNTuple_Info get_rntuple_info(Arena *arena, const char *fname, const char *ntpl_name)
|
RNTuple_Info get_rntuple_info(const char *fname, const char *ntpl_name)
|
||||||
{
|
{
|
||||||
RNTuple_Info info = {};
|
RNTuple_Info info = {};
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,7 @@ int main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
app.ntpl_name = ntpl_name;
|
app.ntpl_name = ntpl_name;
|
||||||
app.rntinfo = get_rntuple_info(arena, fname, ntpl_name);
|
app.rntinfo = get_rntuple_info(fname, ntpl_name);
|
||||||
app.vsettings = make_viewer_settings();
|
app.vsettings = make_viewer_settings();
|
||||||
|
|
||||||
// Start main loop
|
// Start main loop
|
||||||
|
|
6
third_party/imgui_club/imgui_memory_editor.h
vendored
6
third_party/imgui_club/imgui_memory_editor.h
vendored
|
@ -276,9 +276,9 @@ struct MemoryEditor
|
||||||
const char* format_byte_space = OptUpperCaseHex ? "%02X " : "%02x ";
|
const char* format_byte_space = OptUpperCaseHex ? "%02X " : "%02x ";
|
||||||
|
|
||||||
while (clipper.Step())
|
while (clipper.Step())
|
||||||
for (size_t line_i = clipper.DisplayStart; line_i < clipper.DisplayEnd; line_i++) // display only visible lines
|
for (int line_i = clipper.DisplayStart; line_i < clipper.DisplayEnd; line_i++) // display only visible lines
|
||||||
{
|
{
|
||||||
size_t addr = (size_t)(line_i * Cols);
|
size_t addr = (size_t)(line_i) * Cols;
|
||||||
ImGui::Text(format_address, s.AddrDigitsCount, base_display_addr + addr);
|
ImGui::Text(format_address, s.AddrDigitsCount, base_display_addr + addr);
|
||||||
|
|
||||||
// Draw Hexadecimal
|
// Draw Hexadecimal
|
||||||
|
@ -415,7 +415,7 @@ struct MemoryEditor
|
||||||
// Draw ASCII values
|
// Draw ASCII values
|
||||||
ImGui::SameLine(s.PosAsciiStart);
|
ImGui::SameLine(s.PosAsciiStart);
|
||||||
ImVec2 pos = ImGui::GetCursorScreenPos();
|
ImVec2 pos = ImGui::GetCursorScreenPos();
|
||||||
addr = line_i * Cols;
|
addr = (size_t)line_i * Cols;
|
||||||
ImGui::PushID(line_i);
|
ImGui::PushID(line_i);
|
||||||
if (ImGui::InvisibleButton("ascii", ImVec2(s.PosAsciiEnd - s.PosAsciiStart, s.LineHeight)))
|
if (ImGui::InvisibleButton("ascii", ImVec2(s.PosAsciiEnd - s.PosAsciiStart, s.LineHeight)))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue