aboutsummaryrefslogtreecommitdiffstats
path: root/utils/keytable/bpf_protocols/Makefile.am
blob: 3423aba1224a32a097f6504b326e6f5df3ed166a (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
# Get Clang's default includes on this system, as opposed to those seen by
# '-target bpf'. This fixes "missing" files on some architectures/distros,
# such as asm/byteorder.h, asm/socket.h, asm/sockios.h, sys/cdefs.h etc.
#
# Use '-idirafter': Don't interfere with include mechanics except where the
# build would have failed anyways.
CLANG_SYS_INCLUDES := $(shell $(CLANG) -v -E - </dev/null 2>&1 \
        | sed -n '/<...> search starts here:/,/End of search list./{ s| \(/.*\)|-idirafter \1|p }')

%.o: %.c bpf_helpers.h
	$(CLANG) $(CLANG_SYS_INCLUDES) -D__linux__ -I$(top_srcdir)/include -target bpf -O2 -c $<

PROTOCOLS = grundig.o pulse_distance.o pulse_length.o rc_mm.o manchester.o xbox-dvd.o imon_rsc.o raw.o

all: $(PROTOCOLS)

CLEANFILES = $(PROTOCOLS)
EXTRA_DIST = $(PROTOCOLS:%.o=%.c) bitmap.h bpf_helpers.h

# custom target
install-data-local:
	$(install_sh) -d "$(DESTDIR)$(keytableuserdir)/protocols"
	$(install_sh) -d "$(DESTDIR)$(keytablesystemdir)/protocols"
	$(install_sh) -m 0644 $(PROTOCOLS) "$(DESTDIR)$(keytablesystemdir)/protocols"

Privacy Policy