mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
Some more MinGW build tweaks.
Added envvars to specify OpenSSL include, libpath and lib. Added rule to create curlbuild.h from curlbuild.h.dist.
This commit is contained in:
parent
9ecf53e154
commit
a6b69b64ad
@ -40,8 +40,11 @@ endif
|
|||||||
ifndef OPENSSL_PATH
|
ifndef OPENSSL_PATH
|
||||||
OPENSSL_PATH = ../../../openssl-0.9.8r
|
OPENSSL_PATH = ../../../openssl-0.9.8r
|
||||||
endif
|
endif
|
||||||
ifndef OPENSSL_LIB
|
ifndef OPENSSL_LIBPATH
|
||||||
OPENSSL_LIB = $(OPENSSL_PATH)/out
|
OPENSSL_LIBPATH = $(OPENSSL_PATH)/out
|
||||||
|
endif
|
||||||
|
ifndef OPENSSL_LIBS
|
||||||
|
OPENSSL_LIBS = -leay32 -lssl32
|
||||||
endif
|
endif
|
||||||
# Edit the path below to point to the base of your LibSSH2 package.
|
# Edit the path below to point to the base of your LibSSH2 package.
|
||||||
ifndef LIBSSH2_PATH
|
ifndef LIBSSH2_PATH
|
||||||
@ -91,6 +94,7 @@ endif
|
|||||||
LDFLAGS = -s
|
LDFLAGS = -s
|
||||||
RC = windres
|
RC = windres
|
||||||
RCFLAGS = --include-dir=$(PROOT)/include -O COFF -i
|
RCFLAGS = --include-dir=$(PROOT)/include -O COFF -i
|
||||||
|
|
||||||
RM = del /q /f 2>NUL
|
RM = del /q /f 2>NUL
|
||||||
CP = copy
|
CP = copy
|
||||||
|
|
||||||
@ -165,7 +169,7 @@ ifdef SSH2
|
|||||||
endif
|
endif
|
||||||
ifdef SSL
|
ifdef SSL
|
||||||
CFLAGS += -DUSE_SSLEAY -DHAVE_OPENSSL_ENGINE_H
|
CFLAGS += -DUSE_SSLEAY -DHAVE_OPENSSL_ENGINE_H
|
||||||
curl_LDADD += -L"$(OPENSSL_LIB)" -leay32 -lssl32
|
curl_LDADD += -L"$(OPENSSL_LIBPATH)" $(OPENSSL_LIBS)
|
||||||
endif
|
endif
|
||||||
ifdef ZLIB
|
ifdef ZLIB
|
||||||
INCLUDES += -I"$(ZLIB_PATH)"
|
INCLUDES += -I"$(ZLIB_PATH)"
|
||||||
|
@ -23,8 +23,11 @@ endif
|
|||||||
ifndef OPENSSL_INCLUDE
|
ifndef OPENSSL_INCLUDE
|
||||||
OPENSSL_INCLUDE = $(OPENSSL_PATH)/outinc
|
OPENSSL_INCLUDE = $(OPENSSL_PATH)/outinc
|
||||||
endif
|
endif
|
||||||
ifndef OPENSSL_LIB
|
ifndef OPENSSL_LIBPATH
|
||||||
OPENSSL_LIB = $(OPENSSL_PATH)/out
|
OPENSSL_LIBPATH = $(OPENSSL_PATH)/out
|
||||||
|
endif
|
||||||
|
ifndef OPENSSL_LIBS
|
||||||
|
OPENSSL_LIBS = -leay32 -lssl32
|
||||||
endif
|
endif
|
||||||
# Edit the path below to point to the base of your LibSSH2 package.
|
# Edit the path below to point to the base of your LibSSH2 package.
|
||||||
ifndef LIBSSH2_PATH
|
ifndef LIBSSH2_PATH
|
||||||
@ -73,9 +76,11 @@ AR = ar
|
|||||||
RANLIB = ranlib
|
RANLIB = ranlib
|
||||||
RC = windres
|
RC = windres
|
||||||
RCFLAGS = --include-dir=$(PROOT)/include -DDEBUGBUILD=0 -O COFF -i
|
RCFLAGS = --include-dir=$(PROOT)/include -DDEBUGBUILD=0 -O COFF -i
|
||||||
RM = del /q /f 2>NUL
|
|
||||||
STRIP = strip -g
|
STRIP = strip -g
|
||||||
|
|
||||||
|
RM = del /q /f 2>NUL
|
||||||
|
CP = copy
|
||||||
|
|
||||||
########################################################
|
########################################################
|
||||||
## Nothing more to do below this line!
|
## Nothing more to do below this line!
|
||||||
|
|
||||||
@ -144,7 +149,7 @@ ifdef SSL
|
|||||||
CFLAGS += -DUSE_SSLEAY -DUSE_OPENSSL -DHAVE_OPENSSL_ENGINE_H -DHAVE_OPENSSL_PKCS12_H \
|
CFLAGS += -DUSE_SSLEAY -DUSE_OPENSSL -DHAVE_OPENSSL_ENGINE_H -DHAVE_OPENSSL_PKCS12_H \
|
||||||
-DHAVE_ENGINE_LOAD_BUILTIN_ENGINES -DOPENSSL_NO_KRB5 \
|
-DHAVE_ENGINE_LOAD_BUILTIN_ENGINES -DOPENSSL_NO_KRB5 \
|
||||||
-DCURL_WANTS_CA_BUNDLE_ENV
|
-DCURL_WANTS_CA_BUNDLE_ENV
|
||||||
DLL_LIBS += -L"$(OPENSSL_LIB)" -leay32 -lssl32
|
DLL_LIBS += -L"$(OPENSSL_LIBPATH)" $(OPENSSL_LIBS)
|
||||||
endif
|
endif
|
||||||
ifdef ZLIB
|
ifdef ZLIB
|
||||||
INCLUDES += -I"$(ZLIB_PATH)"
|
INCLUDES += -I"$(ZLIB_PATH)"
|
||||||
@ -227,6 +232,9 @@ $(libcurl_dll_LIBRARY): $(libcurl_a_OBJECTS) $(RESOURCE) $(libcurl_dll_DEPENDENC
|
|||||||
$(RC) $(RCFLAGS) $< -o $@
|
$(RC) $(RCFLAGS) $< -o $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
ifeq "$(wildcard $(PROOT)/include/curl/curlbuild.h.dist)" "$(PROOT)/include/curl/curlbuild.h.dist"
|
||||||
|
-$(RM) $(subst /,\,$(PROOT)/include/curl/curlbuild.h)
|
||||||
|
endif
|
||||||
-$(RM) $(libcurl_a_OBJECTS) $(RESOURCE)
|
-$(RM) $(libcurl_a_OBJECTS) $(RESOURCE)
|
||||||
|
|
||||||
distclean vclean: clean
|
distclean vclean: clean
|
||||||
@ -235,3 +243,7 @@ distclean vclean: clean
|
|||||||
$(LIBCARES_PATH)/libcares.a:
|
$(LIBCARES_PATH)/libcares.a:
|
||||||
$(MAKE) -C $(LIBCARES_PATH) -f Makefile.m32
|
$(MAKE) -C $(LIBCARES_PATH) -f Makefile.m32
|
||||||
|
|
||||||
|
$(PROOT)/include/curl/curlbuild.h:
|
||||||
|
@echo Creating $@
|
||||||
|
@$(CP) $(subst /,\,$@).dist $(subst /,\,$@)
|
||||||
|
|
||||||
|
@ -20,8 +20,11 @@ endif
|
|||||||
ifndef OPENSSL_PATH
|
ifndef OPENSSL_PATH
|
||||||
OPENSSL_PATH = ../../openssl-0.9.8r
|
OPENSSL_PATH = ../../openssl-0.9.8r
|
||||||
endif
|
endif
|
||||||
ifndef OPENSSL_LIB
|
ifndef OPENSSL_LIBPATH
|
||||||
OPENSSL_LIB = $(OPENSSL_PATH)/out
|
OPENSSL_LIBPATH = $(OPENSSL_PATH)/out
|
||||||
|
endif
|
||||||
|
ifndef OPENSSL_LIBS
|
||||||
|
OPENSSL_LIBS = -leay32 -lssl32
|
||||||
endif
|
endif
|
||||||
# Edit the path below to point to the base of your LibSSH2 package.
|
# Edit the path below to point to the base of your LibSSH2 package.
|
||||||
ifndef LIBSSH2_PATH
|
ifndef LIBSSH2_PATH
|
||||||
@ -68,6 +71,7 @@ endif
|
|||||||
LDFLAGS = -s
|
LDFLAGS = -s
|
||||||
RC = windres
|
RC = windres
|
||||||
RCFLAGS = --include-dir=$(PROOT)/include -O COFF -i
|
RCFLAGS = --include-dir=$(PROOT)/include -O COFF -i
|
||||||
|
|
||||||
RM = del /q /f 2>NUL
|
RM = del /q /f 2>NUL
|
||||||
CP = copy
|
CP = copy
|
||||||
|
|
||||||
@ -146,7 +150,7 @@ ifdef SSH2
|
|||||||
endif
|
endif
|
||||||
ifdef SSL
|
ifdef SSL
|
||||||
CFLAGS += -DUSE_SSLEAY -DHAVE_OPENSSL_ENGINE_H
|
CFLAGS += -DUSE_SSLEAY -DHAVE_OPENSSL_ENGINE_H
|
||||||
curl_LDADD += -L"$(OPENSSL_LIB)" -leay32 -lssl32
|
curl_LDADD += -L"$(OPENSSL_LIBPATH)" $(OPENSSL_LIBS)
|
||||||
endif
|
endif
|
||||||
ifdef ZLIB
|
ifdef ZLIB
|
||||||
INCLUDES += -I"$(ZLIB_PATH)"
|
INCLUDES += -I"$(ZLIB_PATH)"
|
||||||
|
Loading…
Reference in New Issue
Block a user