Kevin Roth's patch. $(RM) instead of @erase, and it also passes on the

USE_SSLEAY variable
This commit is contained in:
Daniel Stenberg 2002-10-28 19:39:58 +00:00
parent 01bdfa7b6d
commit db1c618fcf
1 changed files with 81 additions and 77 deletions

View File

@ -1,77 +1,81 @@
############################################################# #############################################################
# $Id$ # $Id$
# #
## Makefile for building curl.exe with MingW32 (GCC-2.95) and ## Makefile for building curl.exe with MingW32 (GCC-3.2) and
## optionally OpenSSL (0.9.6) ## optionally OpenSSL (0.9.6)
## ##
## Use: make -f Makefile.m32 [SSL=1] [DYN=1] ## Use: make -f Makefile.m32 [SSL=1] [DYN=1]
## ##
## Comments to: Troy Engel <tengel@sonic.net> or ## Comments to: Troy Engel <tengel@sonic.net> or
## Joern Hartroth <hartroth@acm.org> ## Joern Hartroth <hartroth@acm.org>
CC = gcc CC = gcc
STRIP = strip -s RM = rm -f
OPENSSL_PATH = ../../openssl-0.9.6d STRIP = strip -s
ZLIB_PATH = ../../zlib-1.1.3 OPENSSL_PATH = ../../openssl-0.9.6g
ZLIB_PATH = ../../zlib-1.1.3
# We may need these someday
# PERL = perl # We may need these someday
# NROFF = nroff # PERL = perl
# NROFF = nroff
########################################################
## Nothing more to do below this line! ########################################################
## Nothing more to do below this line!
INCLUDES = -I. -I.. -I../include
CFLAGS = -g -O2 -DMINGW32 INCLUDES = -I. -I.. -I../include
LDFLAGS = CFLAGS = -g -O2 -DMINGW32
COMPILE = $(CC) $(INCLUDES) $(CFLAGS) ifdef SSL
LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@ CFLAGS += -DUSE_SSLEAY
endif
curl_PROGRAMS = curl.exe LDFLAGS =
curl_OBJECTS = main.o hugehelp.o urlglob.o writeout.o COMPILE = $(CC) $(INCLUDES) $(CFLAGS)
curl_SOURCES = main.c hugehelp.c urlglob.c writeout.c LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
ifdef DYN
curl_DEPENDENCIES = ../lib/libcurldll.a ../lib/libcurl.dll curl_PROGRAMS = curl.exe
curl_LDADD = -L../lib -lcurldll curl_OBJECTS = main.o hugehelp.o urlglob.o writeout.o
else curl_SOURCES = main.c hugehelp.c urlglob.c writeout.c
curl_DEPENDENCIES = ../lib/libcurl.a ifdef DYN
curl_LDADD = -L../lib -lcurl curl_DEPENDENCIES = ../lib/libcurldll.a ../lib/libcurl.dll
endif curl_LDADD = -L../lib -lcurldll
curl_LDADD += -lwsock32 -lws2_32 -lwinmm else
ifdef SSL curl_DEPENDENCIES = ../lib/libcurl.a
curl_LDADD += -L$(OPENSSL_PATH)/out -leay32 -lssl32 -lRSAglue curl_LDADD = -L../lib -lcurl
endif endif
ifdef ZLIB curl_LDADD += -lwsock32 -lws2_32 -lwinmm
curl_LDADD += -L$(ZLIB_PATH) -lz ifdef SSL
endif curl_LDADD += -L$(OPENSSL_PATH)/out -leay32 -lssl32 -lRSAglue
endif
PROGRAMS = $(curl_PROGRAMS) ifdef ZLIB
SOURCES = $(curl_SOURCES) curl_LDADD += -L$(ZLIB_PATH) -lz
OBJECTS = $(curl_OBJECTS) endif
all: curl.exe PROGRAMS = $(curl_PROGRAMS)
SOURCES = $(curl_SOURCES)
curl.exe: $(curl_OBJECTS) $(curl_DEPENDENCIES) OBJECTS = $(curl_OBJECTS)
-@erase $@
$(LINK) $(curl_OBJECTS) $(curl_LDADD) all: curl.exe
$(STRIP) $@
curl.exe: $(curl_OBJECTS) $(curl_DEPENDENCIES)
# We don't have nroff normally under win32 $(RM) $@
# hugehelp.c: ../README.curl ../curl.1 mkhelp.pl $(LINK) $(curl_OBJECTS) $(curl_LDADD)
# -@erase hugehelp.c $(STRIP) $@
# $(NROFF) -man ../curl.1 | $(PERL) mkhelp.pl ../README.curl > hugehelp.c
# We don't have nroff normally under win32
.c.o: # hugehelp.c: ../README.curl ../curl.1 mkhelp.pl
$(COMPILE) -c $< # $(RM) hugehelp.c
# $(NROFF) -man ../curl.1 | $(PERL) mkhelp.pl ../README.curl > hugehelp.c
.s.o:
$(COMPILE) -c $< .c.o:
$(COMPILE) -c $<
.S.o:
$(COMPILE) -c $< .s.o:
$(COMPILE) -c $<
clean:
-@erase $(curl_OBJECTS) .S.o:
$(COMPILE) -c $<
distrib: clean
-@erase $(curl_PROGRAMS) clean:
$(RM) $(curl_OBJECTS)
distrib: clean
$(RM) $(curl_PROGRAMS)