WinCE: Fix race between wince_clock_gettime_threaded() and wince_clock_gettime()
[libusbx.git] / libusb / Makefile.am
blob9779dbb1f9151317a891a4d13aee75cbbc71fd61
1 all: libusb-1.0.la libusb-1.0.dll
3 AUTOMAKE_OPTIONS = subdir-objects
5 lib_LTLIBRARIES = libusb-1.0.la
7 POSIX_POLL_SRC = os/poll_posix.c
8 LINUX_USBFS_SRC = os/linux_usbfs.c
9 DARWIN_USB_SRC = os/darwin_usb.c
10 OPENBSD_USB_SRC = os/openbsd_usb.c
11 WINDOWS_USB_SRC = os/poll_windows.c os/windows_usb.c libusb-1.0.rc libusb-1.0.def
12 WINCE_USB_SRC = os/wince_usb.c os/wince_usb.h
14 EXTRA_DIST = $(LINUX_USBFS_SRC) $(DARWIN_USB_SRC) $(OPENBSD_USB_SRC) \
15         $(WINDOWS_USB_SRC) $(WINCE_USB_SRC) \
16         $(POSIX_POLL_SRC) \
17         os/threads_posix.c os/threads_windows.c \
18         os/linux_udev.c os/linux_netlink.c
20 if OS_LINUX
22 if USE_UDEV
23 OS_SRC = $(LINUX_USBFS_SRC) $(POSIX_POLL_SRC) \
24         os/linux_udev.c
25 else
26 OS_SRC = $(LINUX_USBFS_SRC) $(POSIX_POLL_SRC) \
27         os/linux_netlink.c
28 endif
30 endif
32 if OS_DARWIN
33 OS_SRC = $(DARWIN_USB_SRC) $(POSIX_POLL_SRC)
34 AM_CFLAGS_EXT = -no-cpp-precomp
35 endif
37 if OS_OPENBSD
38 OS_SRC = $(OPENBSD_USB_SRC) $(POSIX_POLL_SRC)
39 endif
41 if OS_WINDOWS
42 OS_SRC = $(WINDOWS_USB_SRC)
44 .rc.lo:
45         $(AM_V_GEN)$(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --tag=RC --mode=compile $(RC) $(RCFLAGS) -i $< -o $@
47 libusb-1.0.rc: version.h version_nano.h
48 endif
50 libusb-1.0.dll: libusb-1.0.def
51 if CREATE_IMPORT_LIB
52 # Rebuild the import lib from the .def so that MS and MinGW DLLs can be interchanged
53         $(AM_V_GEN)$(DLLTOOL) $(DLLTOOLFLAGS) --kill-at --input-def $(srcdir)/libusb-1.0.def --dllname $@ --output-lib .libs/$@.a
54 endif
56 if THREADS_POSIX
57 THREADS_SRC = os/threads_posix.h os/threads_posix.c
58 else
59 THREADS_SRC = os/threads_windows.h os/threads_windows.c
60 endif
62 libusb_1_0_la_CFLAGS = $(AM_CFLAGS)
63 libusb_1_0_la_LDFLAGS = $(LTLDFLAGS)
64 libusb_1_0_la_SOURCES = libusbi.h core.c descriptor.c io.c strerror.c sync.c \
65         os/linux_usbfs.h os/darwin_usb.h os/windows_usb.h os/windows_common.h \
66         hotplug.h hotplug.c $(THREADS_SRC) $(OS_SRC) \
67         os/poll_posix.h os/poll_windows.h
69 hdrdir = $(includedir)/libusb-1.0
70 hdr_HEADERS = libusb.h