Document AWESOME_CFLAGS, and use only with gcc

awesome's default compiler flags work only with gcc, so we only use
them if gcc is detected.

Additionally, you can now avoid using these default flags by adding
AWESOME_CFLAGS="" to your make command lines.
This commit is contained in:
Hans Ulrich Niedermann 2008-01-04 21:43:47 +01:00 committed by Julien Danjou
parent a4c09d142c
commit 7cad659806
3 changed files with 9 additions and 0 deletions

View File

@ -32,11 +32,15 @@ defconfig.h: $(srcdir)/awesomerc
@$(SED) 's,\\,\\\\,g;s/$$/ \\/;s/"/\\"/g' "$(srcdir)/awesomerc" >> defconfig.h
@echo "\"" >> defconfig.h
if USING_GCC
# If you are using gcc, and want to deactivate this default set of
# compile flags, run make with AWESOME_CFLAGS="".
AWESOME_CFLAGS = -std=gnu99 -ggdb3 -pipe \
-Wall -Wextra \
-Wundef -Wshadow -Wcast-align -Wwrite-strings -Wsign-compare \
-Wunused -Winit-self -Wpointer-arith -Wredundant-decls \
-Wmissing-prototypes -Wmissing-format-attribute -Wmissing-noreturn
endif
AM_CPPFLAGS = $(XFT_CFLAGS) $(X_CFLAGS) $(CAIRO_CFLAGS) $(CONFUSE_CFLAGS) $(XRANDR_CFLAGS) $(XINERAMA_CFLAGS) $(AWESOME_CFLAGS)
bin_PROGRAMS += awesome

3
README
View File

@ -24,6 +24,9 @@ proper parameters, and build and install:
make
make install # might need root permissions
If you're using gcc as your compiler and do not want awesome's default set
of warning flags, add AWESOME_CFLAGS="" to your "make" lines.
Running awesome
-----------
Add the following line to your .xinitrc to start awesome using startx

View File

@ -41,6 +41,8 @@ AM_CONDITIONAL([HAVE_ASCIIDOC], [test "x$ASCIIDOC" != "x:"])
AM_CONDITIONAL([HAVE_XMLTO], [test "x$XMLTO" != "x:"])
AM_CONDITIONAL([HAVE_DOXYGEN], [test "x$DOXYGEN" != "x:"])
AM_CONDITIONAL([USING_GCC], [test "x$GCC" = "xyes"])
# Checks for libraries.
AC_PATH_XTRA
PKG_CHECK_MODULES([CAIRO], [cairo],,