summaryrefslogtreecommitdiffstats
path: root/src/c-ares/Makefile.m32
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
commit19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch)
tree42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /src/c-ares/Makefile.m32
parentInitial commit. (diff)
downloadceph-upstream.tar.xz
ceph-upstream.zip
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/c-ares/Makefile.m32')
-rw-r--r--src/c-ares/Makefile.m3276
1 files changed, 76 insertions, 0 deletions
diff --git a/src/c-ares/Makefile.m32 b/src/c-ares/Makefile.m32
new file mode 100644
index 000000000..c27a5973e
--- /dev/null
+++ b/src/c-ares/Makefile.m32
@@ -0,0 +1,76 @@
+#############################################################
+#
+## Makefile for building libcares.a with MingW32 (GCC-3.2)
+## Use: make -f Makefile.m32 [demos]
+##
+## Quick hack by Guenter; comments to: /dev/nul
+#
+########################################################
+## Nothing more to do below this line!
+
+LIB = libcares.a
+
+AR = $(CROSSPREFIX)ar
+CC = $(CROSSPREFIX)gcc
+LD = $(CROSSPREFIX)gcc
+RANLIB = $(CROSSPREFIX)ranlib
+#RM = rm -f
+CP = cp -afv
+
+CFLAGS = $(CARES_CFLAG_EXTRAS) -O2 -Wall -I.
+CFLAGS += -DCARES_STATICLIB
+LDFLAGS = $(CARES_LDFLAG_EXTRAS) -s
+LIBS = -lwsock32
+
+# Makefile.inc provides the CSOURCES and HHEADERS defines
+include Makefile.inc
+
+OBJLIB := $(patsubst %.c,%.o,$(strip $(CSOURCES)))
+
+
+$(LIB): $(OBJLIB)
+ $(AR) cru $@ $^
+ $(RANLIB) $@
+
+all: $(LIB) demos
+
+demos: adig.exe ahost.exe acountry.exe
+
+tags:
+ etags *.[ch]
+
+%.exe: %.o ares_getopt.o $(LIB)
+ $(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
+
+$(OBJLIB): ares.h ares_dns.h ares_private.h ares_build.h ares_rules.h
+
+.c.o:
+ $(CC) $(CFLAGS) -c $<
+
+ares_build.h:
+ $(CP) ares_build.h.dist ares_build.h
+
+check:
+
+install:
+ ${top_srcdir}/mkinstalldirs ${DESTDIR}${libdir}
+ ${top_srcdir}/mkinstalldirs ${DESTDIR}${includedir}
+ ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man3
+ ${INSTALL} -m 644 $(LIB) ${DESTDIR}${libdir}
+ ${RANLIB} ${DESTDIR}${libdir}/$(LIB)
+ chmod u-w ${DESTDIR}${libdir}/$(LIB)
+ ${INSTALL} -m 444 ${srcdir}/ares.h ${DESTDIR}${includedir}
+ ${INSTALL} -m 444 ${srcdir}/ares_build.h ${DESTDIR}${includedir}
+ ${INSTALL} -m 444 ${srcdir}/ares_rules.h ${DESTDIR}${includedir}
+ (for man in $(MANPAGES); do \
+ ${INSTALL} -m 444 ${srcdir}/$${man} ${DESTDIR}${mandir}/man3; \
+ done)
+
+clean:
+ $(RM) ares_getopt.o $(OBJLIB) $(LIB) adig.exe ahost.exe acountry.exe
+
+distclean: clean
+ $(RM) config.cache config.log config.status Makefile
+ifeq "$(wildcard ares_build.h.dist)" "ares_build.h.dist"
+ $(RM) ares_build.h
+endif