diff --git a/profiler/build/unix/Makefile b/profiler/build/unix/Makefile index 035eda1b..ebde094e 100644 --- a/profiler/build/unix/Makefile +++ b/profiler/build/unix/Makefile @@ -1,3 +1,7 @@ +ifneq ($(shell uname),Linux) + export LEGACY=1 +endif + all: release debug: diff --git a/profiler/build/unix/build.mk b/profiler/build/unix/build.mk index 24765f1a..b134432b 100644 --- a/profiler/build/unix/build.mk +++ b/profiler/build/unix/build.mk @@ -1,32 +1,29 @@ CFLAGS += CXXFLAGS := $(CFLAGS) -std=c++17 DEFINES += -DIMGUI_ENABLE_FREETYPE -INCLUDES := $(shell pkg-config --cflags glfw3 freetype2 capstone) -I../../../imgui -LIBS := $(shell pkg-config --libs glfw3 freetype2 capstone) -lpthread -ldl +INCLUDES := $(shell pkg-config --cflags freetype2 capstone wayland-egl egl wayland-cursor xkbcommon) -I../../../imgui +LIBS := $(shell pkg-config --libs freetype2 capstone wayland-egl egl wayland-cursor xkbcommon) -lpthread -ldl PROJECT := Tracy IMAGE := $(PROJECT)-$(BUILD) -FILTER := ../../../nfd/nfd_win.cpp +FILTER := ../../../nfd/nfd_win.cpp ../../src/BackendGlfw.cpp ../../src/imgui/imgui_impl_glfw.cpp include ../../../common/src-from-vcxproj.mk +SRC += ../../src/BackendWayland.cpp +SRC2 += ../../src/wayland/xdg-shell.c ../../src/wayland/xdg-activation.c ../../src/wayland/xdg-decoration.c + ifdef TRACY_NO_FILESELECTOR CXXFLAGS += -DTRACY_NO_FILESELECTOR else - UNAME := $(shell uname -s) - ifeq ($(UNAME),Darwin) - SRC3 += ../../../nfd/nfd_cocoa.m - LIBS += -framework CoreFoundation -framework AppKit -framework UniformTypeIdentifiers + ifdef TRACY_GTK_FILESELECTOR + SRC += ../../../nfd/nfd_gtk.cpp + INCLUDES += $(shell pkg-config --cflags gtk+-3.0) + LIBS += $(shell pkg-config --libs gtk+-3.0) else - ifdef TRACY_GTK_FILESELECTOR - SRC += ../../../nfd/nfd_gtk.cpp - INCLUDES += $(shell pkg-config --cflags gtk+-3.0) - LIBS += $(shell pkg-config --libs gtk+-3.0) - else - SRC += ../../../nfd/nfd_portal.cpp - INCLUDES += $(shell pkg-config --cflags dbus-1) - LIBS += $(shell pkg-config --libs dbus-1) - endif + SRC += ../../../nfd/nfd_portal.cpp + INCLUDES += $(shell pkg-config --cflags dbus-1) + LIBS += $(shell pkg-config --libs dbus-1) endif endif diff --git a/profiler/build/unix/debug.mk b/profiler/build/unix/debug.mk index a4ec6b6a..d9b31daf 100644 --- a/profiler/build/unix/debug.mk +++ b/profiler/build/unix/debug.mk @@ -3,4 +3,9 @@ DEFINES := -DDEBUG BUILD := debug include ../../../common/unix-debug.mk -include build.mk + +ifeq ($(LEGACY),1) + include legacy.mk +else + include build.mk +endif diff --git a/profiler/build/unix/legacy.mk b/profiler/build/unix/legacy.mk new file mode 100644 index 00000000..24765f1a --- /dev/null +++ b/profiler/build/unix/legacy.mk @@ -0,0 +1,33 @@ +CFLAGS += +CXXFLAGS := $(CFLAGS) -std=c++17 +DEFINES += -DIMGUI_ENABLE_FREETYPE +INCLUDES := $(shell pkg-config --cflags glfw3 freetype2 capstone) -I../../../imgui +LIBS := $(shell pkg-config --libs glfw3 freetype2 capstone) -lpthread -ldl + +PROJECT := Tracy +IMAGE := $(PROJECT)-$(BUILD) + +FILTER := ../../../nfd/nfd_win.cpp +include ../../../common/src-from-vcxproj.mk + +ifdef TRACY_NO_FILESELECTOR + CXXFLAGS += -DTRACY_NO_FILESELECTOR +else + UNAME := $(shell uname -s) + ifeq ($(UNAME),Darwin) + SRC3 += ../../../nfd/nfd_cocoa.m + LIBS += -framework CoreFoundation -framework AppKit -framework UniformTypeIdentifiers + else + ifdef TRACY_GTK_FILESELECTOR + SRC += ../../../nfd/nfd_gtk.cpp + INCLUDES += $(shell pkg-config --cflags gtk+-3.0) + LIBS += $(shell pkg-config --libs gtk+-3.0) + else + SRC += ../../../nfd/nfd_portal.cpp + INCLUDES += $(shell pkg-config --cflags dbus-1) + LIBS += $(shell pkg-config --libs dbus-1) + endif + endif +endif + +include ../../../common/unix.mk diff --git a/profiler/build/unix/release.mk b/profiler/build/unix/release.mk index ccf07661..c248bca8 100644 --- a/profiler/build/unix/release.mk +++ b/profiler/build/unix/release.mk @@ -6,4 +6,9 @@ DEFINES := -DNDEBUG BUILD := release include ../../../common/unix-release.mk -include build.mk + +ifeq ($(LEGACY),1) + include legacy.mk +else + include build.mk +endif