summaryrefslogtreecommitdiff
path: root/Makefile.m32
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.m32')
-rw-r--r--Makefile.m3213
1 files changed, 11 insertions, 2 deletions
diff --git a/Makefile.m32 b/Makefile.m32
index 52d9310..42149f5 100644
--- a/Makefile.m32
+++ b/Makefile.m32
@@ -10,12 +10,15 @@
LIB = libcares.a
+AR = ar
CC = gcc
LD = gcc
RANLIB = ranlib
#RM = rm -f
+CP = cp -afv
-CFLAGS = -O2 -Wall
+CFLAGS = -O2 -Wall -I.
+CFLAGS += -DCARES_STATICLIB
LDFLAGS = -s
LIBS = -lwsock32
@@ -26,7 +29,7 @@ OBJLIB := $(patsubst %.c,%.o,$(strip $(CSOURCES)))
$(LIB): $(OBJLIB)
- ar cru $@ $^
+ $(AR) cru $@ $^
$(RANLIB) $@
all: $(LIB) demos
@@ -44,6 +47,9 @@ $(OBJLIB): ares.h ares_dns.h ares_private.h ares_build.h ares_rules.h
.c.o:
$(CC) $(CFLAGS) -c $<
+ares_build.h:
+ $(CP) ares_build.h.dist ares_build.h
+
check:
install:
@@ -65,4 +71,7 @@ clean:
distclean: clean
$(RM) config.cache config.log config.status Makefile
+ifeq "$(wildcard ares_build.h.dist)" "ares_build.h.dist"
+ $(RM) ares_build.h
+endif