1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-29 04:07:34 +00:00
serenity/Ports/nesalizer/patches/0001-Add-Serenity-to-Makefile.patch
Tim Ledbetter 87bf5045e4 Ports/nesalizer: Add SDL2 header include path to Makefile
Previously, we were relying on the host's SDL2 headers. If none were
present the build would fail.
2023-08-06 22:06:49 +02:00

49 lines
1.7 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dan MacDonald <allcoms@gmail.com>
Date: Sun, 8 Dec 2019 17:30:52 +0000
Subject: [PATCH] Add Serenity to Makefile
- Add `-lSDL2 -lgui -lipc -lgfx -lcore -lpthread -lregex`
- Disable RTTI
- Add SDL2 include path to compile flags
---
Makefile | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index 527a3d08998163dadcd6a8d48c93a2906e19c31c..37fbb516e1c1f57daf911f373cb801585a3b2549 100644
--- a/Makefile
+++ b/Makefile
@@ -58,7 +58,7 @@ c_objects = $(addprefix $(BUILD_DIR)/,$(c_sources:=.o))
objects = $(c_objects) $(cpp_objects)
deps = $(addprefix $(BUILD_DIR)/,$(c_sources:=.d) $(cpp_sources:=.d))
-LDLIBS := $(shell sdl2-config --libs) -lrt
+LDLIBS := -lSDL2 -lgui -lipc -lgfx -lcore -lpthread -lregex
ifeq ($(INCLUDE_DEBUGGER),1)
LDLIBS += -lreadline
@@ -105,12 +105,12 @@ else ifneq ($(MAKECMDGOALS),clean)
endif
ifneq ($(findstring debug,$(CONF)),)
- compile_flags += -ggdb
+ compile_flags += -ggdb -fno-rtti
endif
ifneq ($(findstring release,$(CONF)),)
# Including -Ofast when linking (by including $(optimizations)) gives a
# different binary size. Might be worth investigating why.
- compile_flags += $(optimizations) -DOPTIMIZING
+ compile_flags += $(optimizations) -DOPTIMIZING -fno-rtti
link_flags += $(optimizations) -fuse-linker-plugin
endif
@@ -133,7 +133,7 @@ endif
# _FILE_OFFSET_BITS=64 gives nicer errors for large files (even though we don't
# support them on 32-bit systems)
-compile_flags += $(warnings) -D_FILE_OFFSET_BITS=64 $(shell sdl2-config --cflags)
+compile_flags += $(warnings) -D_FILE_OFFSET_BITS=64 -I$(SERENITY_INSTALL_ROOT)/usr/local/include/SDL2
#
# Targets