From 61d40373640c0cabdaef4d4381ac5ae636fab642 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 7 Jun 2009 01:56:21 +0000 Subject: Detect Windows CE target and build/include libc_wince files as necessary. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1561 --- Makefile.am | 2 +- configure.in | 15 +++++++++++++++ src/Makefile.am | 1 + wince/Makefile.am | 8 ++++++++ 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 40de5828..e4b7c825 100644 --- a/Makefile.am +++ b/Makefile.am @@ -44,7 +44,7 @@ EXTRA_DIST= \ MAINTAINERCLEANFILES = $(AUX_DIST_GEN) docdir=$(prefix)/share/doc/@PACKAGE@ -SUBDIRS=textscreen pcsound src man setup +SUBDIRS=wince textscreen pcsound src man setup if HAVE_PYTHON diff --git a/configure.in b/configure.in index 15ef200a..5a1dfab2 100644 --- a/configure.in +++ b/configure.in @@ -53,6 +53,19 @@ AC_CHECK_LIB(SDL_net,SDLNet_UDP_Send,[ exit -1 ]) +# Windows CE build? + +WINDOWS_CE=false + +case "$host" in + *mingw32ce*|*cegcc*|*wince*) + CFLAGS="-I../wince $CFLAGS" + WINDOWS_CE=true + ;; + *) + ;; +esac + AC_CHECK_HEADERS([linux/kd.h dev/isa/spkrio.h dev/speaker/speaker.h]) AC_CHECK_FUNCS(mmap sched_setaffinity) @@ -61,6 +74,7 @@ AC_CHECK_LIB(samplerate, src_new) AC_CHECK_TOOL(WINDRES, windres, ) +AM_CONDITIONAL(WINDOWS_CE, $WINDOWS_CE) AM_CONDITIONAL(HAVE_WINDRES, test "$WINDRES" != "") AM_CONDITIONAL(HAVE_PYTHON, $HAVE_PYTHON) @@ -86,6 +100,7 @@ AC_DEFUN([AC_DATAROOTDIR_CHECKED]) AC_OUTPUT([ Makefile +wince/Makefile textscreen/Makefile textscreen/examples/Makefile setup/Makefile diff --git a/src/Makefile.am b/src/Makefile.am index 63ddc98f..64e23b79 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -170,6 +170,7 @@ chocolate_doom_SOURCES=$(SOURCE_FILES) endif chocolate_doom_LDADD = \ + ../wince/libc_wince.a \ ../textscreen/libtextscreen.a \ ../pcsound/libpcsound.a \ @LDFLAGS@ \ diff --git a/wince/Makefile.am b/wince/Makefile.am index f6c87759..7d694377 100644 --- a/wince/Makefile.am +++ b/wince/Makefile.am @@ -1,8 +1,16 @@ noinst_LIBRARIES=libc_wince.a +if WINDOWS_CE + libc_wince_a_SOURCES = \ env.c env.h \ errno.c errno.h \ fileops.c fileops.h +else + +libc_wince_a_SOURCES = + +endif + -- cgit v1.2.3