Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linux-dvb] Re: linuxtv-dvb-make-defs (updated)
Andreas Oberritter wrote:
On Sun, 2004-02-15 at 10:06, Guido Draheim wrote:
the same patch, but with each $(DEFS) goes an $(ARCH) which allows
to set _additional_ CFLAGS globally while not overriding the default
DEFS in each makefile. Nice for make ARCH=-mpentiumpro or similar
stuff but anything else is okay as well, e.g. -fno-writable-strings
-fstack-check -W -msse2 -fomit-leaf-frame-pointer etc.pp.
Why don't you call make CFLAGS="-foo -bar" CPPFLAGS="-DLALA"
SYSCONFDIR="/etc" which will override the makefile's variables?
Each subdirectory makefile contains its own set of CFLAGS/CPPFLAGS,
so better leave those alone from toplevel make. Actually, I am
already overriding make sysconfdir=%_sysconfdir in the rpm spec.
The extra DEFS-settings make that into -DSYSCONFIGDIR=$(sysconfdir)
within the makefile.
Another solution is to replace "CFLAGS =" by "CFLAGS +=".
Yes. ;-)
-CFLAGS = -g -O2 -W -Wall
+CFLAGS = -g -O2 -W -Wall $(DEFS) $(ARCH)
CPPFLAGS = -I../include
Preprocessor flags ($DEFS) should be put into CPPFLAGS if needed.
Agreed - here is an updated patch that moves DEFS to CPPFLAGS,
in two places there were no CPPFLAGS so far which get introduced.
cheers,
-- guido http://google.de/search?q=guidod
GCS/E/S/P C++/++++$ ULHS L++w- N++@ s+:a d(+-) r+@>+++ y++ 5++X- (geekcode)
Index: test/Makefile
===================================================================
RCS file: /cvs/linuxtv/dvb-apps/test/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- test/Makefile 14 Feb 2004 22:04:51 -0000 1.3
+++ test/Makefile 15 Feb 2004 15:30:47 -0000
@@ -1,8 +1,8 @@
# Makefile for Linux DVB API Version 3 test programs
CC = gcc
-CFLAGS = -g -O2 -W -Wall
-CPPFLAGS = -I../include
+CFLAGS = -g -O2 -W -Wall $(ARCH)
+CPPFLAGS = -I../include $(DEFS)
TARGETS = \
diseqc \
Index: util/av7110_loadkeys/Makefile
===================================================================
RCS file: /cvs/linuxtv/dvb-apps/util/av7110_loadkeys/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- util/av7110_loadkeys/Makefile 15 Feb 2004 00:31:08 -0000 1.3
+++ util/av7110_loadkeys/Makefile 15 Feb 2004 15:30:47 -0000
@@ -1,5 +1,7 @@
CC = gcc
-CFLAGS = -g -Wall -O2
+CFLAGS = -g -Wall -O2 $(ARCH)
+CPPFLAGS = $(DEFS)
+DEFS = -DDATADIR=$(datadir)
bindir = /usr/local/bin
datadir = /usr/local/share
Index: util/dvbdate/Makefile
===================================================================
RCS file: /cvs/linuxtv/dvb-apps/util/dvbdate/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- util/dvbdate/Makefile 14 Feb 2004 22:04:52 -0000 1.3
+++ util/dvbdate/Makefile 15 Feb 2004 15:30:47 -0000
@@ -1,7 +1,7 @@
CC = gcc
-CFLAGS = -g -O2 -Wall
-CPPFLAGS= -MD -I../../include
+CFLAGS = -g -O2 -Wall $(ARCH)
+CPPFLAGS= -MD -I../../include $(DEFS)
LFLAGS =
OBJS = dvbdate.o
Index: util/dvbnet/Makefile
===================================================================
RCS file: /cvs/linuxtv/dvb-apps/util/dvbnet/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- util/dvbnet/Makefile 14 Feb 2004 22:04:52 -0000 1.3
+++ util/dvbnet/Makefile 15 Feb 2004 15:30:47 -0000
@@ -1,8 +1,9 @@
CC = gcc
-CFLAGS = -g -O2 -Wall
-CPPFLAGS= -MD -I. -I../../include
+CFLAGS = -g -O2 -Wall $(ARCH)
+CPPFLAGS= -MD -I. -I../../include $(DEFS)
LFLAGS =
+DEFS = -DSYSCONFDIR=$(sysconfdir)
bindir = /usr/local/bin
sysconfdir = /usr/local/etc
Index: util/dvbtraffic/Makefile
===================================================================
RCS file: /cvs/linuxtv/dvb-apps/util/dvbtraffic/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- util/dvbtraffic/Makefile 14 Feb 2004 22:04:52 -0000 1.4
+++ util/dvbtraffic/Makefile 15 Feb 2004 15:30:47 -0000
@@ -1,5 +1,5 @@
-CFLAGS = -g -O2 -Wall
-CPPFLAGS = -MD -I../../include
+CFLAGS = -g -O2 -Wall $(ARCH)
+CPPFLAGS = -MD -I../../include $(DEFS)
bindir = /usr/local/bin
dvbtraffic: dvbtraffic.c
Index: util/lib/Makefile
===================================================================
RCS file: /cvs/linuxtv/dvb-apps/util/lib/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- util/lib/Makefile 14 Feb 2004 22:04:52 -0000 1.3
+++ util/lib/Makefile 15 Feb 2004 15:30:47 -0000
@@ -1,7 +1,7 @@
CC = gcc
-CFLAGS = -g -Wall -O2
-CPPFLAGS = -MD -I../../include -I.
+CFLAGS = -g -Wall -O2 $(ARCH)
+CPPFLAGS = -MD -I../../include -I. $(DEFS)
bindir = /usr/local/bin
OBJS = lnb.o
Index: util/scan/Makefile
===================================================================
RCS file: /cvs/linuxtv/dvb-apps/util/scan/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- util/scan/Makefile 15 Feb 2004 00:31:08 -0000 1.5
+++ util/scan/Makefile 15 Feb 2004 15:30:47 -0000
@@ -1,8 +1,9 @@
CC = gcc
-CFLAGS = -g -Wall -O2
-CPPFLAGS = -MD -I../../include -I../lib
+CFLAGS = -g -Wall -O2 $(ARCH)
+CPPFLAGS = -MD -I../../include -I../lib $(DEFS)
LFLAGS = -g -Wall
+DEFS = -DDATADIR=$(datadir)
bindir = /usr/local/bin
datadir = /usr/local/share
Index: util/szap/Makefile
===================================================================
RCS file: /cvs/linuxtv/dvb-apps/util/szap/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- util/szap/Makefile 15 Feb 2004 00:31:08 -0000 1.4
+++ util/szap/Makefile 15 Feb 2004 15:30:47 -0000
@@ -1,8 +1,9 @@
CC = gcc
-CFLAGS = -Wall -g -O2
-CPPFLAGS = -MD -I../../include -I../lib
+CFLAGS = -Wall -g -O2 $(ARCH)
+CPPFLAGS = -MD -I../../include -I../lib $(DEFS)
LFLAGS = -Wall -g -O2
RM = rm -f
+DEFS = -DDATADIR=$(datadir)
bindir = /usr/local/bin
datadir = /usr/local/share
Index: util/ttusb_dec_reset/Makefile
===================================================================
RCS file: /cvs/linuxtv/dvb-apps/util/ttusb_dec_reset/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- util/ttusb_dec_reset/Makefile 14 Feb 2004 22:04:52 -0000 1.2
+++ util/ttusb_dec_reset/Makefile 15 Feb 2004 15:30:47 -0000
@@ -1,6 +1,7 @@
CC = gcc
RM = rm -f
-CFLAGS = -g -Wall -O2
+CFLAGS = -g -Wall -O2 $(ARCH)
+CPPFLAGS = $(DEFS)
LFLAGS = -g -Wall
LDFLAGS = -lusb
bindir = /usr/local/bin
Home |
Main Index |
Thread Index