foxygit / doom Log in
commit ec03448333ca4c1d996dcb2b9c9ac01522a271bd
Author:     Simon Howard <fraggle@gmail.com>
AuthorDate: Thu Jun 11 00:32:17 2009 +0000
Commit:     Simon Howard <fraggle@gmail.com>
CommitDate: Thu Jun 11 00:32:17 2009 +0000

    Fix wince include. Use top_builddir instead of .. where appropriate.

    Subversion-branch: /branches/raven-branch
    Subversion-revision: 1591
---
 configure.in                    |  2 +-
 src/Makefile.am                 | 29 ++++++++++++++++-------------
 src/heretic/Makefile.am         |  4 +++-
 src/setup/Makefile.am           |  4 +++-
 textscreen/Makefile.am          |  2 +-
 textscreen/examples/Makefile.am |  2 +-
 6 files changed, 25 insertions(+), 18 deletions(-)

diff --git a/configure.in b/configure.in
index 42400e09..9fac0bc1 100644
--- a/configure.in
+++ b/configure.in
@@ -59,7 +59,7 @@ WINDOWS_CE=false

 case "$host" in
     *mingw32ce*|*cegcc*|*wince*)
-        CFLAGS="-I../wince $CFLAGS"
+        CFLAGS="-I\$(top_builddir)/wince $CFLAGS"
         WINDOWS_CE=true
         ;;
     *)
diff --git a/src/Makefile.am b/src/Makefile.am
index e51f6727..f885f828 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -9,7 +9,9 @@ games_PROGRAMS = chocolate-doom     \
                  chocolate-server   \
                  chocolate-setup

-AM_CFLAGS = -I../textscreen -I../pcsound @SDLMIXER_CFLAGS@ @SDLNET_CFLAGS@
+AM_CFLAGS = -I$(top_builddir)/textscreen            \
+            -I$(top_builddir)/pcsound               \
+            @SDLMIXER_CFLAGS@ @SDLNET_CFLAGS@

 # Common source files used by absolutely everything:

@@ -114,14 +116,15 @@ SOURCE_FILES = $(COMMON_SOURCE_FILES)              \
                $(FEATURE_WAD_MERGE_SOURCE_FILES)   \
                $(FEATURE_SOUND_SOURCE_FILES)

-EXTRA_LIBS =                                       \
-               ../wince/libc_wince.a               \
-	       ../textscreen/libtextscreen.a       \
-	       ../pcsound/libpcsound.a             \
-	       @LDFLAGS@                           \
-	       @SDL_LIBS@                          \
-	       @SDLMIXER_LIBS@                     \
-	       @SDLNET_LIBS@
+
+EXTRA_LIBS =                                               \
+               $(top_builddir)/wince/libc_wince.a          \
+               $(top_builddir)/textscreen/libtextscreen.a  \
+               $(top_builddir)/pcsound/libpcsound.a        \
+               @LDFLAGS@                                   \
+               @SDL_LIBS@                                  \
+               @SDLMIXER_LIBS@                             \
+               @SDLNET_LIBS@

 if HAVE_WINDRES
 chocolate_doom_SOURCES=$(SOURCE_FILES) resource.rc
@@ -158,8 +161,8 @@ m_controls.c         m_controls.h          \
 z_native.c           z_zone.h

 chocolate_setup_SOURCES=$(SETUP_FILES) $(COMMON_SOURCE_FILES)
-chocolate_setup_LDADD = setup/libsetup.a                     \
-                        ../textscreen/libtextscreen.a        \
+chocolate_setup_LDADD = setup/libsetup.a                             \
+                        $(top_builddir)/textscreen/libtextscreen.a   \
                         @LDFLAGS@ @SDL_LIBS@ @SDLNET_LIBS@

 EXTRA_DIST =                        \
@@ -173,8 +176,8 @@ EXTRA_DIST =                        \

 if HAVE_PYTHON

-icon.c : ../data/doom.ico
-	../data/convert-icon $^ $@
+icon.c : $(top_builddir)/data/doom.ico
+	$(top_builddir)/data/convert-icon $^ $@

 endif

diff --git a/src/heretic/Makefile.am b/src/heretic/Makefile.am
index 6c54c0b8..2a2f8245 100644
--- a/src/heretic/Makefile.am
+++ b/src/heretic/Makefile.am
@@ -1,5 +1,7 @@

-AM_CFLAGS=-I.. -I../../textscreen @SDL_CFLAGS@ @SDLMIXER_CFLAGS@ @SDLNET_CFLAGS@
+AM_CFLAGS=-I..                                            \
+          -I$(top_builddir)/textscreen                    \
+          @SDL_CFLAGS@ @SDLMIXER_CFLAGS@ @SDLNET_CFLAGS@

 noinst_LIBRARIES=libheretic.a

diff --git a/src/setup/Makefile.am b/src/setup/Makefile.am
index 078eae24..737dd278 100644
--- a/src/setup/Makefile.am
+++ b/src/setup/Makefile.am
@@ -1,7 +1,9 @@

 gamesdir = $(prefix)/games

-AM_CFLAGS = @SDL_CFLAGS@ -I../../textscreen -I.. -DINSTALL_DIR="\"$(gamesdir)\""
+AM_CFLAGS = @SDL_CFLAGS@                                           \
+            -I$(top_builddir)/textscreen -I..                      \
+            -DINSTALL_DIR="\"$(gamesdir)\""

 noinst_LIBRARIES = libsetup.a

diff --git a/textscreen/Makefile.am b/textscreen/Makefile.am
index b8904520..51b3af13 100644
--- a/textscreen/Makefile.am
+++ b/textscreen/Makefile.am
@@ -1,5 +1,5 @@

-AM_CFLAGS = -I../src
+AM_CFLAGS = -I$(top_builddir)/src

 CTAGS_ARGS=-I TXT_UNCAST_ARG+

diff --git a/textscreen/examples/Makefile.am b/textscreen/examples/Makefile.am
index e314e7e8..efd17072 100644
--- a/textscreen/examples/Makefile.am
+++ b/textscreen/examples/Makefile.am
@@ -1,5 +1,5 @@

-AM_CFLAGS = -I.. -I../../src
+AM_CFLAGS = -I.. -I$(top_builddir)/src

 noinst_PROGRAMS=guitest calculator