summaryrefslogtreecommitdiff
path: root/Makefile.m32
diff options
context:
space:
mode:
authorGunter Knauf <gk@gknw.de>2007-04-16 13:53:58 (GMT)
committerGunter Knauf <gk@gknw.de>2007-04-16 13:53:58 (GMT)
commit1d987360cbf21be95b0017ef22608a6c9f7037de (patch)
treeca9ade2d857d75af010f7e72ecbce7d5a9b361b5 /Makefile.m32
parent72beefe4f457747da7ec76380ab0607e995df445 (diff)
downloadc-ares-1d987360cbf21be95b0017ef22608a6c9f7037de.zip
c-ares-1d987360cbf21be95b0017ef22608a6c9f7037de.tar.gz
c-ares-1d987360cbf21be95b0017ef22608a6c9f7037de.tar.bz2
use Makefile.inc to determine sources.
Diffstat (limited to 'Makefile.m32')
-rw-r--r--Makefile.m3248
1 files changed, 24 insertions, 24 deletions
diff --git a/Makefile.m32 b/Makefile.m32
index 11d9818..233422e 100644
--- a/Makefile.m32
+++ b/Makefile.m32
@@ -5,27 +5,30 @@
## Use: make -f Makefile.m32 [demos]
##
## Quick hack by Guenter; comments to: /dev/nul
-
-CC = gcc
-RANLIB = ranlib
-
+#
########################################################
## Nothing more to do below this line!
-LIB=libcares.a
-CC=gcc
-CFLAGS=-O2 -Wall
-LDFLAGS=-s
-LIBS=-lwsock32
+LIB = libcares.a
+
+CC = gcc
+LD = gcc
+RANLIB = ranlib
+#RM = rm -f
-MANPAGES := $(patsubst %.c,%.o,$(wildcard ares_*.3))
+CFLAGS = -O2 -Wall
+LDFLAGS = -s
+LIBS = -lwsock32
-OBJS := $(patsubst %.c,%.o,$(wildcard ares_*.c))
-OBJS += windows_port.o inet_ntop.o inet_net_pton.o bitncmp.o
+# Makefile.inc provides the CSOURCES and HHEADERS defines
+include Makefile.inc
-$(LIB): ${OBJS}
- ar cru $@ ${OBJS}
- ${RANLIB} $@
+OBJLIB := $(patsubst %.c,%.o,$(strip $(CSOURCES)))
+
+
+$(LIB): $(OBJLIB)
+ ar cru $@ $^
+ $(RANLIB) $@
all: $(LIB) demos
@@ -34,16 +37,13 @@ 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}
+%.exe: %.o ares_getopt.o $(LIB)
+ $(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
-${OBJS}: ares.h ares_dns.h ares_private.h
+$(OBJLIB): ares.h ares_dns.h ares_private.h
.c.o:
- ${CC} -c ${CFLAGS} $<
+ $(CC) $(CFLAGS) -c $<
check:
@@ -61,8 +61,8 @@ install:
done)
clean:
- rm -f ${OBJS} $(LIB) adig.o adig.exe ahost.o ahost.exe
+ $(RM) ares_getopt.o $(OBJLIB) $(LIB) adig.exe ahost.exe
distclean: clean
- rm -f config.cache config.log config.status Makefile
+ $(RM) config.cache config.log config.status Makefile