diff options
author | Jeff Hartmann <jhartmann@valinux.com> | 2000-03-13 20:56:12 +0000 |
---|---|---|
committer | Jeff Hartmann <jhartmann@valinux.com> | 2000-03-13 20:56:12 +0000 |
commit | a63f6b168ceb0866e0a51519fb70d3bb73ba3ef0 (patch) | |
tree | 20f4731694cead325dcbbfae26b0efc21c4d3c3b | |
parent | 1070b3d2ceb2c65336414398bd484c8c74c18fcd (diff) |
Only build agp portion of the drm when agp is detected
-rw-r--r-- | linux/Makefile.linux | 10 | ||||
-rw-r--r-- | linux/picker.c | 5 |
2 files changed, 13 insertions, 2 deletions
diff --git a/linux/Makefile.linux b/linux/Makefile.linux index d1839244..4c2b4003 100644 --- a/linux/Makefile.linux +++ b/linux/Makefile.linux @@ -64,7 +64,7 @@ CFLAGS= -O2 $(WARNINGS) WARNINGS= -Wall -Wwrite-strings -Wpointer-arith -Wcast-align \ -Wstrict-prototypes -Wshadow -Wnested-externs \ -Winline -Wpointer-arith -MODCFLAGS= $(CFLAGS) -DDRM_AGP -D__KERNEL__ -DMODULE -fomit-frame-pointer +MODCFLAGS= $(CFLAGS) -D__KERNEL__ -DMODULE -fomit-frame-pointer PRGCFLAGS= $(CFLAGS) -g -ansi -pedantic -DPOSIX_C_SOURCE=199309L \ -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE \ -I../../../../../../include -I../../../../../../../../include \ @@ -114,7 +114,10 @@ SMP := $(shell gcc -E -nostdinc -I$(TREE) picker.c 2>/dev/null \ | grep -s 'SMP = ' | cut -d' ' -f3) MODVERSIONS := $(shell gcc -E -I $(TREE) picker.c 2>/dev/null \ | grep -s 'MODVERSIONS = ' | cut -d' ' -f3) -all::;@echo KERNEL HEADERS IN $(TREE): SMP=${SMP} MODVERSIONS=${MODVERSIONS} +AGP := $(shell gcc -E -nostdinc -I$(TREE) picker.c 2>/dev/null \ + | grep -s 'AGP = ' | cut -d' ' -f3) +all::;@echo KERNEL HEADERS IN $(TREE): SMP=${SMP} MODVERSIONS=${MODVERSIONS} \ + AGP=${AGP} all:: $(LIBS) $(MODS) $(PROGS) endif @@ -127,6 +130,9 @@ endif ifeq ($(MODVERSIONS),1) MODCFLAGS += -DMODVERSIONS -include $(TREE)/linux/modversions.h endif +ifeq ($(AGP),1) +MODCFLAGS += -DDRM_AGP +endif # **** End of configuration diff --git a/linux/picker.c b/linux/picker.c index ecdb2c15..54549110 100644 --- a/linux/picker.c +++ b/linux/picker.c @@ -9,6 +9,11 @@ #define CONFIG_MODVERSIONS 0 #endif +#ifndef CONFIG_AGP_MODULE +#define CONFIG_AGP_MODULE 0 +#endif + SMP = CONFIG_SMP MODVERSIONS = CONFIG_MODVERSIONS +AGP = CONFIG_AGP_MODULE RELEASE = UTS_RELEASE |