diff options
author | Brian <brian.paul@tungstengraphics.com> | 2007-07-27 11:12:21 -0600 |
---|---|---|
committer | Brian <brian.paul@tungstengraphics.com> | 2007-07-27 11:12:21 -0600 |
commit | 121b4ac22072a0fbd2f3ed30cafe4e69403c72c2 (patch) | |
tree | 7d8eb6d9d566ef9e3fd20cd8b9bf4576fae038ac /src/glu/sgi | |
parent | cdbd5db3afc1ba3e6dca8b2af622f719324944e0 (diff) |
More Mingw32 fixes from Zhang (zxpmyth@yahoo.com.cn)
Diffstat (limited to 'src/glu/sgi')
-rw-r--r-- | src/glu/sgi/Makefile.mgw | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/src/glu/sgi/Makefile.mgw b/src/glu/sgi/Makefile.mgw index 43b421e737..d00d97a3b6 100644 --- a/src/glu/sgi/Makefile.mgw +++ b/src/glu/sgi/Makefile.mgw @@ -70,30 +70,31 @@ TOOLS_PREFIX = mingw32- TOP = ../../.. - LIBDIR = $(TOP)/lib -GLU_DLL = glu32.dll -GLU_IMP = libglu32.a -GLU_DEF = glu.def +LIB_NAME = glu32 +DLL_EXT = .dll +IMP_EXT = .a +LIB_PRE = lib +STRIP = -s + +AR = ar +ARFLAGS = crus +DLLTOOL = dlltool -include $(TOP)/configs/config.mgw -GL_USING_STDCALL ?= 1 +GLU_DLL = $(LIB_NAME)$(DLL_EXT) +GLU_IMP = $(LIB_PRE)$(LIB_NAME)$(IMP_EXT) +GLU_DEF = $(LIB_NAME).def LDLIBS = -L$(LIBDIR) -lopengl32 -LDFLAGS = -Wl,--out-implib=$(LIBDIR)/$(GLU_IMP) -Wl,--output-def=$(LIBDIR)/$(GLU_DEF) +LDFLAGS = $(STRIP) -shared -fPIC -Wl,--kill-at CFLAGS += -DBUILD_GLU32 -D_DLL -ifeq ($(GL_USING_STDCALL),1) - LDFLAGS += -Wl,--add-stdcall-alias -else - CFLAGS += -DGL_NO_STDCALL -endif -CC = gcc +CC = $(TOOLS_PREFIX)gcc CFLAGS += -DNDEBUG -DLIBRARYBUILD -I$(TOP)/include -Iinclude -CXX = g++ +CXX = $(TOOLS_PREFIX)g++ CXXFLAGS = $(CFLAGS) -Ilibnurbs/internals -Ilibnurbs/interface -Ilibnurbs/nurbtess AR = ar @@ -216,9 +217,9 @@ $(LIBDIR): mkdir -p $(LIBDIR) $(LIBDIR)/$(GLU_DLL) $(LIBDIR)/$(GLU_IMP): $(OBJECTS) - g++ -shared -fPIC -o $(LIBDIR)/$(GLU_DLL) $(LDFLAGS) \ - $^ $(LDLIBS) - + $(CXX) $(LDFLAGS) -o $(LIBDIR)/$(GLU_DLL) $^ $(LDLIBS) + $(DLLTOOL) --as=as --dllname $(LIB_NAME) --output-def $(LIBDIR)/$(GLU_DEF) $^ + $(DLLTOOL) --as=as -k --dllname $(LIB_NAME) --output-lib $(LIBDIR)/$(GLU_IMP) --def $(LIBDIR)/$(GLU_DEF) clean: |