global_win32.mak 1.8 KB
Newer Older
1 2 3 4 5 6 7
#
# global.mak
#
# This file should be included by all Makefile.mingw files for project
# wide definitions.
#

8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
OS:=$(OS)

ifeq ($(OS),)
	CROSSCOMPILER=i586-mingw32msvc-
else
	CROSSCOMPILER=
endif

CC = $(CROSSCOMPILER)gcc
AR = $(CROSSCOMPILER)ar
RANLIB = $(CROSSCOMPILER)ranlib
WINDRES = $(CROSSCOMPILER)windres

ifneq ($(CROSSCOMPILER),)
	GLIB_GENMARSHAL := glib-genmarshal
else
	GLIB_GENMARSHAL := $(GTK_TOP)/bin/glib-genmarshal.exe
endif
26 27 28 29

# Use -g flag when building debug version of Gcompris (including plugins).
# Use -fnative-struct instead of -mms-bitfields when using mingw 1.1
# (gcc 2.95)
30 31
CFLAGS += -g -Wall -mno-cygwin -mms-bitfields
LDFLAGS = -mwindows
32 33 34

# If not specified, dlls are built with the default base address of 0x10000000.
# When loaded into a process address space a dll will be rebased if its base
35
# address colides with the base address of an existing dll.  To avoid rebasing
36 37 38 39 40
# we do the following.  Rebasing can slow down the load time of dlls and it
# also renders debug info useless.
DLL_LD_FLAGS += -Wl,--enable-auto-image-base

DEFINES += 	-DHAVE_CONFIG_H
41 42 43 44 45 46 47

ifneq ($(CROSSCOMPILER),)
	# CROSS COMPILATION
	LOCAL_PREFIX:=/home/bruno/Projets/gcompris/windows
	MAKENSIS:=makensis
else
	# MSYS CASE
48
	LOCAL_PREFIX:=/X
49 50 51 52 53 54
	MAKENSIS:="/c/Program Files/NSIS/makensis.exe"
endif

GTK_TOP :=		$(LOCAL_PREFIX)/gtk
GLIB_TOP :=		$(LOCAL_PREFIX)/gtk
CAIRO_TOP :=		$(LOCAL_PREFIX)/gtk
55 56 57
RSVG_TOP :=		$(LOCAL_PREFIX)/gtk
CROCO_TOP :=		$(LOCAL_PREFIX)/gtk
GSF_TOP :=		$(LOCAL_PREFIX)/gtk
58 59 60 61 62 63
LIBXML2_TOP :=		$(LOCAL_PREFIX)/libxml2
SDL_TOP :=		$(LOCAL_PREFIX)/sdl
GNUCHESS_TOP :=		$(LOCAL_PREFIX)/gnuchess
PYTHON_TOP :=		$(LOCAL_PREFIX)/Python26
GNUCAP_TOP :=		$(LOCAL_PREFIX)/gnucap
SQLITE_TOP :=		$(LOCAL_PREFIX)/sqlite
64
FONTCONFIG_TOP :=	$(LOCAL_PREFIX)/gtk
65 66
ICONV_TOP :=		$(LOCAL_PREFIX)/iconv
FREETYPE_TOP :=		$(LOCAL_PREFIX)/freetype