Debian Codegraph @

src/hidapi/linux/Makefile-manual

raw
1 ###########################################
2 # Simple Makefile for HIDAPI test program
3 #
4 # Alan Ott
5 # Signal 11 Software
6 # 2010-06-01
7 ###########################################
8
9 all: hidtest-hidraw libs
10
11 libs: libhidapi-hidraw.so
12
13 CC ?= gcc
14 CFLAGS ?= -Wall -g -fpic
15
16 LDFLAGS ?= -Wall -g
17
18
19 COBJS = hid.o ../hidtest/test.o
20 OBJS = $(COBJS)
21 LIBS_UDEV = `pkg-config libudev --libs` -lrt
22 LIBS = $(LIBS_UDEV)
23 INCLUDES ?= -I../hidapi `pkg-config libusb-1.0 --cflags`
24
25
26 # Console Test Program
27 hidtest-hidraw: $(COBJS)
28 $(CC) $(LDFLAGS) $^ $(LIBS_UDEV) -o $@
29
30 # Shared Libs
31 libhidapi-hidraw.so: $(COBJS)
32 $(CC) $(LDFLAGS) $(LIBS_UDEV) -shared -fpic -Wl,-soname,[email protected] $^ -o $@
33
34 # Objects
35 $(COBJS): %.o: %.c
36 $(CC) $(CFLAGS) -c $(INCLUDES) $< -o $@
37
38
39 clean:
40 rm -f $(OBJS) hidtest-hidraw libhidapi-hidraw.so $(COBJS)
41
42 .PHONY: clean libs