mirror of https://github.com/mpv-player/mpv
Get rid of ugly conditionals.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22670 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
2a51a66260
commit
c3c40b77ce
|
@ -5,18 +5,14 @@ VERSION = $(shell grep UTS_RELEASE $(KERNEL_INCLUDES)/linux/version.h | cut -d '
|
||||||
MDIR = /lib/modules/$(VERSION)/misc
|
MDIR = /lib/modules/$(VERSION)/misc
|
||||||
|
|
||||||
ifneq (,$(findstring 2.6, $(VERSION)))
|
ifneq (,$(findstring 2.6, $(VERSION)))
|
||||||
obj-m += mga_vid.o
|
MGA_VID_OBJ = mga_vid.ko
|
||||||
CFLAGS = -O2 -D__KERNEL__ -DMODULE -include $(KERNEL_INCLUDES)/config/modversions.h -Wall
|
CFLAGS = -O2 -D__KERNEL__ -DMODULE -include $(KERNEL_INCLUDES)/config/modversions.h -Wall
|
||||||
else
|
else
|
||||||
|
MGA_VID_OBJ = mga_vid.o
|
||||||
CFLAGS = -O2 -D__KERNEL__ -DMODULE -include $(KERNEL_INCLUDES)/linux/modversions.h -Wall
|
CFLAGS = -O2 -D__KERNEL__ -DMODULE -include $(KERNEL_INCLUDES)/linux/modversions.h -Wall
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq (,$(findstring 2.6, $(VERSION)))
|
all: $(MGA_VID_OBJ) mga_vid_test
|
||||||
all: mga_vid.ko mga_vid_test
|
|
||||||
else
|
|
||||||
all: mga_vid.o mga_vid_test
|
|
||||||
endif
|
|
||||||
# sis_vid.o
|
|
||||||
|
|
||||||
mga_vid.o: mga_vid.c mga_vid.h
|
mga_vid.o: mga_vid.c mga_vid.h
|
||||||
$(CC) $(CFLAGS) $(INCLUDES) -c $<
|
$(CC) $(CFLAGS) $(INCLUDES) -c $<
|
||||||
|
@ -33,13 +29,9 @@ tdfx_vid.o: tdfx_vid.c 3dfx.h
|
||||||
tdfx_vid_tst: tdfx_vid_tst.c
|
tdfx_vid_tst: tdfx_vid_tst.c
|
||||||
$(CC) -O -o $@ $<
|
$(CC) -O -o $@ $<
|
||||||
|
|
||||||
install: mga_vid.o
|
install: $(MGA_VID_OBJ)
|
||||||
-mkdir -p $(MDIR)
|
-mkdir -p $(MDIR)
|
||||||
ifneq (,$(findstring 2.6, $(VERSION)))
|
install -m 644 $(MGA_VID_OBJ) $(MDIR)
|
||||||
install -m 644 mga_vid.ko $(MDIR)/mga_vid.ko
|
|
||||||
else
|
|
||||||
install -m 644 mga_vid.o $(MDIR)/mga_vid.o
|
|
||||||
endif
|
|
||||||
depmod -a
|
depmod -a
|
||||||
|
|
||||||
dep depend:
|
dep depend:
|
||||||
|
|
Loading…
Reference in New Issue