Add hotplugtest to msvc project files
[platform/upstream/libusb.git] / libusb / Makefile.am
1 all: libusb-1.0.la libusb-1.0.dll
2
3 lib_LTLIBRARIES = libusb-1.0.la
4
5 LINUX_USBFS_SRC = os/linux_usbfs.c
6 DARWIN_USB_SRC = os/darwin_usb.c
7 OPENBSD_USB_SRC = os/openbsd_usb.c
8 WINDOWS_USB_SRC = os/poll_windows.c os/windows_usb.c libusb-1.0.rc libusb-1.0.def
9 WINCE_USB_SRC = os/wince_usb.c os/wince_usb.h
10
11 EXTRA_DIST = $(LINUX_USBFS_SRC) $(DARWIN_USB_SRC) $(OPENBSD_USB_SRC) \
12         $(WINDOWS_USB_SRC) $(WINCE_USB_SRC) \
13         os/threads_posix.c os/threads_windows.c \
14         os/linux_udev.c os/linux_netlink.c
15
16 if OS_LINUX
17
18 if USE_UDEV
19 OS_SRC = $(LINUX_USBFS_SRC) os/linux_udev.c
20 else
21 OS_SRC = $(LINUX_USBFS_SRC) os/linux_netlink.c
22 endif
23
24 endif
25
26 if OS_DARWIN
27 OS_SRC = $(DARWIN_USB_SRC)
28 AM_CFLAGS_EXT = -no-cpp-precomp
29 endif
30
31 if OS_OPENBSD
32 OS_SRC = $(OPENBSD_USB_SRC)
33 endif
34
35 if OS_WINDOWS
36 OS_SRC = $(WINDOWS_USB_SRC)
37
38 .rc.lo:
39         $(AM_V_GEN)$(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --tag=RC --mode=compile $(RC) $(RCFLAGS) -i $< -o $@
40
41 libusb-1.0.rc: version.h version_nano.h
42 endif
43
44 libusb-1.0.dll: libusb-1.0.def
45 if CREATE_IMPORT_LIB
46 # Rebuild the import lib from the .def so that MS and MinGW DLLs can be interchanged
47         $(AM_V_GEN)$(DLLTOOL) $(DLLTOOLFLAGS) --kill-at --input-def $(srcdir)/libusb-1.0.def --dllname $@ --output-lib .libs/$@.a
48 endif
49
50 if THREADS_POSIX
51 THREADS_SRC = os/threads_posix.h os/threads_posix.c
52 else
53 THREADS_SRC = os/threads_windows.h os/threads_windows.c
54 endif
55
56 libusb_1_0_la_CFLAGS = $(AM_CFLAGS)
57 libusb_1_0_la_LDFLAGS = $(LTLDFLAGS)
58 libusb_1_0_la_SOURCES = libusbi.h core.c descriptor.c io.c sync.c $(OS_SRC) \
59         os/linux_usbfs.h os/darwin_usb.h os/windows_usb.h os/windows_common.h \
60         hotplug.h hotplug.c $(THREADS_SRC) os/poll_posix.h os/poll_windows.h
61
62 hdrdir = $(includedir)/libusb-1.0
63 hdr_HEADERS = libusb.h