diff --git a/Makefile b/Makefile index e0ca91eaa9..227af31797 100644 --- a/Makefile +++ b/Makefile @@ -70,13 +70,6 @@ endif OBJ += playlist.o \ movie.o -ifeq ($(HAVE_THREADS), 1) - OBJ += autosave.o thread.o gfx/video_thread_wrapper.o audio/thread_wrapper.o - ifeq ($(findstring Haiku,$(OS)),) - LIBS += -lpthread - endif -endif - ifeq ($(HAVE_NETPLAY), 1) OBJ += netplay.o ifneq ($(findstring Win32,$(OS)),) @@ -341,13 +334,6 @@ ifeq ($(HAVE_DYLIB), 1) OBJ += gfx/filter.o endif -ifeq ($(HAVE_FREETYPE), 1) - OBJ += gfx/fonts/freetype.o - LIBS += $(FREETYPE_LIBS) - DEFINES += $(FREETYPE_CFLAGS) -endif - - ifeq ($(HAVE_ZLIB), 1) HAVE_COMPRESSION = 1 ZLIB_OBJS = deps/rzlib/unzip.o \ diff --git a/Makefile.common b/Makefile.common index 6e7228c3d8..1f63da6464 100644 --- a/Makefile.common +++ b/Makefile.common @@ -69,3 +69,17 @@ ifeq ($(HAVE_MENU_COMMON), 1) frontend/menu/menu_action.o \ frontend/menu/menu_entries.o endif + +ifeq ($(HAVE_FREETYPE), 1) + OBJ += gfx/fonts/freetype.o + LIBS += $(FREETYPE_LIBS) + DEFINES += $(FREETYPE_CFLAGS) +endif + +ifeq ($(HAVE_THREADS), 1) + OBJ += autosave.o thread.o gfx/video_thread_wrapper.o audio/thread_wrapper.o + DEFINES += -DHAVE_THREADS + ifeq ($(findstring Haiku,$(OS)),) + LIBS += -lpthread + endif +endif diff --git a/Makefile.win b/Makefile.win index 84f48dd86b..555e30442f 100644 --- a/Makefile.win +++ b/Makefile.win @@ -31,6 +31,9 @@ ifeq ($(SLIM),) HAVE_FFMPEG = 1 endif +FREETYPE_CFLAGS := -DHAVE_FREETYPE -Ifreetype2 +FREETYPE_LIBS := -lfreetype + OBJDIR := obj-w32 OBJ := @@ -105,11 +108,6 @@ ifeq ($(HAVE_SDL), 1) DEFINES += -ISDL -DHAVE_SDL endif -ifeq ($(HAVE_THREADS), 1) - OBJ += autosave.o thread.o gfx/video_thread_wrapper.o audio/thread_wrapper.o - DEFINES += -DHAVE_THREADS -endif - ifeq ($(HAVE_OPENGL), 1) OBJ += gfx/gl.o gfx/math/matrix.o gfx/fonts/gl_font.o gfx/fonts/gl_raster_font.o gfx/gfx_context.o gfx/context/wgl_ctx.o gfx/shader_glsl.o gfx/glsym/rglgen.o gfx/glsym/glsym_gl.o DEFINES += -DHAVE_OPENGL -DHAVE_GLSL -DHAVE_GL_SYNC @@ -191,12 +189,6 @@ ifeq ($(HAVE_NETPLAY), 1) LIBS += -lws2_32 endif -ifeq ($(HAVE_FREETYPE), 1) - OBJ += gfx/fonts/freetype.o - DEFINES += -DHAVE_FREETYPE -Ifreetype2 - LIBS += -lfreetype -lz -endif - ifeq ($(DYNAMIC), 1) DEFINES += -DHAVE_DYNAMIC else