From b0036b4d9949f43c6dbbd9344e5085e4837feea9 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Tue, 21 Aug 2012 07:02:45 -0700 Subject: [PATCH] Statically link libaegisub Dynamically linking it caused a steady stream of issues for no apparent benefits. --- aegisub/Makefile.inc.in | 1 + aegisub/libaegisub/Makefile | 5 +---- aegisub/reporter/Makefile | 3 +-- aegisub/src/Makefile | 2 +- aegisub/src/run.sh | 17 ----------------- 5 files changed, 4 insertions(+), 24 deletions(-) delete mode 100755 aegisub/src/run.sh diff --git a/aegisub/Makefile.inc.in b/aegisub/Makefile.inc.in index d37679cb5..45406b9be 100644 --- a/aegisub/Makefile.inc.in +++ b/aegisub/Makefile.inc.in @@ -26,6 +26,7 @@ CFLAGS = @CFLAGS@ CXXFLAGS = @CXXFLAGS@ CPPFLAGS = @CPPFLAGS@ CFLAGS_DEP = -MD -MP +LIBS = @LIBS@ LDFLAGS = @LDFLAGS@ INSTALL_FLAGS = -m 664 CCACHE_ENV = CCACHE_SLOPPINESS=time_macros diff --git a/aegisub/libaegisub/Makefile b/aegisub/libaegisub/Makefile index ac2648871..e34bbb506 100644 --- a/aegisub/libaegisub/Makefile +++ b/aegisub/libaegisub/Makefile @@ -1,10 +1,7 @@ # $Id$ include ../Makefile.inc - -LIB_SHARED = libaegisub-3.0.so -LIB_SHARED_INSTALL = yes -LIB_VERSION = 3 +LIB = libaegisub.a CXXFLAGS += -Iinclude -I../src -I.. -DLAGI -fPIC -Wno-variadic-macros diff --git a/aegisub/reporter/Makefile b/aegisub/reporter/Makefile index 4189ecfd9..2a9429168 100644 --- a/aegisub/reporter/Makefile +++ b/aegisub/reporter/Makefile @@ -5,8 +5,7 @@ PROGRAM_INSTALL = yes PRECOMPILED_HEADER_NAME=r_pre.h CXXFLAGS += -Iinclude $(CFLAGS_WX) -I../libaegisub/include -LIBS += $(LIBS_WX) $(LIBS_LIBCURL) -L../libaegisub -laegisub-3.0 $(LIBS_UCHARDET) $(LIBS_GL) -LDFLAGS += -Wl,-rpath ../libaegisub +LIBS += $(LIBS_WX) $(LIBS_LIBCURL) -L../libaegisub -laegisub $(LIBS_UCHARDET) $(LIBS_GL) # File-specific flags upload.o: CXXFLAGS += $(CFLAGS_CURL) diff --git a/aegisub/src/Makefile b/aegisub/src/Makefile index c2d559400..035d3e3f4 100644 --- a/aegisub/src/Makefile +++ b/aegisub/src/Makefile @@ -10,7 +10,7 @@ AEGISUB_CFLAGS = -I. -I.. -Iinclude -I../libaegisub/include -I../build -DAEGISUB CFLAGS += $(AEGISUB_CFLAGS) CXXFLAGS += $(AEGISUB_CFLAGS) -D__STDC_FORMAT_MACROS $(CXXFLAGS_WX) -LIBS += -L../libaegisub -laegisub-3.0 +LIBS := -L../libaegisub -laegisub $(LIBS) LIBS += $(LIBS_CCMALLOC) $(LIBS_EFENCE) $(LIBS_GL) LIBS += $(LIBS_PTHREAD) $(LIBS_WX) $(LIBS_FREETYPE) LIBS += $(LIBS_FONTCONFIG) $(LIBS_FFTW3) diff --git a/aegisub/src/run.sh b/aegisub/src/run.sh deleted file mode 100755 index fadadb5cd..000000000 --- a/aegisub/src/run.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -BINDIR="$(dirname "$0")" -BIN="$BINDIR/aegisub-3.0" -LIBDIR="$BINDIR/../libaegisub" - -if ! test -x "${BIN}"; then - echo "${BIN} does not exist or is not executable."; - exit 1; -fi - -case "$1" in - "gdb") - GDB="gdb" - ;; -esac - -LD_LIBRARY_PATH="$LIBDIR" exec $GDB "./$BIN"