diff options
Diffstat (limited to 'contrib/SDL-3.2.8/src/hidapi/libusb/Makefile.linux')
| -rw-r--r-- | contrib/SDL-3.2.8/src/hidapi/libusb/Makefile.linux | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/contrib/SDL-3.2.8/src/hidapi/libusb/Makefile.linux b/contrib/SDL-3.2.8/src/hidapi/libusb/Makefile.linux new file mode 100644 index 0000000..527f6b3 --- /dev/null +++ b/contrib/SDL-3.2.8/src/hidapi/libusb/Makefile.linux | |||
| @@ -0,0 +1,42 @@ | |||
| 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-libusb libs | ||
| 10 | |||
| 11 | libs: libhidapi-libusb.so | ||
| 12 | |||
| 13 | CC ?= gcc | ||
| 14 | CFLAGS ?= -Wall -g -fpic | ||
| 15 | |||
| 16 | LDFLAGS ?= -Wall -g | ||
| 17 | |||
| 18 | COBJS_LIBUSB = hid.o | ||
| 19 | COBJS = $(COBJS_LIBUSB) ../hidtest/test.o | ||
| 20 | OBJS = $(COBJS) | ||
| 21 | LIBS_USB = `pkg-config libusb-1.0 --libs` -lrt -lpthread | ||
| 22 | LIBS = $(LIBS_USB) | ||
| 23 | INCLUDES ?= -I../hidapi -I. `pkg-config libusb-1.0 --cflags` | ||
| 24 | |||
| 25 | |||
| 26 | # Console Test Program | ||
| 27 | hidtest-libusb: $(COBJS) | ||
| 28 | $(CC) $(LDFLAGS) $^ $(LIBS_USB) -o $@ | ||
| 29 | |||
| 30 | # Shared Libs | ||
| 31 | libhidapi-libusb.so: $(COBJS_LIBUSB) | ||
| 32 | $(CC) $(LDFLAGS) $(LIBS_USB) -shared -fpic -Wl,-soname,$@.0 $^ -o $@ | ||
| 33 | |||
| 34 | # Objects | ||
| 35 | $(COBJS): %.o: %.c | ||
| 36 | $(CC) $(CFLAGS) -c $(INCLUDES) $< -o $@ | ||
| 37 | |||
| 38 | |||
| 39 | clean: | ||
| 40 | rm -f $(OBJS) hidtest-libusb libhidapi-libusb.so ../hidtest/hidtest.o | ||
| 41 | |||
| 42 | .PHONY: clean libs | ||
