view drivers/Makefile @ 15445:6c2bae3ac404

wording fix by diego(tm) added x264 option subq (necessary to apply patches ;) ) 1.949: Replace duplicate and wrong -sws parameter description with a pointer. 1.950: macosx vo 1.951: On a Mac, option is Alt, the keys with the Apple logo are called command. 1.952: macosx 1.953: expose x264 options 'me' and 'me_range'. 1.954: documented twolameopts 1.955: updated t[wo]olameopts's psycho range 1.956: Add border masking support for lavc 1.957: 10l and more precise description of border_mask 1.958: Nits - better description for border_mask 1.959: vstrict=-1 is now less "dangerous", make it default and remove m/ljpeg encoding colorspace hack 1.960: wording/spelling
author kraymer
date Fri, 13 May 2005 22:29:07 +0000
parents e2fa87f416a2
children 18e74f0452c7
line wrap: on
line source

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

ifneq (,$(findstring 2.6, $(VERSION)))
obj-m += mga_vid.o
CFLAGS = -O2  -D__KERNEL__  -DMODULE  	 -include $(KERNEL_INCLUDES)/config/modversions.h -Wall
else
CFLAGS = -O2  -D__KERNEL__  -DMODULE  	 -include $(KERNEL_INCLUDES)/linux/modversions.h -Wall
endif

all:
ifneq (,$(findstring 2.6, $(VERSION)))
	$(MAKE) mga_vid.ko mga_vid_test
else
	$(MAKE) mga_vid.o mga_vid_test
endif
# sis_vid.o

mga_vid.o: mga_vid.c mga_vid.h
	$(CC) $(CFLAGS) $(INCLUDES) -c $(basename $@).c

mga_vid.ko: mga_vid.c mga_vid.h
	$(MAKE) -C $(KERNEL_DIR) SUBDIRS=$(PWD) modules

sis_vid.o: sis_vid.c sis_vid.h
	$(CC) $(CFLAGS) $(INCLUDES) -c $(basename $@).c

mga_vid_test: mga_vid_test.c
	$(CC) -O $(INCLUDES) -o $@ $@.c

tdfx_vid.o: tdfx_vid.c 3dfx.h
	$(CC) $(CFLAGS) $(INCLUDES) -c $(basename $@).c

tdfx_vid_tst: tdfx_vid_tst.c
	$(CC) -O $(INCLUDES) -o $@ $@.c

install: mga_vid.o
	if test ! -d $(MDIR) ; then mkdir -p $(MDIR) ; fi
ifneq (,$(findstring 2.6, $(VERSION)))
	install -m 644 mga_vid.ko $(MDIR)/mga_vid.ko
else
	install -m 644 mga_vid.o $(MDIR)/mga_vid.o
endif
	depmod -a

dep:

clean: 
	rm -f *.o *~
ifneq (,$(findstring 2.6, $(VERSION)))
	rm -f *.ko .mga* mga_vid.mod.c
endif

distclean: clean
	rm -f mga_vid_test