changeset 19420:4f71ed7cb512

Move all internal -I parameters to the front of CFLAGS to avoid using external header files that happen to have the same name as internal ones. based on a patch by Vladislav Naumov, vladislav.naumov **at** gmail **dot** com
author diego
date Thu, 17 Aug 2006 17:19:56 +0000
parents 3ae6b0a6fffc
children 08ea0dbc6298
files Gui/Makefile input/Makefile liba52/Makefile libaf/Makefile libao2/Makefile libass/Makefile libdha/Makefile libmenu/Makefile libmpcodecs/Makefile libmpdemux/Makefile libmpeg2/Makefile libswscale/Makefile libvo/Makefile loader/dmo/Makefile loader/dshow/Makefile osdep/Makefile stream/Makefile vidix/drivers/Makefile
diffstat 18 files changed, 30 insertions(+), 30 deletions(-) [+]
line wrap: on
line diff
--- a/Gui/Makefile	Thu Aug 17 16:44:54 2006 +0000
+++ b/Gui/Makefile	Thu Aug 17 17:19:56 2006 +0000
@@ -4,7 +4,7 @@
 
 INCDIR  = -I. -I.. -I../loader -I./wm -I./skin
 
-CFLAGS = $(OPTFLAGS) $(INCDIR) -DDEBUG
+CFLAGS = $(INCDIR) $(OPTFLAGS) -DDEBUG
 
 ifeq ($(TARGET_WIN32),yes)
 SRCS = win32/dialogs.c \
--- a/input/Makefile	Thu Aug 17 16:44:54 2006 +0000
+++ b/input/Makefile	Thu Aug 17 17:19:56 2006 +0000
@@ -6,7 +6,7 @@
 SRCS=input.c joystick.c lirc.c 
 OBJS=$(SRCS:.c=.o)
 
-CFLAGS  = $(OPTFLAGS) -I. -I..
+CFLAGS  = -I. -I.. $(OPTFLAGS)
 
 .SUFFIXES: .c .o
 
--- a/liba52/Makefile	Thu Aug 17 16:44:54 2006 +0000
+++ b/liba52/Makefile	Thu Aug 17 17:19:56 2006 +0000
@@ -13,7 +13,7 @@
 
 OBJS	= $(SRCS:.c=.o)
 
-CFLAGS  = $(OPTFLAGS) -I..
+CFLAGS  = -I.. $(OPTFLAGS)
 
 .SUFFIXES: .c .o
 
--- a/libaf/Makefile	Thu Aug 17 16:44:54 2006 +0000
+++ b/libaf/Makefile	Thu Aug 17 17:19:56 2006 +0000
@@ -43,7 +43,7 @@
 
 OBJS=$(SRCS:.c=.o)
 
-CFLAGS  = $(OPTFLAGS) -I. -I.. $(LIBAV_INC) -D_GNU_SOURCE
+CFLAGS  = -I. -I.. $(LIBAV_INC) $(OPTFLAGS) -D_GNU_SOURCE
 
 ifeq ($(TARGET_OS),MINGW32)
 CFLAGS += -D_IO_H_
--- a/libao2/Makefile	Thu Aug 17 16:44:54 2006 +0000
+++ b/libao2/Makefile	Thu Aug 17 17:19:56 2006 +0000
@@ -10,7 +10,7 @@
 
 OBJS=$(SRCS:.c=.o)
 
-CFLAGS  = $(OPTFLAGS) -I. -I..
+CFLAGS  = -I. -I.. $(OPTFLAGS)
 
 .SUFFIXES: .c .o
 
--- a/libass/Makefile	Thu Aug 17 16:44:54 2006 +0000
+++ b/libass/Makefile	Thu Aug 17 17:19:56 2006 +0000
@@ -9,9 +9,9 @@
 
 OBJS=$(SRCS:.c=.o)
 
-CFLAGS  = $(OPTFLAGS) \
-          -I. -I.. \
+CFLAGS  = -I. -I.. \
           -I../libmpcodecs \
+          $(OPTFLAGS) \
           -D_GNU_SOURCE \
 
 .SUFFIXES: .c .o
--- a/libdha/Makefile	Thu Aug 17 16:44:54 2006 +0000
+++ b/libdha/Makefile	Thu Aug 17 17:19:56 2006 +0000
@@ -29,7 +29,7 @@
 
 OBJS=$(SRCS:.c=.o)
 
-CFLAGS  = $(OPTFLAGS) -fPIC -I. -I..
+CFLAGS  = -fPIC -I. -I.. $(OPTFLAGS)
 LIBS = 
 ifeq ($(TARGET_OS),OpenBSD)
 ifeq ($(TARGET_ARCH_X86),yes)
--- a/libmenu/Makefile	Thu Aug 17 16:44:54 2006 +0000
+++ b/libmenu/Makefile	Thu Aug 17 17:19:56 2006 +0000
@@ -18,7 +18,7 @@
 endif
 OBJS=$(SRCS:.c=.o)
 
-CFLAGS  = $(OPTFLAGS) -I. -I.. -I../libmpcodecs
+CFLAGS  = -I. -I.. -I../libmpcodecs $(OPTFLAGS)
 
 .SUFFIXES: .c .o
 
--- a/libmpcodecs/Makefile	Thu Aug 17 16:44:54 2006 +0000
+++ b/libmpcodecs/Makefile	Thu Aug 17 17:19:56 2006 +0000
@@ -317,13 +317,13 @@
 SRCS2=$(ENCODER_SRCS)
 OBJS2=$(SRCS2:.c=.o)
 
-CFLAGS  = $(OPTFLAGS) \
-          -I. -I.. \
+CFLAGS  = -I. -I.. \
           -Inative \
           -I../libmpdemux \
           -I../stream \
           -I../loader \
           $(LIBAV_INC) \
+          $(OPTFLAGS) \
           -D_GNU_SOURCE \
 
 .SUFFIXES: .c .o
--- a/libmpdemux/Makefile	Thu Aug 17 16:44:54 2006 +0000
+++ b/libmpdemux/Makefile	Thu Aug 17 17:19:56 2006 +0000
@@ -104,7 +104,7 @@
 OBJS	= $(SRCS:.c=.o)
 OBJS   += $(CPLUSPLUSSRCS:.cpp=.o)
 INCLUDE = -I.. -I../stream -I../loader $(LIBAV_INC)
-CFLAGS  = $(OPTFLAGS) $(INCLUDE) $(XMMS_CFLAGS)
+CFLAGS  = $(INCLUDE) $(OPTFLAGS) $(XMMS_CFLAGS)
 CPLUSPLUSFLAGS  = $(CFLAGS) -D__STDC_LIMIT_MACROS
 CPLUSPLUS = $(CC)
 
--- a/libmpeg2/Makefile	Thu Aug 17 16:44:54 2006 +0000
+++ b/libmpeg2/Makefile	Thu Aug 17 17:19:56 2006 +0000
@@ -14,7 +14,7 @@
 
 OBJS	= $(SRCS:.c=.o)
 INCLUDE = -I. -I../libvo -I..
-CFLAGS  = $(OPTFLAGS) $(INCLUDE) -DMPG12PLAY
+CFLAGS  = $(INCLUDE) $(OPTFLAGS) -DMPG12PLAY
 
 ifeq ($(TARGET_MMX),yes)
 SRCS += idct_mmx.c motion_comp_mmx.c
--- a/libswscale/Makefile	Thu Aug 17 16:44:54 2006 +0000
+++ b/libswscale/Makefile	Thu Aug 17 17:19:56 2006 +0000
@@ -9,7 +9,7 @@
 endif
 
 # NOTE: -I.. is needed to include config.h
-CFLAGS=$(OPTFLAGS) -I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavutil \
+CFLAGS=-I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavutil $(OPTFLAGS) \
        -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \
        -D_GNU_SOURCE
 
--- a/libvo/Makefile	Thu Aug 17 16:44:54 2006 +0000
+++ b/libvo/Makefile	Thu Aug 17 17:19:56 2006 +0000
@@ -37,7 +37,7 @@
 endif
 
 INCLUDE = -I. -I.. -I../osdep $(LIBAV_INC)
-CFLAGS  = $(OPTFLAGS) $(INCLUDE) -DMPG12PLAY
+CFLAGS  = $(INCLUDE) $(OPTFLAGS) -DMPG12PLAY
 
 #CFLAGS += -Wall
 
--- a/loader/dmo/Makefile	Thu Aug 17 16:44:54 2006 +0000
+++ b/loader/dmo/Makefile	Thu Aug 17 17:19:56 2006 +0000
@@ -13,7 +13,7 @@
 OBJS = $(SRCS:.c=.o)
 
 INCLUDE = -I. -I../dshow -I..
-CFLAGS  = $(OPTFLAGS) $(INCLUDE) -DNOAVIFILE_HEADERS
+CFLAGS  = $(INCLUDE) $(OPTFLAGS) -DNOAVIFILE_HEADERS
 
 .SUFFIXES: .c .o
 
--- a/loader/dshow/Makefile	Thu Aug 17 16:44:54 2006 +0000
+++ b/loader/dshow/Makefile	Thu Aug 17 17:19:56 2006 +0000
@@ -18,7 +18,7 @@
 # OBJS	= DS_AudioDec.o DS_VideoDec.o DS_Filter.o allocator.o cmediasample.o guids.o inputpin.o outputpin.o
 
 INCLUDE = -I. -I..
-CFLAGS  = $(OPTFLAGS) $(INCLUDE) -DNOAVIFILE_HEADERS
+CFLAGS  = $(INCLUDE) $(OPTFLAGS) -DNOAVIFILE_HEADERS
 
 .SUFFIXES: .c .o
 
--- a/osdep/Makefile	Thu Aug 17 16:44:54 2006 +0000
+++ b/osdep/Makefile	Thu Aug 17 17:19:56 2006 +0000
@@ -35,7 +35,7 @@
 
 OBJS=$(SRCS:.c=.o)
 
-CFLAGS  = $(OPTFLAGS) -I. -I..
+CFLAGS  = -I. -I.. $(OPTFLAGS)
 # -I/usr/X11R6/include/
 
 .SUFFIXES: .c .o
--- a/stream/Makefile	Thu Aug 17 16:44:54 2006 +0000
+++ b/stream/Makefile	Thu Aug 17 17:19:56 2006 +0000
@@ -115,7 +115,7 @@
 
 OBJS	= $(SRCS:.c=.o)
 INCLUDE = -I.. -I../loader $(LIBAV_INC)
-CFLAGS  = $(OPTFLAGS) $(INCLUDE) $(XMMS_CFLAGS)
+CFLAGS  = $(INCLUDE) $(OPTFLAGS) $(XMMS_CFLAGS)
 
 .SUFFIXES: .c .o
 
--- a/vidix/drivers/Makefile	Thu Aug 17 16:44:54 2006 +0000
+++ b/vidix/drivers/Makefile	Thu Aug 17 17:19:56 2006 +0000
@@ -8,67 +8,67 @@
 CYBERBLADE_SRCS=cyberblade_vid.c
 CYBERBLADE_OBJS=cyberblade_vid.o
 CYBERBLADE_LIBS=-L../../libdha -ldha -lm
-CYBERBLADE_CFLAGS=$(OPTFLAGS) -fPIC -I. -I..
+CYBERBLADE_CFLAGS=-fPIC -I. -I.. $(OPTFLAGS)
 
 RADEON_VID=radeon_vid.so
 RADEON_SRCS=radeon_vid.c
 RADEON_OBJS=radeon_vid.o
 RADEON_LIBS=-L../../libdha -ldha -lm $(X_LIB)
-RADEON_CFLAGS=$(OPTFLAGS) -fPIC -I. -I..
+RADEON_CFLAGS=-fPIC -I. -I.. $(OPTFLAGS)
 
 RAGE128_VID=rage128_vid.so
 RAGE128_SRCS=radeon_vid.c
 RAGE128_OBJS=rage128_vid.o
 RAGE128_LIBS=-L../../libdha -ldha -lm $(X_LIB)
-RAGE128_CFLAGS=$(OPTFLAGS) -fPIC -I. -I.. -DRAGE128
+RAGE128_CFLAGS=-fPIC -I. -I.. -DRAGE128 $(OPTFLAGS)
 
 PM3_VID=pm3_vid.so
 PM3_SRCS=pm3_vid.c
 PM3_OBJS=pm3_vid.o
 PM3_LIBS=-L../../libdha -ldha
-PM3_CFLAGS=$(OPTFLAGS) -fPIC -I. -I..
+PM3_CFLAGS=-fPIC -I. -I.. $(OPTFLAGS)
 
 MACH64_VID=mach64_vid.so
 MACH64_SRCS=mach64_vid.c
 MACH64_OBJS=mach64_vid.o
 MACH64_LIBS=-L../../libdha -ldha
-MACH64_CFLAGS=$(OPTFLAGS) -fPIC -I. -I.. -DRAGE128
+MACH64_CFLAGS=-fPIC -I. -I.. -DRAGE128 $(OPTFLAGS)
 
 MGA_VID=mga_vid.so
 MGA_SRCS=mga_vid.c
 MGA_OBJS=mga_vid.o
 MGA_LIBS=-L../../libdha -ldha -lm
-MGA_CFLAGS=$(OPTFLAGS) -fPIC -I. -I..
+MGA_CFLAGS=-fPIC -I. -I.. $(OPTFLAGS)
 
 MGA_CRTC2_VID=mga_crtc2_vid.so
 MGA_CRTC2_SRCS=mga_vid.c
 MGA_CRTC2_OBJS=mga_crtc2_vid.o
 MGA_CRTC2_LIBS=-L../../libdha -ldha -lm
-MGA_CRTC2_CFLAGS=$(OPTFLAGS) -fPIC -I. -I.. -DCRTC2
+MGA_CRTC2_CFLAGS=-fPIC -I. -I.. -DCRTC2 $(OPTFLAGS)
 
 NVIDIA_VID=nvidia_vid.so
 NVIDIA_SRCS=nvidia_vid.c
 NVIDIA_OBJS=nvidia_vid.o
 NVIDIA_LIBS=-L../../libdha -ldha -lm
-NVIDIA_CFLAGS=$(OPTFLAGS) -fPIC -I. -I.. 
+NVIDIA_CFLAGS=-fPIC -I. -I.. $(OPTFLAGS)
 
 SIS_VID=sis_vid.so
 SIS_SRCS=sis_vid.c sis_bridge.c
 SIS_OBJS=sis_vid.o sis_bridge.o
 SIS_LIBS=-L../../libdha -ldha
-SIS_CFLAGS=$(OPTFLAGS) -fPIC -I. -I..
+SIS_CFLAGS=-fPIC -I. -I.. $(OPTFLAGS)
 
 UNICHROME_VID=unichrome_vid.so
 UNICHROME_SRCS=unichrome_vid.c
 UNICHROME_OBJS=unichrome_vid.o
 UNICHROME_LIBS=-L../../libdha -ldha -lm
-UNICHROME_CFLAGS=$(OPTFLAGS) -fPIC -I. -I..
+UNICHROME_CFLAGS=-fPIC -I. -I.. $(OPTFLAGS)
 
 SAVAGE_VID=savage_vid.so
 SAVAGE_SRCS=savage_vid.c
 SAVAGE_OBJS=savage_vid.o
 SAVAGE_LIBS=-L../../libdha -ldha -lm
-SAVAGE_CFLAGS=$(OPTFLAGS) -fPIC -I. -I..
+SAVAGE_CFLAGS=-fPIC -I. -I.. $(OPTFLAGS)
 
 all:    $(CYBERBLADE_VID) $(RADEON_VID) $(RAGE128_VID) $(MACH64_VID) $(NVIDIA_VID) $(GENFB_VID) $(MGA_VID) $(MGA_CRTC2_VID) $(PM3_VID) $(SIS_VID) $(UNICHROME_VID) $(SAVAGE_VID)