summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Dickens <christopher.a.dickens@gmail.com>2020-04-01 20:54:09 -0700
committerChris Dickens <christopher.a.dickens@gmail.com>2020-04-01 20:54:09 -0700
commit17143e307b11075e9fd6f77eebb7483a6f635b86 (patch)
tree0cefd80451acf81861248cb7251e7b521604c682
parent24deb4904246953fc8f231d8371fac82bf856e5d (diff)
downloadlibusb-17143e307b11075e9fd6f77eebb7483a6f635b86.tar.gz
automake: Add extra Makefile to handle unknown automake targets
Automake does not know how to compile Windows Resource files, so we have manually told automake how to do this. One particular short-coming is that dependencies are not automatically generated and tracked as they are with other known automake targets. Address this by creating an extra makefile that contains the automake rules needed for building source for Windows targets. This also includes outputting more accurate tags during compilation instead of using the generic "GEN" tag. Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
-rw-r--r--libusb/Makefile.am8
-rw-r--r--libusb/Makefile.am.extra26
-rw-r--r--[-rwxr-xr-x]libusb/strerror.c0
-rw-r--r--libusb/version_nano.h2
4 files changed, 31 insertions, 5 deletions
diff --git a/libusb/Makefile.am b/libusb/Makefile.am
index 8b89ee6..9432c62 100644
--- a/libusb/Makefile.am
+++ b/libusb/Makefile.am
@@ -75,16 +75,16 @@ endif
if OS_WINDOWS
OS_SRC = $(OS_WINDOWS_SRC)
-.rc.lo:
- $(AM_V_GEN)$(LIBTOOL) $(AM_V_lt) --tag=RC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(RC) $(RCFLAGS) -i $< -o $@
+include Makefile.am.extra
-libusb-1.0.lo: libusb-1.0.rc version.h version_nano.h
+# Dependencies for compiling libusb-1.0.lo from libusb-1.0.rc
+-include ./$(DEPDIR)/libusb-1.0.Plo
if CREATE_IMPORT_LIB
all-local: .libs/libusb-1.0.dll.a
# Rebuild the import lib from the .def so that MS and MinGW DLLs can be interchanged
.libs/libusb-1.0.dll.a: libusb-1.0.def libusb-1.0.la
- $(AM_V_GEN)$(DLLTOOL) $(DLLTOOLFLAGS) --kill-at --input-def $< --dllname libusb-1.0.dll --output-lib $@
+ $(AM_V_DLLTOOL)$(DLLTOOL) $(DLLTOOLFLAGS) --kill-at --input-def $< --dllname libusb-1.0.dll --output-lib $@
endif
endif
diff --git a/libusb/Makefile.am.extra b/libusb/Makefile.am.extra
new file mode 100644
index 0000000..a5c1490
--- /dev/null
+++ b/libusb/Makefile.am.extra
@@ -0,0 +1,26 @@
+AM_V_DLLTOOL = $(am__v_DLLTOOL_$(V))
+am__v_DLLTOOL_ = $(am__v_DLLTOOL_$(AM_DEFAULT_VERBOSITY))
+am__v_DLLTOOL_0 = @echo " DLLTOOL " $@;
+am__v_DLLTOOL_1 =
+
+AM_V_RC = $(am__v_RC_$(V))
+am__v_RC_ = $(am__v_RC_$(AM_DEFAULT_VERBOSITY))
+am__v_RC_0 = @echo " RC " $@;
+am__v_RC_1 =
+
+LTRC = $(LIBTOOL) $(AM_V_lt) --tag=RC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(RC) $(AM_RCFLAGS) \
+ $(RCFLAGS)
+
+RCPPARGS = \
+ --preprocessor-arg -MT \
+ --preprocessor-arg $@ \
+ --preprocessor-arg -MD \
+ --preprocessor-arg -MP \
+ --preprocessor-arg -MF \
+ --preprocessor-arg $$depbase.Tpo
+
+.rc.lo:
+ $(AM_V_RC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+ $(LTRC) $(RCPPARGS) -i $< -o $@ &&\
+ $(am__mv) $$depbase.Tpo $$depbase.Plo
diff --git a/libusb/strerror.c b/libusb/strerror.c
index 920447d..920447d 100755..100644
--- a/libusb/strerror.c
+++ b/libusb/strerror.c
diff --git a/libusb/version_nano.h b/libusb/version_nano.h
index 36ce541..6281b80 100644
--- a/libusb/version_nano.h
+++ b/libusb/version_nano.h
@@ -1 +1 @@
-#define LIBUSB_NANO 11485
+#define LIBUSB_NANO 11486