WinCE: Fix missing sources from dist tarball
[libusbx.git] / libusb / Makefile.am
blob78a19c35bd458c809358aaa1f94f7a1b787102a0
1 all: libusb-1.0.la libusb-1.0.dll
3 lib_LTLIBRARIES = libusb-1.0.la
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
9 WINCE_USB_SRC = os/wince_usb.c os/wince_usb.h
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
15 if OS_LINUX
16 OS_SRC = $(LINUX_USBFS_SRC)
17 endif
19 if OS_DARWIN
20 OS_SRC = $(DARWIN_USB_SRC)
21 AM_CFLAGS_EXT = -no-cpp-precomp
22 endif
24 if OS_OPENBSD
25 OS_SRC = $(OPENBSD_USB_SRC)
26 endif
28 if OS_WINDOWS
29 OS_SRC = $(WINDOWS_USB_SRC)
31 .rc.lo:
32         $(AM_V_GEN)$(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --tag=RC --mode=compile $(RC) $(RCFLAGS) -i $< -o $@
34 libusb-1.0.rc: version.h version_nano.h
35 endif
37 libusb-1.0.dll: libusb-1.0.def
38 if CREATE_IMPORT_LIB
39 # Rebuild the import lib from the .def so that MS and MinGW DLLs can be interchanged
40         $(AM_V_GEN)$(DLLTOOL) $(DLLTOOLFLAGS) --kill-at --input-def $(srcdir)/libusb-1.0.def --dllname $@ --output-lib .libs/$@.a
41 endif
44 if THREADS_POSIX
45 THREADS_SRC = os/threads_posix.h os/threads_posix.c
46 else
47 THREADS_SRC = os/threads_windows.h os/threads_windows.c
48 endif
50 libusb_1_0_la_CFLAGS = $(AM_CFLAGS)
51 libusb_1_0_la_LDFLAGS = $(LTLDFLAGS)
52 libusb_1_0_la_SOURCES = libusbi.h core.c descriptor.c io.c sync.c $(OS_SRC) \
53         os/linux_usbfs.h os/darwin_usb.h os/windows_usb.h \
54         $(THREADS_SRC) \
55         os/poll_posix.h os/poll_windows.h \
56         os/windows_common.h
58 hdrdir = $(includedir)/libusb-1.0
59 hdr_HEADERS = libusb.h