2018-10-10 02:29:15 +00:00
|
|
|
# For cross-compiling from Linux to Windows 32-bit using mingw32
|
|
|
|
# http://mingw-w64.org/
|
2010-09-22 19:38:25 +00:00
|
|
|
#
|
2021-08-28 23:30:13 +00:00
|
|
|
# Ubuntu/Debian:
|
2018-10-10 02:29:15 +00:00
|
|
|
# $ sudo apt install mingw-w64
|
2010-09-22 19:38:25 +00:00
|
|
|
# $ make SYSTEM=linux-mingw32
|
|
|
|
|
2021-08-28 23:30:13 +00:00
|
|
|
NAME := glew32
|
|
|
|
HOST := i686-w64-mingw32
|
|
|
|
GLEW_DEST ?= /usr/local/$(HOST)
|
2016-02-19 12:09:15 +00:00
|
|
|
CC := $(HOST)-gcc
|
|
|
|
LD := $(HOST)-ld
|
2012-02-15 19:15:40 +00:00
|
|
|
LN :=
|
|
|
|
STRIP :=
|
2018-10-10 02:29:15 +00:00
|
|
|
LDFLAGS.GL = -L/usr/$(HOST)/lib -lopengl32 -lgdi32 -luser32 -lkernel32
|
2021-08-28 23:30:13 +00:00
|
|
|
CFLAGS.EXTRA += -fno-builtin -fno-stack-protector -Wno-cast-function-type
|
2010-09-22 19:38:25 +00:00
|
|
|
WARN = -Wall -W
|
|
|
|
POPT = -O2
|
|
|
|
BIN.SUFFIX = .exe
|
2011-02-19 05:02:26 +00:00
|
|
|
LIB.SONAME = lib$(NAME).dll
|
|
|
|
LIB.DEVLNK = lib$(NAME).dll.a # for mingw this is the dll import lib
|
|
|
|
LIB.SHARED = $(NAME).dll
|
2014-09-27 03:05:04 +00:00
|
|
|
LIB.STATIC = lib$(NAME).a # the static lib will be broken
|
2018-10-10 02:29:15 +00:00
|
|
|
LDFLAGS.SO = -nostdlib -shared -soname $(LIB.SONAME) --out-implib lib/$(LIB.DEVLNK)
|