summaryrefslogtreecommitdiff
path: root/Makefile.m32
diff options
context:
space:
mode:
authorGunter Knauf <gk@gknw.de>2004-07-05 13:53:27 (GMT)
committerGunter Knauf <gk@gknw.de>2004-07-05 13:53:27 (GMT)
commitee04b27caf3f7fb9f06a76a54f91deceaa9205b4 (patch)
tree8081439729f9cdcde9350e1ae80c973c6be64437 /Makefile.m32
parent7087002c97c5e9f6d0caa474a8d3a86bccb65258 (diff)
downloadc-ares-ee04b27caf3f7fb9f06a76a54f91deceaa9205b4.zip
c-ares-ee04b27caf3f7fb9f06a76a54f91deceaa9205b4.tar.gz
c-ares-ee04b27caf3f7fb9f06a76a54f91deceaa9205b4.tar.bz2
added MingW32 makefile.
Diffstat (limited to 'Makefile.m32')
-rw-r--r--Makefile.m3275
1 files changed, 75 insertions, 0 deletions
diff --git a/Makefile.m32 b/Makefile.m32
new file mode 100644
index 0000000..051b135
--- /dev/null
+++ b/Makefile.m32
@@ -0,0 +1,75 @@
+#############################################################
+# $Id$
+#
+## Makefile for building libcares.a with MingW32 (GCC-3.2)
+## Use: make -f Makefile.m32 [demos]
+##
+## Quick hack by Guenter; comments to: /dev/nul
+
+CC = gcc
+AR = ar
+RANLIB = ranlib
+STRIP = strip -g
+#RM = rm -f
+
+########################################################
+## Nothing more to do below this line!
+
+LIB=libcares.a
+CC=gcc
+#CPPFLAGS=@CPPFLAGS@
+WARN_FLAGS=-Wall
+CFLAGS=-O2 -DMINGW32
+CFLAGS+=${WARN_CFLAGS} ${ERROR_CFLAGS}
+#DEFS=-DWIN32
+LDFLAGS=-s
+LIBS=-lwsock32
+ALL_CFLAGS=${CPPFLAGS} ${CFLAGS} ${DEFS}
+
+MANPAGES := $(patsubst %.c,%.o,$(wildcard ares_*.3))
+
+OBJS := $(patsubst %.c,%.o,$(wildcard ares_*.c))
+OBJS += windows_port.o
+
+$(LIB): ${OBJS}
+ ar cru $@ ${OBJS}
+ ${RANLIB} $@
+
+all: $(LIB) demos
+
+demos: adig.exe ahost.exe
+
+tags:
+ etags *.[ch]
+
+adig.exe: adig.o $(LIB)
+ ${CC} ${LDFLAGS} -o $@ adig.o $(LIB) ${LIBS}
+
+ahost.exe: ahost.o $(LIB)
+ ${CC} ${LDFLAGS} -o $@ ahost.o $(LIB) ${LIBS}
+
+${OBJS}: ares.h ares_dns.h ares_private.h
+
+.c.o:
+ ${CC} -c ${ALL_CFLAGS} $<
+
+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_version.h ${DESTDIR}${includedir}
+ (for man in $(MANPAGES); do \
+ ${INSTALL} -m 444 ${srcdir}/$${man} ${DESTDIR}${mandir}/man3; \
+ done)
+
+clean:
+ rm -f ${OBJS} $(LIB) adig.o adig.exe ahost.o ahost.exe
+
+distclean: clean
+ rm -f config.cache config.log config.status Makefile