summaryrefslogtreecommitdiff
path: root/src/video_out/libdha/kernelhelper/Makefile.am
blob: 5984a9f866047c19d9371d96c12d533c6b014ab0 (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

EXTRA_DIST = README dhahelper.c

CFLAGS = -O2 -Wall -D__KERNEL__ -DMODULE

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

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

if HAVE_LINUX
KERNEL_MODULE = dhahelper.o
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)
	@$(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:
	@$(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

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