summaryrefslogtreecommitdiffstats
path: root/src/mesa/Makefile.mgw
diff options
context:
space:
mode:
authorJouk <[email protected]>2007-10-02 15:17:23 +0200
committerJouk <[email protected]>2007-10-02 15:17:23 +0200
commit584b84256b07e106cd7295495355eb21226465d7 (patch)
tree028d47d265d01f3f96787792fbd41d495d60856c /src/mesa/Makefile.mgw
parenteb9a5b6d5127858b01ec12672c999e7d25cd7aed (diff)
parentde1d725f442caa4d8ecbac3256b5a33d1f4a1257 (diff)
Merge branch 'master' of git+ssh://[email protected]/git/mesa/mesa
Diffstat (limited to 'src/mesa/Makefile.mgw')
-rw-r--r--src/mesa/Makefile.mgw52
1 files changed, 26 insertions, 26 deletions
diff --git a/src/mesa/Makefile.mgw b/src/mesa/Makefile.mgw
index 3b52834bd1c..6244ded8768 100644
--- a/src/mesa/Makefile.mgw
+++ b/src/mesa/Makefile.mgw
@@ -69,39 +69,37 @@
# Set this to the prefix of your build tools, i.e. mingw32-
TOOLS_PREFIX = mingw32-
+ifeq ($(ICD),1)
+ LIB_NAME = mesa32
+else
+ LIB_NAME = opengl32
+endif
+DLL_EXT = .dll
+IMP_EXT = .a
+LIB_PRE = lib
+STRIP = -s
+
+AR = ar
+ARFLAGS = crus
+DLLTOOL = dlltool
TOP = ../..
GLIDE ?= $(TOP)/glide3
LIBDIR = $(TOP)/lib
-ifeq ($(ICD),1)
- GL_DLL = mesa32.dll
- GL_IMP = libmesa32.a
-else
- GL_DLL = opengl32.dll
- GL_IMP = libopengl32.a
-endif
-
-GL_DEF = gl.def
-include $(TOP)/configs/config.mgw
-GL_USING_STDCALL ?= 1
+GL_DLL = $(LIB_NAME)$(DLL_EXT)
+GL_IMP = $(LIB_PRE)$(LIB_NAME)$(IMP_EXT)
MESA_LIB = libmesa.a
+CC = $(TOOLS_PREFIX)gcc
LDLIBS = -lgdi32 -luser32 -liberty
-LDFLAGS = -Wl,--out-implib=$(LIBDIR)/$(GL_IMP) -Wl,--output-def=$(LIBDIR)/gl.def
-
-CC = $(TOOLS_PREFIX)gcc
-CFLAGS += -DBUILD_GL32 -D_OPENGL32_ -D_DLL -DMESA_MINWARN -DNDEBUG -D_USRDLL -DGDI_EXPORTS
+LDFLAGS = $(STRIP) -shared -fPIC -Wl,--kill-at
-ifeq ($(GL_USING_STDCALL),1)
- LDFLAGS += -Wl,--add-stdcall-alias
-else
- CFLAGS += -DGL_NO_STDCALL
-endif
+CFLAGS += -DBUILD_GL32 -D_DLL -DMESA_MINWARN
+CFLAGS += -DNDEBUG -DUSE_EXTERNAL_DXTN_LIB=1
-CFLAGS += -DUSE_EXTERNAL_DXTN_LIB=1
ifeq ($(FX),1)
CFLAGS += -I$(GLIDE)/include -DFX
LDLIBS += -L$(GLIDE)/lib -lglide3x
@@ -112,12 +110,11 @@ else
CFLAGS += -DUSE_MGL_NAMESPACE
GL_DEF = drivers/windows/icd/mesa.def
else
- GL_DEF = drivers/windows/gdi/mesa.def
+ GL_DEF = $(LIB_NAME).def
endif
endif
-AR = ar
-ARFLAGS = crus
+
UNLINK = del $(subst /,\,$(1))
ifneq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),)
@@ -173,14 +170,17 @@ RESOURCE = $(GL_RES:.rc=.res)
.rc.res:
windres -o $@ -Irc -Ocoff $<
+
all: $(LIBDIR) $(LIBDIR)/$(GL_DLL) $(LIBDIR)/$(GL_IMP)
$(LIBDIR):
mkdir -p $(LIBDIR)
$(LIBDIR)/$(GL_DLL) $(LIBDIR)/$(GL_IMP): $(OBJECTS) $(RESOURCE)
- $(CC) -shared -fPIC -o $(LIBDIR)/$(GL_DLL) $(LDFLAGS) \
- $^ $(LDLIBS)
+ $(CC) $(LDFLAGS) -o $(LIBDIR)/$(GL_DLL) $^ $(LDLIBS)
+ $(DLLTOOL) --as=as --dllname $(LIB_NAME) --output-def $(LIBDIR)/$(GL_DEF) $^
+ $(DLLTOOL) --as=as -k --dllname $(LIB_NAME) --output-lib $(LIBDIR)/$(GL_IMP) --def $(LIBDIR)/$(GL_DEF)
+
$(X86_OBJECTS): x86/matypes.h