mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-06 20:45:54 +01:00
Make cegcc the default build environment for wince. Make inclusion of hacks needed to work with mingw/pocketpc-sdk conditional.
This commit is contained in:
parent
f3b8867518
commit
de6e0d4f2d
4 changed files with 43 additions and 13 deletions
|
@ -22,26 +22,42 @@ PLATFORM = wince
|
||||||
TARGET_OS ?= win32
|
TARGET_OS ?= win32
|
||||||
#TARGET_OS = wince
|
#TARGET_OS = wince
|
||||||
|
|
||||||
MINGW_INC_PATH ?= /usr/i586-mingw32msvc/include
|
# The preferred build environment for wince is now cegcc. Debian's
|
||||||
|
# pocketpc-sdk works in combination with the mingw projects headers,
|
||||||
|
# but not without effort. cegcc has its own version of those headers
|
||||||
|
# that it refers to without need for a -I flag. They work well. But
|
||||||
|
# I'd like to retain the ability to build using pocketpc-sdk if
|
||||||
|
# possible.
|
||||||
|
|
||||||
|
# USE_RAW_MINGW = -DUSE_RAW_MINGW
|
||||||
|
# arm-wince-mingw32ce for cegcc, arm-wince-pe for pocketpc-gcc
|
||||||
|
ifdef USE_RAW_MINGW
|
||||||
|
MINGW_INC_PATH ?= -I/usr/i586-mingw32msvc/include
|
||||||
|
CE_ARCH = arm-wince-pe
|
||||||
|
else
|
||||||
|
MINGW_INC_PATH = #in case it's in env
|
||||||
|
CE_ARCH = arm-wince-mingw32ce
|
||||||
|
endif
|
||||||
|
CEOPT_ROOT ?= /opt
|
||||||
|
|
||||||
# This requires custom Debian pocketpc-sdk package at the moment
|
# This requires custom Debian pocketpc-sdk package at the moment
|
||||||
HAVE_COMMCTRL = 1
|
HAVE_COMMCTRL = 1
|
||||||
|
|
||||||
# arm-wince-mingw32ce for cegcc, arm-wince-pe for pocketpc-gcc
|
|
||||||
#ARCH = arm-wince-pe
|
|
||||||
ARCH = arm-wince-mingw32ce
|
|
||||||
ifeq ($(TARGET_OS),wince)
|
ifeq ($(TARGET_OS),wince)
|
||||||
# BLUETOOTH = -DXWFEATURE_BLUETOOTH
|
# BLUETOOTH = -DXWFEATURE_BLUETOOTH
|
||||||
# RELAY = -DXWFEATURE_RELAY -DCOMMS_HEARTBEAT
|
# RELAY = -DXWFEATURE_RELAY -DCOMMS_HEARTBEAT
|
||||||
CC = ${ARCH}-gcc
|
CC = ${CE_ARCH}-gcc
|
||||||
WINDRES = ${ARCH}-windres
|
WINDRES = ${CE_ARCH}-windres
|
||||||
STRIP = ${ARCH}-strip
|
STRIP = ${CE_ARCH}-strip
|
||||||
#CELIBS = -L/usr/arm-wince-pe/lib
|
ifdef USE_RAW_MINGW
|
||||||
CELIBS = -L${CEOPT_ROOT}/opt/${ARCH}/lib/ -lws2
|
CELIBS = -L/usr/arm-wince-pe/lib
|
||||||
|
else
|
||||||
|
CELIBS = -L${CEOPT_ROOT}/${CE_ARCH}/lib/ -lws2
|
||||||
|
endif
|
||||||
TARGET_OS_DEF = -DTARGET_OS_WINCE
|
TARGET_OS_DEF = -DTARGET_OS_WINCE
|
||||||
STANDALONE = -DXWFEATURE_STANDALONE_ONLY
|
STANDALONE = -DXWFEATURE_STANDALONE_ONLY
|
||||||
CFLAGS += -D_WIN32_WCE=400 -DUNDER_CE -DMY_COLOR_SEL \
|
CFLAGS += -D_WIN32_WCE=400 -DUNDER_CE -DMY_COLOR_SEL \
|
||||||
$(STANDALONE) -DDRAW_LINK_DIRECT \
|
$(STANDALONE) $(USE_RAW_MINGW) -DDRAW_LINK_DIRECT \
|
||||||
-fdollars-in-identifiers -D__W32API_USE_DLLIMPORT__
|
-fdollars-in-identifiers -D__W32API_USE_DLLIMPORT__
|
||||||
RESFLAGS += -DMY_COLOR_SEL -D_WIN32_WCE=400
|
RESFLAGS += -DMY_COLOR_SEL -D_WIN32_WCE=400
|
||||||
LFLAGS += -Wl,--major-subsystem-version,4,--minor-subsystem-version,20
|
LFLAGS += -Wl,--major-subsystem-version,4,--minor-subsystem-version,20
|
||||||
|
@ -65,7 +81,7 @@ CFLAGS += -DCANT_DO_CMDBAR -DDRAW_LINK_DIRECT
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CFLAGS += -DARM -I$(MINGW_INC_PATH) -I./ -I../common -I../relay
|
CFLAGS += -DARM -I./ -I../common -I../relay
|
||||||
|
|
||||||
CFLAGS += -Wall -Wunused-parameter
|
CFLAGS += -Wall -Wunused-parameter
|
||||||
|
|
||||||
|
@ -110,6 +126,7 @@ WINCESRC = \
|
||||||
cestrbx.c \
|
cestrbx.c \
|
||||||
cedraw.c \
|
cedraw.c \
|
||||||
debhacks.c \
|
debhacks.c \
|
||||||
|
cedebug.c \
|
||||||
|
|
||||||
WINCEOBJS = $(patsubst %.c,%.o,$(addprefix $(OBJDIR)/,$(WINCESRC)))
|
WINCEOBJS = $(patsubst %.c,%.o,$(addprefix $(OBJDIR)/,$(WINCESRC)))
|
||||||
|
|
||||||
|
@ -159,7 +176,7 @@ $(OBJDIR)/%.o : ../common/%.c $(INCLUDES)
|
||||||
$(CC) -c $(CFLAGS) -o $@ $<
|
$(CC) -c $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
$(OBJDIR)/xwords4.rc.o : xwords4.rc $(INCLUDES)
|
$(OBJDIR)/xwords4.rc.o : xwords4.rc $(INCLUDES)
|
||||||
$(WINDRES) -v -I$(MINGW_INC_PATH) $(RESFLAGS) -o $@ $<
|
$(WINDRES) -v $(MINGW_INC_PATH) $(RESFLAGS) -o $@ $<
|
||||||
|
|
||||||
CAB: $(TARGET)
|
CAB: $(TARGET)
|
||||||
$(STRIP) $<
|
$(STRIP) $<
|
||||||
|
|
|
@ -114,6 +114,15 @@ makeAndDrawBitmap( CEDrawCtx* XP_UNUSED(dctx), HDC hdc, const RECT* bnds, XP_Boo
|
||||||
#endif
|
#endif
|
||||||
} /* makeAndDrawBitmap */
|
} /* makeAndDrawBitmap */
|
||||||
|
|
||||||
|
#if defined _WIN32_WCE && ! defined USE_RAW_MINGW
|
||||||
|
/* This is part of the win32 libs but not of ce apparently */
|
||||||
|
static BOOL
|
||||||
|
GetTextExtentPoint32W( HDC hdc, LPCWSTR str, int i, LPSIZE siz )
|
||||||
|
{
|
||||||
|
return GetTextExtentExPointW(hdc, str, i, 0, NULL, NULL, siz );
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
measureText( CEDrawCtx* dctx, const XP_UCHAR* str, XP_S16 padding,
|
measureText( CEDrawCtx* dctx, const XP_UCHAR* str, XP_S16 padding,
|
||||||
XP_U16* widthP, XP_U16* heightP )
|
XP_U16* widthP, XP_U16* heightP )
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef _WIN32_WCE
|
#if defined _WIN32_WCE && defined USE_RAW_MINGW
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <commctrl.h>
|
#include <commctrl.h>
|
||||||
|
|
|
@ -24,6 +24,8 @@
|
||||||
#ifndef _DEBHACKS_H_
|
#ifndef _DEBHACKS_H_
|
||||||
#define _DEBHACKS_H_
|
#define _DEBHACKS_H_
|
||||||
|
|
||||||
|
#if defined USE_RAW_MINGW
|
||||||
|
|
||||||
#ifdef USE_DEB_HACKS
|
#ifdef USE_DEB_HACKS
|
||||||
|
|
||||||
#define DH(func) debhack_##func
|
#define DH(func) debhack_##func
|
||||||
|
@ -63,4 +65,6 @@ BOOL DH(ResetEvent)(HANDLE);
|
||||||
/* got this somewhere else via google */
|
/* got this somewhere else via google */
|
||||||
#define SHCMBF_HMENU 0x0010
|
#define SHCMBF_HMENU 0x0010
|
||||||
|
|
||||||
|
#endif /* USE_RAW_MINGW */
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue