From: Martin Kraemer Date: Fri, 28 Sep 2001 11:29:02 +0000 (+0000) Subject: Oops. Add missing Makefile for Cygwin. (Noticed by Stipe) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=410e9c46d3532465d760360861ed634614545d40;p=thirdparty%2Fapache%2Fhttpd.git Oops. Add missing Makefile for Cygwin. (Noticed by Stipe) Submitted by: Stipe Tolj Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@91175 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/modules/standard/Makefile.Cygwin b/src/modules/standard/Makefile.Cygwin new file mode 100644 index 00000000000..af4d5e27542 --- /dev/null +++ b/src/modules/standard/Makefile.Cygwin @@ -0,0 +1,50 @@ +# +# Extra rule sets for making shared module DLLs for Cygwin 1.x +# +# On Cygwin OS the user needs to run twice "make" if shared modules have +# been requested using the --enable-shared= configure flag. +# This is because when we pass the module mod_foo.c we have no import +# library, usually src/libhttpd.dll to link against in this case. So the +# two "make" runs do the following: +# +# 1st run: builds all static modules and links everything to the +# shared core DLL, which is also the import library for any +# further shared modules, including the apxs tool mechanism. +# +# 2nd run: builds *only* the shared module DLLs specified by the +# --enable-shared configure switch and of course updates +# the buildmark.o and hence httpd's build date. +# +# Any suggestions in getting this done in one step are highly welcome. +# Stipe Tolj +# + +# overwrite variables that are defined in previous makefile +LD_SHLIB=$(CC) +LDFLAGS_SHLIB=--shared + +define shared_dll + $(LD_SHLIB) $(LDFLAGS_SHLIB) -o $*.dll $(<:%.c=%.o) $(LIBS_SHLIB) \ + $(SRCDIR)/$(SHCORE_IMPLIB) $(LIBS1) +endef + +%.lo : %.c + $(CC) -c $(INCLUDES) $(CFLAGS) $(CFLAGS_SHLIB) $< && mv $*.o $*.lo + +%.dll : %.lo + @if [ -f "$(SRCDIR)/$(SHCORE_IMPLIB)" ]; then \ + echo $(shared_dll); \ + $(shared_dll); \ + else \ + echo "+--------------------------------------------------------+"; \ + echo "| There is no shared core 'libhttpd.dll' available! |"; \ + echo "| |"; \ + echo "| This is obviously your first 'make' run with configure |"; \ + echo "| flag SHARED_CORE enabled and shared modules. |"; \ + echo "| |"; \ + echo "| You will have to re-run 'make' after this run builds |"; \ + echo "| the required shared import library! |"; \ + echo "+--------------------------------------------------------+"; \ + sleep 10; \ + fi; +