summaryrefslogtreecommitdiff
path: root/Makefile.m32
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2012-10-30 13:54:38 -0700
committerAnas Nashif <anas.nashif@intel.com>2012-10-30 13:54:38 -0700
commitb8e6c26b7b9608dffc84645f17fe4cf534af18dd (patch)
tree61d9fff2984aa043471a1c305cfc4c76d7a099fb /Makefile.m32
downloadc-ares-b8e6c26b7b9608dffc84645f17fe4cf534af18dd.tar.gz
c-ares-b8e6c26b7b9608dffc84645f17fe4cf534af18dd.tar.bz2
c-ares-b8e6c26b7b9608dffc84645f17fe4cf534af18dd.zip
Imported Upstream version 1.7.5upstream/1.7.5
Diffstat (limited to 'Makefile.m32')
-rw-r--r--Makefile.m3268
1 files changed, 68 insertions, 0 deletions
diff --git a/Makefile.m32 b/Makefile.m32
new file mode 100644
index 0000000..52d9310
--- /dev/null
+++ b/Makefile.m32
@@ -0,0 +1,68 @@
+#############################################################
+#
+## 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
+
+CC = gcc
+LD = gcc
+RANLIB = ranlib
+#RM = rm -f
+
+CFLAGS = -O2 -Wall
+LDFLAGS = -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 $<
+
+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
+