qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 12/37] generate CPPFLAGS and LIBS on ./configure


From: quintela
Subject: [Qemu-devel] [PATCH 12/37] generate CPPFLAGS and LIBS on ./configure
Date: Fri, 17 Jul 2009 21:21:05 +0200

From: Juan Quintela <address@hidden>


Signed-off-by: Juan Quintela <address@hidden>
---
 Makefile        |    2 +-
 Makefile.target |    3 +--
 configure       |   11 ++++++++++-
 3 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 0bdf188..5c8c453 100644
--- a/Makefile
+++ b/Makefile
@@ -19,7 +19,7 @@ VPATH=$(SRC_PATH):$(SRC_PATH)/hw
 CPPFLAGS += -I. -I$(SRC_PATH) -MMD -MP -MT $@
 CPPFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
 CPPFLAGS += -U_FORTIFY_SOURCE
-LIBS=
+
 ifdef CONFIG_STATIC
 LDFLAGS += -static
 endif
diff --git a/Makefile.target b/Makefile.target
index b7a3f4d..8c07c57 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -3,9 +3,8 @@ include $(SRC_PATH)/rules.mak

 TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH)
 VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw
-CPPFLAGS=-I. -I.. -I$(TARGET_PATH) -I$(SRC_PATH) -MMD -MT $@ -MP -DNEED_CPU_H
+CPPFLAGS+=-I. -I.. -I$(TARGET_PATH) -I$(SRC_PATH) -MMD -MT $@ -MP -DNEED_CPU_H
 #CFLAGS+=-Werror
-LIBS=

 ifdef CONFIG_USER_ONLY
 # user emulator name
diff --git a/configure b/configure
index f05ace5..80bb663 100755
--- a/configure
+++ b/configure
@@ -527,6 +527,11 @@ for opt do
   esac
 done

+# LIBS = libraries that we want to use for linking
+# CPPFFLAGS = flags for cpp, they are passed both to .c and .s files
+# CFLAGS = flags for CC, they are passed to .c files
+# LDFLAGS = flags passed to ld
+
 # default flags for all hosts
 CFLAGS="$CFLAGS -g -fno-strict-aliasing"
 if test "$debug" = "no" ; then
@@ -534,6 +539,8 @@ if test "$debug" = "no" ; then
 fi
 CFLAGS="$CFLAGS -Wall -Wundef -Wendif-labels -Wwrite-strings 
-Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls"
 LDFLAGS="$LDFLAGS -g"
+CPPFLAGS=
+LIBS=

 # Consult white-list to determine whether to enable werror
 # by default.  Only enable by default for git builds
@@ -1836,6 +1843,8 @@ echo "OBJCOPY=$objcopy" >> $config_host_mak
 echo "LD=$ld" >> $config_host_mak
 echo "CFLAGS=$CFLAGS $OS_CFLAGS $ARCH_CFLAGS $EXTRA_CFLAGS" >> $config_host_mak
 echo "LDFLAGS=$LDFLAGS $OS_LDFLAGS $ARCH_LDFLAGS $EXTRA_LDFLAGS" >> 
$config_host_mak
+echo "CPPFLAGS=$CPPFLAGS" >> $config_host_mak
+echo "LIBS=$LIBS" >> $config_host_mak
 echo "EXESUF=$EXESUF" >> $config_host_mak
 echo "PTHREADLIBS=$PTHREADLIBS" >> $config_host_mak
 echo "CLOCKLIBS=$CLOCKLIBS" >> $config_host_mak
@@ -2140,5 +2149,5 @@ for hwlib in 32 64; do
   rm -f $d/Makefile
   ln -s $source_path/Makefile.hw $d/Makefile
   echo "HWLIB=libqemuhw$hwlib.a" > $d/config.mak
-  echo "CPPFLAGS=-DTARGET_PHYS_ADDR_BITS=$hwlib" >> $d/config.mak
+  echo "CPPFLAGS+=-DTARGET_PHYS_ADDR_BITS=$hwlib" >> $d/config.mak
 done
-- 
1.6.2.5





reply via email to

[Prev in Thread] Current Thread [Next in Thread]