summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Caujolle-Bert <f1rmb@users.sourceforge.net>2002-06-01 19:24:16 +0000
committerDaniel Caujolle-Bert <f1rmb@users.sourceforge.net>2002-06-01 19:24:16 +0000
commit454389cedba64c22bffc6aeb4115d1657f29bb0b (patch)
tree25e62fbf662435cab0061a7dd074c2790c2e1b24 /src
parent7e30cebff74b657ea60657f3a7eb2ef18718147e (diff)
downloadxine-lib-454389cedba64c22bffc6aeb4115d1657f29bb0b.tar.gz
xine-lib-454389cedba64c22bffc6aeb4115d1657f29bb0b.tar.bz2
Fix kernel module compilation and distcheck stage.
CVS patchset: 1982 CVS date: 2002/06/01 19:24:16
Diffstat (limited to 'src')
-rw-r--r--src/video_out/libdha/Makefile.am14
-rw-r--r--src/video_out/libdha/kernelhelper/Makefile.am45
2 files changed, 42 insertions, 17 deletions
diff --git a/src/video_out/libdha/Makefile.am b/src/video_out/libdha/Makefile.am
index b21838533..6faa00d50 100644
--- a/src/video_out/libdha/Makefile.am
+++ b/src/video_out/libdha/Makefile.am
@@ -11,18 +11,24 @@ endif
noinst_LTLIBRARIES = $(dha_lib)
libdha_la_SOURCES = libdha.c mtrr.c pci.c pci_names.c mmi.c
-libdha_la_DEPENDENCIES = pci_names.c
EXTRA_PROGRAMS = test
test_SOURCES = test.c
test_LDADD = $(top_builddir)/src/video_out/libdha/libdha.la
-noinst_HEADERS = AsmMacros.h libdha.h
+noinst_HEADERS = AsmMacros.h libdha.h
## for OpenBSD LIBS += -li386
-pci_names.c:
- $(AWK) -f pci_db2c.awk oth/pci.db
+
+## We have to create some files, on the fly, this is why this rule is needed.
+pci_names.lo:
+ $(AWK) -f $(top_srcdir)/src/video_out/libdha/pci_db2c.awk \
+ $(top_srcdir)/src/video_out/libdha/oth/pci.db
+ source='$*.c' object='$@' libtool=yes \
+ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' \
+ $(CCDEPMODE) $(depcomp) \
+ $(LTCOMPILE) -c -o $@ `test -f $*.c || echo '$(srcdir)/'`$*.c
debug:
@$(MAKE) CFLAGS="$(DEBUG_CFLAGS) @STATIC@ -DXINE_COMPILE"
diff --git a/src/video_out/libdha/kernelhelper/Makefile.am b/src/video_out/libdha/kernelhelper/Makefile.am
index 4d603c0e7..1808a3e39 100644
--- a/src/video_out/libdha/kernelhelper/Makefile.am
+++ b/src/video_out/libdha/kernelhelper/Makefile.am
@@ -1,33 +1,52 @@
+
EXTRA_DIST = README dhahelper.c
CFLAGS = -O2 -Wall -D__KERNEL__ -DMODULE
## CLEAN ME
KVERSION = $(shell $(SHELL) -c 'uname -r')
-MISC_KDIR = /lib/modules/$(KVERSION)/misc
+moddir = /lib/modules/$(KVERSION)/misc
KCOMPILE = $(CC) $(CFLAGS) $(INCLUDES) $(LINUX_INCLUDE)
+@HAVE_LINUX_TRUE@KERNEL_MODULE = dhahelper.o
+
noinst_HEADERS = dhahelper.h
EXTRA_PROGRAMS = test
test_SOURCES = test.c
dhahelper.o:
- $(KCOMPILE) -c `test -f $< || echo '$(srcdir)/'`$<
-
-install-data-local: @HAVE_LINUX_TRUE@ dhahelper.o
-@HAVE_LINUX_TRUE@ if test ! -d $(MISC_KDIR); then \
-@HAVE_LINUX_TRUE@ mkdir -p $(MISC_KDIR); \
-@HAVE_LINUX_TRUE@ fi
-@HAVE_LINUX_TRUE@ $(INSTALL_DATA) dhahelper.o $(MISC_KDIR)/dhahelper.o
-@HAVE_LINUX_TRUE@ $(DEPMOD) -a
-@HAVE_LINUX_TRUE@ if test ! -c /dev/dhahelper; then \
-@HAVE_LINUX_TRUE@ $(MKNOD) -m 666 /dev/dhahelper c 180 0; \
-@HAVE_LINUX_TRUE@ fi
+ $(KCOMPILE) -c `test -f $*.c || echo '$(srcdir)/'`$*.c
+
+nodes:
+ $(MKNOD) -m 666 /dev/dhahelper c 180 0
+
+all: $(KERNEL_MODULE)
+
+install-exec-local: $(KERNEL_MODULE)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(moddir)
+ @list='$(KERNEL_MODULE)'; \
+ for p in $$list; do \
+ if test -f $$p; then \
+ echo "$(INSTALL) -o root -g root -m 644 $$p $(DESTDIR)$(moddir)/$$p"; \
+ $(INSTALL) -o root -g root -m 644 $$p $(DESTDIR)$(moddir)/$$p; \
+ else :; fi; \
+ done; \
+ $(DEPMOD) -a
+ if test ! -c /dev/dhahelper; then \
+ $(MAKE) nodes; \
+ fi
+
uninstall-local:
-@HAVE_LINUX_TRUE@ rm -f $(MISC_KDIR)/dhahelper.o
+ @$(NORMAL_UNINSTALL)
+ @list='$(KERNEL_MODULE)'; \
+ for p in $$list; do \
+ echo "rm -f $(DESTDIR)$(moddir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+ rm -f $(DESTDIR)$(moddir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ done
debug:
install-debug: install