summaryrefslogtreecommitdiff
path: root/src/video_out/libdha/kernelhelper/Makefile.am
blob: f9dd765aae548437455bd5d3e2cc4e9cb45dab1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63

EXTRA_DIST = README dhahelper.c

KCFLAGS = -O2 -Wall -D__KERNEL__ -DMODULE -include `echo @LINUX_INCLUDE@ | sed -e 's/\-I//g'`/linux/modversions.h

KVERSION = $(shell $(SHELL) -c 'uname -r')
moddir = /lib/modules/$(KVERSION)/misc

KCOMPILE = $(CC) $(CFLAGS) $(KCFLAGS) $(INCLUDES) $(LINUX_INCLUDE)

if HAVE_LINUX
if BUILD_DHA_KMOD
KERNEL_MODULE = dhahelper.o
endif
endif

noinst_HEADERS = dhahelper.h

EXTRA_PROGRAMS = test
test_SOURCES = test.c

dhahelper.o:
	$(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)
@BUILD_DHA_KMOD_TRUE@	@$(NORMAL_INSTALL)
@BUILD_DHA_KMOD_TRUE@	$(mkinstalldirs) $(DESTDIR)$(moddir)
@BUILD_DHA_KMOD_TRUE@	@list='$(KERNEL_MODULE)'; \
@BUILD_DHA_KMOD_TRUE@	for p in $$list; do \
@BUILD_DHA_KMOD_TRUE@	  if test -f $$p; then \
@BUILD_DHA_KMOD_TRUE@	    echo "$(INSTALL) -o root -g root -m 644 $$p $(DESTDIR)$(moddir)/$$p"; \
@BUILD_DHA_KMOD_TRUE@	    $(INSTALL) -o root -g root -m 644 $$p $(DESTDIR)$(moddir)/$$p; \
@BUILD_DHA_KMOD_TRUE@	  else :; fi; \
@BUILD_DHA_KMOD_TRUE@	done; \
@BUILD_DHA_KMOD_TRUE@	$(DEPMOD) -a
@BUILD_DHA_KMOD_TRUE@	if test ! -c /dev/dhahelper; then \
@BUILD_DHA_KMOD_TRUE@	  $(MAKE) nodes; \
@BUILD_DHA_KMOD_TRUE@	fi


uninstall-local:
@BUILD_DHA_KMOD_TRUE@	@$(NORMAL_UNINSTALL)
@BUILD_DHA_KMOD_TRUE@	@list='$(KERNEL_MODULE)'; \
@BUILD_DHA_KMOD_TRUE@	for p in $$list; do \
@BUILD_DHA_KMOD_TRUE@	  echo "rm -f $(DESTDIR)$(moddir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
@BUILD_DHA_KMOD_TRUE@	  rm -f $(DESTDIR)$(moddir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
@BUILD_DHA_KMOD_TRUE@	done

debug:
install-debug: install

mostlyclean-generic:
	-rm -f *~ \#* .*~ .\#* test

maintainer-clean-generic:
	-@echo "This command is intended for maintainers to use;"
	-@echo "it deletes files that may require special tools to rebuild."
	-rm -f Makefile.in