comparison drivers/Makefile @ 3768:fda4c0ea039f

install: target added, based on patch by Jukka Tastula <jukka.tastula@kotinet.com>
author arpi
date Wed, 26 Dec 2001 15:49:45 +0000
parents a721a2b91d3d
children b69ddd4d3bb9
comparison
equal deleted inserted replaced
3767:a498c4b93d5d 3768:fda4c0ea039f
1 1
2 KERNEL_INCLUDES = /usr/src/linux/include 2 KERNEL_INCLUDES = /usr/src/linux/include
3 INCLUDES = -I$(KERNEL_INCLUDES) 3 INCLUDES = -I$(KERNEL_INCLUDES)
4 CFLAGS = -g -O2 -Wall -D__KERNEL__ -DMODULE -include $(KERNEL_INCLUDES)/linux/modversions.h 4 CFLAGS = -g -O2 -Wall -D__KERNEL__ -DMODULE -include $(KERNEL_INCLUDES)/linux/modversions.h
5 VERSION = $(shell grep UTS_RELEASE $(KERNEL_INCLUDES)/linux/version.h | cut -d '"' -f2)
6 MDIR = /lib/modules/$(VERSION)/misc
5 7
6 all: mga_vid.o mga_vid_test 8 all: mga_vid.o mga_vid_test
7 # sis_vid.o 9 # sis_vid.o
8 10
9 mga_vid.o: mga_vid.c mga_vid.h 11 mga_vid.o: mga_vid.c mga_vid.h
13 $(CC) $(CFLAGS) $(INCLUDES) -c $(basename $@).c 15 $(CC) $(CFLAGS) $(INCLUDES) -c $(basename $@).c
14 16
15 mga_vid_test: mga_vid_test.c 17 mga_vid_test: mga_vid_test.c
16 $(CC) -g -O -Wall $(INCLUDES) -o $@ $@.c 18 $(CC) -g -O -Wall $(INCLUDES) -o $@ $@.c
17 19
20 install: mga_vid.o
21 if test ! -d $(MDIR) ; then mkdir -p $(MDIR) ; fi
22 install -m 644 mga_vid.o $(MDIR)/mga_vid.o
23 depmod -a
24
18 dep: 25 dep:
19 26
20 clean: 27 clean:
21 rm -f *.o *~ 28 rm -f *.o *~
22 29