1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-16 06:25:03 -05:00
curl/ares/Makefile.m32

70 lines
1.6 KiB
Makefile
Raw Normal View History

2004-07-05 09:53:27 -04:00
#############################################################
# $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
2007-04-16 09:53:58 -04:00
#
2004-07-05 09:53:27 -04:00
########################################################
## Nothing more to do below this line!
2007-04-16 09:53:58 -04:00
LIB = libcares.a
CC = gcc
LD = gcc
RANLIB = ranlib
#RM = rm -f
2004-07-05 09:53:27 -04:00
2007-04-16 09:53:58 -04:00
CFLAGS = -O2 -Wall
LDFLAGS = -s
LIBS = -lwsock32
2004-07-05 09:53:27 -04:00
2007-04-16 09:53:58 -04:00
# Makefile.inc provides the CSOURCES and HHEADERS defines
include Makefile.inc
2004-07-05 09:53:27 -04:00
2007-04-16 09:53:58 -04:00
OBJLIB := $(patsubst %.c,%.o,$(strip $(CSOURCES)))
$(LIB): $(OBJLIB)
ar cru $@ $^
$(RANLIB) $@
2004-07-05 09:53:27 -04:00
all: $(LIB) demos
2007-12-11 12:23:18 -05:00
demos: adig.exe ahost.exe acountry.exe
2004-07-05 09:53:27 -04:00
tags:
etags *.[ch]
2007-04-16 09:53:58 -04:00
%.exe: %.o ares_getopt.o $(LIB)
$(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
2004-07-05 09:53:27 -04:00
$(OBJLIB): ares.h ares_dns.h ares_private.h ares_build.h ares_rules.h
2004-07-05 09:53:27 -04:00
.c.o:
2007-04-16 09:53:58 -04:00
$(CC) $(CFLAGS) -c $<
2004-07-05 09:53:27 -04:00
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}
2004-07-05 09:53:27 -04:00
(for man in $(MANPAGES); do \
${INSTALL} -m 444 ${srcdir}/$${man} ${DESTDIR}${mandir}/man3; \
done)
clean:
2007-12-11 12:23:18 -05:00
$(RM) ares_getopt.o $(OBJLIB) $(LIB) adig.exe ahost.exe acountry.exe
2004-07-05 09:53:27 -04:00
distclean: clean
2007-04-16 09:53:58 -04:00
$(RM) config.cache config.log config.status Makefile