\hypertarget{drivers_2default_2Makefile-example}{}\section{drivers/default/\+Makefile}

\begin{DoxyCodeInclude}
1 #
2 # Template for building a lirc userspace driver out of tree.
3 # Requires that lirc is installed in system locations, in
4 # particular that the /usr/lib[64]/pkgconfig/lirc-driver.pc
5 # is in place (/usr/local/lib/pkgconfig/... is also OK).
6 #
7 
8 all:  default.so
9 
10 CFLAGS          += $(shell pkg-config --cflags lirc-driver)
11 LDFLAGS         += $(shell pkg-config --libs lirc-driver)
12 PLUGINDIR       =  $(shell pkg-config --variable=plugindir lirc-driver)
13 
14 default.o: default.c
15 
16 default.so: default.o
17         gcc --shared -fpic $(LDFLAGS) -o $@ $<
18 
19 install: default.so
20         install  $<  $(PLUGINDIR)
21 
22 clean:
23         rm -f *.o *.so
\end{DoxyCodeInclude}
 