diff options
author | Zhang <[email protected]> | 2007-07-27 11:19:35 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-07-27 11:19:35 -0600 |
commit | 35f35294cd5cc3ca32354b1de0e398ad73c70716 (patch) | |
tree | 5f495f0672e26d59a39bbcf8f3f1fc8151a22432 /src/glut | |
parent | 0fb0d9715c9bcdcc3437a64a0f03c1c1153e9f29 (diff) |
more Mingw32 fixes
Diffstat (limited to 'src/glut')
-rw-r--r-- | src/glut/glx/Makefile.mgw | 41 |
1 files changed, 17 insertions, 24 deletions
diff --git a/src/glut/glx/Makefile.mgw b/src/glut/glx/Makefile.mgw index ae4eb6addc5..9fff2e1503d 100644 --- a/src/glut/glx/Makefile.mgw +++ b/src/glut/glx/Makefile.mgw @@ -74,35 +74,29 @@ TOP = ../../.. LIBDIR = $(TOP)/lib -GLUT_DLL = glut32.dll -GLUT_IMP = libglut32.a -GLUT_DEF = glut.def +LIB_NAME = glut32 -include $(TOP)/configs/config.mgw -GLUT_USING_STDCALL ?= 1 +DLL_EXT = .dll +IMP_EXT = .a +LIB_PRE = lib +STRIP = -s +AR = ar +ARFLAGS = crus +DLLTOOL = dlltool +GLUT_DLL = $(LIB_NAME)$(DLL_EXT) +GLUT_IMP = $(LIB_PRE)$(LIB_NAME)$(IMP_EXT) +GLUT_DEF = $(LIB_NAME).def LDLIBS = -L$(LIBDIR) -lwinmm -lgdi32 -luser32 -lopengl32 -lglu32 -LDFLAGS = -Wl,--out-implib=$(LIBDIR)/$(GLUT_IMP) -Wl,--output-def=$(LIBDIR)/$(GLUT_DEF) +LDFLAGS = $(STRIP) -shared -fPIC -Wl,--kill-at CFLAGS += -DBUILD_GLUT32 -DGLUT_BUILDING_LIB -DMESA -D_DLL - -ifeq ($(GL_USING_STDCALL),0) - CFLAGS += -DGL_NO_STDCALL -endif - -ifeq ($(GLUT_USING_STDCALL),1) - CFLAGS += -D_STDCALL_SUPPORTED - LDFLAGS += -Wl,--add-stdcall-alias -else - CFLAGS += -DGLUT_NO_STDCALL -endif - CFLAGS += -DNDEBUG -DLIBRARYBUILD -I$(TOP)/include -CC = gcc -CXX = g++ +CC = $(TOOLS_PREFIX)gcc +CXX = $(TOOLS_PREFIX)g++ CXXFLAGS = $(CFLAGS) AR = ar @@ -189,10 +183,9 @@ $(LIBDIR): mkdir -p $(LIBDIR) $(LIBDIR)/$(GLUT_DLL) $(LIBDIR)/$(GLUT_IMP): $(OBJECTS) - $(CXX) -shared -fPIC -o $(LIBDIR)/$(GLUT_DLL) $(LDFLAGS) \ - $^ $(LDLIBS) - - + $(CXX) $(LDFLAGS) -o $(LIBDIR)/$(GLUT_DLL) $^ $(LDLIBS) + $(DLLTOOL) --as=as --dllname $(LIB_NAME) --output-def $(LIBDIR)/$(GLUT_DEF) $^ + $(DLLTOOL) --as=as -k --dllname $(LIB_NAME) --output-lib $(LIBDIR)/$(GLUT_IMP) --def $(LIBDIR)/$(GLUT_DEF) clean: -$(call UNLINK,*.o)
\ No newline at end of file |