mirror of
https://github.com/curl/curl.git
synced 2026-08-24 11:03:36 +03:00
windows: add .rc support to autotools builds
After this update autotools builds will compile and link `.rc` resources
to Windows executables. Bringing this feature on par with CMake and
Makefile.m32 builds. And also making it unnecessary to improvise these
steps manually, while monkey patching build files, e.g. [0].
You can customize the resource compiler via the `RC` envvar, and its
options via `RCFLAGS`.
This harmless warning may appear throughout the build, even though the
autotools manual documents [1] `RC` as a valid tag, and it fails when
omitting one:
`libtool: error: ignoring unknown tag RC`
[0] 535f19060d/curl-autotools.sh (L376-L382)
[1] https://www.gnu.org/software/libtool/manual/html_node/Tags.html
Closes #9521
This commit is contained in:
parent
e3a533f51b
commit
6de7322c03
3 changed files with 31 additions and 7 deletions
|
|
@ -55,6 +55,10 @@ include Makefile.inc
|
|||
|
||||
# CURL_FILES comes from Makefile.inc
|
||||
curl_SOURCES = $(CURL_FILES)
|
||||
if OS_WINDOWS
|
||||
curl_SOURCES += $(CURL_RCFILES)
|
||||
$(CURL_RCFILES): tool_version.h
|
||||
endif
|
||||
|
||||
# This might hold -Werror
|
||||
CFLAGS += @CURL_CFLAG_EXTRAS@
|
||||
|
|
@ -75,7 +79,7 @@ libcurltool_la_CPPFLAGS = $(AM_CPPFLAGS) \
|
|||
-DCURL_STATICLIB -DUNITTESTS
|
||||
libcurltool_la_CFLAGS =
|
||||
libcurltool_la_LDFLAGS = -static $(LINKFLAGS)
|
||||
libcurltool_la_SOURCES = $(curl_SOURCES)
|
||||
libcurltool_la_SOURCES = $(CURL_FILES)
|
||||
endif
|
||||
|
||||
CLEANFILES = tool_hugehelp.c
|
||||
|
|
@ -151,3 +155,9 @@ tidy:
|
|||
|
||||
listhelp:
|
||||
(cd $(top_srcdir)/docs/cmdline-opts && ./gen.pl listhelp *.d) > tool_listhelp.c
|
||||
|
||||
if OS_WINDOWS
|
||||
# Warning is "normal": libtool: error: ignoring unknown tag RC
|
||||
.rc.o:
|
||||
$(LIBTOOL) --tag=RC --mode=compile $(RC) -I$(top_srcdir)/include -DCURL_EMBED_MANIFEST $(RCFLAGS) -i $< -o $@
|
||||
endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue