From 07819a10a89ee26f2f113ba0ec0bee7b03668680 Mon Sep 17 00:00:00 2001 From: Pixel Date: Thu, 5 Nov 2009 11:56:41 -0800 Subject: Adding CentOS mingw support, stripping and dist target support. --- Makefile | 3 ++- Makefile.mingw32 | 17 +++++++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index f2cb29c..ae65bd9 100644 --- a/Makefile +++ b/Makefile @@ -37,7 +37,7 @@ LDFLAGS_GL = -lGLU -lGL endif CC = gcc CXX = g++ -STRIP = strip +STRIP = strip --strip-unneeded INCLUDES = \ -I../mogltk/include \ @@ -236,6 +236,7 @@ all: dep luac lua-interface dist: luac lua-interface lua-interface-gl.$(SHARED_EXT) mkdir -p ../lua-interface-dist ln -sf lua-interface-mesa.$(SHARED_EXT) lua-interface.$(SHARED_EXT) + $(STRIP) $+ cp luac lua-interface lua-interface*.$(SHARED_EXT) ../lua-interface-dist dep: $(ALL_DEPS) diff --git a/Makefile.mingw32 b/Makefile.mingw32 index 7390d73..e910231 100644 --- a/Makefile.mingw32 +++ b/Makefile.mingw32 @@ -3,7 +3,7 @@ ifeq ($(SYSTEM),Darwin) CC = i386-mingw32-gcc CXX = i386-mingw32-g++ LD = i386-mingw32-g++ -STRIP = i386-mingw32-strip +STRIP = i386-mingw32-strip --strip-unneeded else ifeq ($(SYSTEM),MINGW32_NT-5.1) CC = gcc @@ -11,10 +11,18 @@ CXX = g++ LD = g++ STRIP = strip else +DISTRIB=$(shell cat /etc/issue | cut -f 1 -d\ | head -1) +ifeq ($(DISTRIB), CentOS) +CC = i686-pc-mingw32-gcc +CXX = i686-pc-mingw32-g++ +LD = i686-pc-mingw32-g++ +STRIP = i686-pc-mingw32-strip --strip-unneeded +else CC = i586-mingw32msvc-gcc CXX = i586-mingw32msvc-g++ LD = i586-mingw32msvc-g++ -STRIP = i586-mingw32msvc-strip +STRIP = i586-mingw32msvc-strip --strip-unneeded +endif endif endif @@ -216,6 +224,11 @@ ALL_DEPS = $(addsuffix .dep, $(notdir $(basename $(WHOLE_SOURCES)))) all: dep luac.exe lua-interface.dll lua-interface.exe +dist: all + mkdir -p ../lua-interface-dist-win32 + $(STRIP) luac.exe lua-interface.dll lua-interface.exe + cp luac.exe lua-interface.dll lua-interface.exe ../lua-interface-dist-win32 + dep: $(ALL_DEPS) luac.exe: $(LUAC_OBJECTS) -- cgit v1.2.3 From 03dc6fdc539ba032ee904d11dfe042ff50d471f9 Mon Sep 17 00:00:00 2001 From: Pixel Date: Thu, 5 Nov 2009 18:54:20 -0800 Subject: It's actually going to be difficult to support anything else than i386... --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f2cb29c..6515d74 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ MACHINE=$(shell uname -m) DISTRIB=$(shell cat /etc/issue | cut -f 1 -d\ | head -1) GL_GLUE=gl-glue.s ifeq ($(SYSTEM),Darwin) -ARCH_FLAGS=-arch i386 -arch x86_64 -arch ppc +ARCH_FLAGS=-arch i386 LDFLAGS_MESA=-all_load ../Mesa-7.4.4/lib/libGLU.a ../Mesa-7.4.4/lib/libmesa.a ../Mesa-7.4.4/lib/libglapi.a ../Mesa-7.4.4/lib/osmesa.o CPPFLAGS_READLINE= LDFLAGS_READLINE=-lreadline -lncurses -- cgit v1.2.3 From 501204b88927f4bcc0a7d6065a4a220af6fb0eed Mon Sep 17 00:00:00 2001 From: Pixel Date: Thu, 5 Nov 2009 18:57:31 -0800 Subject: Let's settle this to i386. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index fa7adfc..0d14390 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ LDFLAGS_READLINE=-lreadline -lncurses SHARED_FLAGS=-dynamiclib SHARED_EXT=dylib LIBS=-liconv -LD = g++ +LD = g++ -arch i386 LDFLAGS_GL = -L/usr/X11/lib -lGLU -lGL -X11 -dylib_file \ /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:\ /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib -- cgit v1.2.3