kusano 7d535a
# For cross-compiling from Linux to Windows x86 using mingw32
kusano 7d535a
# http://www.mingw.org/
kusano 7d535a
#
kusano 7d535a
# $ make SYSTEM=linux-mingw32
kusano 7d535a
#
kusano 7d535a
kusano 7d535a
NAME  := glew32
kusano 7d535a
CC    := i586-mingw32msvc-gcc
kusano 7d535a
LD    := i586-mingw32msvc-ld
kusano 7d535a
LN    :=
kusano 7d535a
STRIP :=
kusano 7d535a
CFLAGS.SO = -DGLEW_BUILD
kusano 7d535a
LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32
kusano 7d535a
WARN = -Wall -W
kusano 7d535a
POPT = -O2
kusano 7d535a
BIN.SUFFIX = .exe
kusano 7d535a
LIB.SONAME    = lib$(NAME).dll
kusano 7d535a
LIB.DEVLNK    = lib$(NAME).dll.a    # for mingw this is the dll import lib
kusano 7d535a
LIB.SHARED    = $(NAME).dll
kusano 7d535a
LIB.STATIC    = lib$(NAME).a        # the static lib will be broken (see CFLAGS.SO)
kusano 7d535a
LDFLAGS.SO    = -shared -soname $(LIB.SONAME) --out-implib lib/$(LIB.DEVLNK)
kusano 7d535a
LIB.SONAME.MX = lib$(NAME)mx.dll
kusano 7d535a
LIB.DEVLNK.MX = lib$(NAME)mx.dll.a  # for mingw this is the dll import lib
kusano 7d535a
LIB.SHARED.MX = $(NAME)mx.dll
kusano 7d535a
LIB.STATIC.MX = lib$(NAME)mx.a      # the static lib will be broken (see CFLAGS.SO)
kusano 7d535a
LDFLAGS.SO.MX = -shared -soname $(LIB.SONAME.MX) --out-implib lib/$(LIB.DEVLNK.MX)