1 #############################################################
3 ## Makefile for building libcares.a with MingW32 (GCC-3.2)
4 ## Use: make -f Makefile.m32 [demos]
6 ## Quick hack by Guenter; comments to: /dev/nul
8 ########################################################
9 ## Nothing more to do below this line!
20 CFLAGS = -O2 -Wall -I.
21 CFLAGS += -DCARES_STATICLIB
25 # Makefile.inc provides the CSOURCES and HHEADERS defines
28 OBJLIB := $(patsubst %.c,%.o,$(strip $(CSOURCES)))
37 demos: adig.exe ahost.exe acountry.exe
42 %.exe: %.o ares_getopt.o $(LIB)
43 $(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
45 $(OBJLIB): ares.h ares_dns.h ares_private.h ares_build.h ares_rules.h
51 $(CP) ares_build.h.dist ares_build.h
56 ${top_srcdir}/mkinstalldirs ${DESTDIR}${libdir}
57 ${top_srcdir}/mkinstalldirs ${DESTDIR}${includedir}
58 ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man3
59 ${INSTALL} -m 644 $(LIB) ${DESTDIR}${libdir}
60 ${RANLIB} ${DESTDIR}${libdir}/$(LIB)
61 chmod u-w ${DESTDIR}${libdir}/$(LIB)
62 ${INSTALL} -m 444 ${srcdir}/ares.h ${DESTDIR}${includedir}
63 ${INSTALL} -m 444 ${srcdir}/ares_build.h ${DESTDIR}${includedir}
64 ${INSTALL} -m 444 ${srcdir}/ares_rules.h ${DESTDIR}${includedir}
65 (for man in $(MANPAGES); do \
66 ${INSTALL} -m 444 ${srcdir}/$${man} ${DESTDIR}${mandir}/man3; \
70 $(RM) ares_getopt.o $(OBJLIB) $(LIB) adig.exe ahost.exe acountry.exe
73 $(RM) config.cache config.log config.status Makefile
74 ifeq "$(wildcard ares_build.h.dist)" "ares_build.h.dist"