Skip to content

Commit

Permalink
Fix Makefiles so that local headers are always preferred over system …
Browse files Browse the repository at this point in the history
…headers. Closes: #64.
  • Loading branch information
jlindgren90 committed Feb 1, 2012
1 parent c36b8fb commit bd57afc
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 35 deletions.
19 changes: 8 additions & 11 deletions src/audacious/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,14 @@ endif
include ../../buildsys.mk

ifeq ($(USE_DBUS),yes)
CPPFLAGS += -I../libaudclient
DBUS_BINDINGS = dbus-server-bindings.h dbus-client-bindings.h
LIBS += -L../libaudclient -laudclient
LIBS := -L../libaudclient -laudclient ${LIBS}
endif

pre-depend: ${DBUS_BINDINGS}

CPPFLAGS += \
-DHAVE_CONFIG_H \
CPPFLAGS := -I.. -I../.. \
${CPPFLAGS} \
${GLIB_CFLAGS} \
${GTHREAD_CFLAGS} \
${GTK_CFLAGS} \
Expand All @@ -108,17 +107,15 @@ CPPFLAGS += \
${PTHREAD_CFLAGS} \
-D_AUDACIOUS_CORE \
${EGGSM_CFLAGS} \
${LIBGUESS_CFLAGS} \
-I.. -I../..
${LIBGUESS_CFLAGS}

# Essential for efficient FFTs. --jlindgren
CFLAGS += -ffast-math

LIBS += ${LDADD} \
-lm \
-L../libaudcore -laudcore \
-L../libaudgui -laudgui \
-L../libaudtag -laudtag \
LIBS := -L../libaudcore -laudcore \
-L../libaudgui -laudgui \
-L../libaudtag -laudtag \
${LIBS} -lm \
${LIBINTL} \
${EGGSM_LIBS} \
${GLIB_LIBS} \
Expand Down
2 changes: 1 addition & 1 deletion src/audacious/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#include "config.h"

#ifdef USE_DBUS
#include "audctrl.h"
#include "../libaudclient/audctrl.h"
#include "dbus.h"
#endif

Expand Down
5 changes: 1 addition & 4 deletions src/audacious/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@
#include <mach-o/dyld.h>
#endif

#ifdef HAVE_CONFIG_H
# include "config.h"
#endif

#include <glib.h>
#include <stdlib.h>
#include <string.h>
Expand All @@ -48,6 +44,7 @@

#include <libaudcore/audstrings.h>

#include "config.h"
#include "debug.h"
#include "i18n.h"
#include "misc.h"
Expand Down
8 changes: 6 additions & 2 deletions src/audtool/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@ SRCS = main.c \
include ../../buildsys.mk
include ../../extra.mk

CPPFLAGS += -I.. -I../.. \
CPPFLAGS := -I.. -I../.. \
${CPPFLAGS} \
${AUDACIOUS_DEFINES} \
${DBUS_CFLAGS} \
${GTK_CFLAGS}

LIBS += -L../libaudclient -laudclient ${DBUS_LIBS} ${GTK_LIBS}
LIBS := -L../libaudclient -laudclient \
${LIBS} \
${DBUS_LIBS} \
${GTK_LIBS}
11 changes: 7 additions & 4 deletions src/libaudclient/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ include ../../extra.mk
pre-depend:
cd ../audacious; ${MAKE} ${MFLAGS} dbus-client-bindings.h

CPPFLAGS = ${CFLAGS} -D_AUDACIOUS_CORE -I.. -I../..
CFLAGS += ${LIB_CFLAGS} \
${GLIB_CFLAGS} \
${DBUS_CFLAGS}
CPPFLAGS := -I.. -I../.. \
${CPPFLAGS} \
${DBUS_CFLAGS} \
${GLIB_CFLAGS}

CFLAGS += ${LIB_CFLAGS}

LIBS += ${GLIB_LIBS} \
${DBUS_LIBS}
6 changes: 5 additions & 1 deletion src/libaudcore/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ include ../../extra.mk

includesubdir = libaudcore

CPPFLAGS += -DHAVE_CONFIG_H ${PTHREAD_CFLAGS} ${GLIB_CFLAGS} -I.. -I../..
CPPFLAGS := -I.. -I../.. \
${CPPFLAGS} \
${GLIB_CFLAGS} \
${PTHREAD_CFLAGS}

CFLAGS += ${LIB_CFLAGS}

LIBS += ${PTHREAD_LIBS} ${GLIB_LIBS} -lm
14 changes: 12 additions & 2 deletions src/libaudgui/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ include ../../extra.mk

includesubdir = libaudgui

CPPFLAGS += -DHAVE_CONFIG_H -I.. -I../.. ${GLIB_CFLASG} ${GTK_CFLAGS} ${DBUS_CFLAGS} ${AUDACIOUS_DEFINES} ${REGEX_CFLAGS}
CPPFLAGS := -I.. -I../.. \
${CPPFLAGS} \
${GLIB_CFLASG} \
${GTK_CFLAGS} \
${REGEX_CFLAGS}

CFLAGS += ${LIB_CFLAGS}
LIBS += -lm ${GLIB_LIBS} ${GTK_LIBS} ${REGEX_LIBS} -L../libaudcore -laudcore

LIBS := -L../libaudcore -laudcore \
${LIBS} -lm \
${GLIB_LIBS} \
${GTK_LIBS} \
${REGEX_LIBS}
5 changes: 1 addition & 4 deletions src/libaudgui/ui_jumptotrack_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
* Audacious or using our public API to be a derived work.
*/

#ifdef HAVE_CONFIG_H
# include "config.h"
#endif

#include <glib.h>

#include <stdlib.h>
Expand All @@ -34,6 +30,7 @@
#include <audacious/debug.h>
#include <audacious/playlist.h>

#include "config.h"
#include "ui_jumptotrack_cache.h"
#include "ui_regex.h"

Expand Down
5 changes: 1 addition & 4 deletions src/libaudgui/ui_urlopener.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@
* Audacious or using our public API to be a derived work.
*/

#ifdef HAVE_CONFIG_H
# include "config.h"
#endif

#include <glib.h>
#include <gtk/gtk.h>

Expand All @@ -32,6 +28,7 @@
#include <audacious/drct.h>
#include <audacious/misc.h>

#include "config.h"
#include "libaudgui.h"
#include "libaudgui-gtk.h"

Expand Down
10 changes: 8 additions & 2 deletions src/libaudtag/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ INCLUDES = audtag.h
include ../../buildsys.mk
include ../../extra.mk

CPPFLAGS += ${GLIB_CFLAGS} -D_AUDACIOUS_CORE -I.. -I../..
CPPFLAGS := -I.. -I../.. \
${CPPFLAGS} \
${GLIB_CFLAGS}

CFLAGS += ${LIB_CFLAGS}
LIBS += ${GLIB_LIBS} -L../libaudcore -laudcore

LIBS := -L../libaudcore -laudcore \
${LIBS} \
${GLIB_LIBS}

0 comments on commit bd57afc

Please sign in to comment.