view drivers/Makefile @ 22697:2fe9bd97a7f6

Fix configure -march detection for athlon-xp The configure script uses SSE support to distinguish between athlon and athlon-xp, but SSE support was tested _after_ deciding the basic CPU type. Thus athlon-xp was always misdetected as athlon. Fix this by moving the CPU extensions check before the CPU type check. Patch from Andrew Savchenko, bircoph list ru.
author uau
date Sun, 18 Mar 2007 13:38:55 +0000
parents 544914dadb52
children d1670ab86597
line wrap: on
line source

KERNEL_INCLUDES = /lib/modules/`uname -r`/build/include
VERSION = $(shell grep UTS_RELEASE $(KERNEL_INCLUDES)/linux/version.h | cut -d '"' -f2)
MDIR = /lib/modules/$(VERSION)/misc

CFLAGS = -O2 -D__KERNEL__ -DMODULE -I$(KERNEL_INCLUDES) -Wall -include $(KERNEL_INCLUDES)/linux/modversions.h

OBJS = mga_vid.o tdfx_vid.o radeon_vid.o rage128_vid.o

all: $(OBJS) mga_vid_test tdfx_vid_test

mga_vid.o: mga_vid.c mga_vid.h
tdfx_vid.o: tdfx_vid.c 3dfx.h
radeon_vid.o: radeon_vid.c radeon.h radeon_vid.h
rage128_vid.o: radeon_vid.c radeon.h radeon_vid.h
	$(CC) $(CFLAGS) -DRAGE128 -c $< -o $@
radeon_vid.o rage128_vid.o:
  CFLAGS += -fomit-frame-pointer -fno-strict-aliasing -fno-common -ffast-math

%_test: %_test.c
	$(CC) -O -o $@ $<

install:
	-mkdir -p $(MDIR)
	install -m 644 $(OBJS) $(MDIR)
	depmod -a
	-mknod /dev/mga_vid  c 178 0
	-mknod /dev/tdfx_vid c 178 0
	-mknod /dev/radeon_vid c 178 0
	-ln -s /dev/radeon_vid /dev/rage128_vid

dep depend:

clean:
	rm -f *.o *~ mga_vid_test tdfx_vid_test

distclean: clean

.PHONY: all install dep depend clean distclean