diff options
author | Daniel Stenberg <daniel@haxx.se> | 2004-07-01 13:53:13 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2004-07-01 13:53:13 +0000 |
commit | b350d5da590f9cd250dbb7af078f17f4437e242f (patch) | |
tree | cb5335ca09ab0cd9b2b4159c90a8d59f36d0ec18 /ares | |
parent | 6df3bf3644b22123e6cee9e7d7685a8159e42f97 (diff) |
Gisle added makefile for djgpp builds
Diffstat (limited to 'ares')
-rw-r--r-- | ares/FILES | 1 | ||||
-rw-r--r-- | ares/Makefile.dj | 56 |
2 files changed, 57 insertions, 0 deletions
diff --git a/ares/FILES b/ares/FILES index 52e8b6f38..7f328a07a 100644 --- a/ares/FILES +++ b/ares/FILES @@ -10,6 +10,7 @@ maketgz aclocal.m4 acinclude.m4 Makefile.in +Makefile.dj install-sh mkinstalldirs configure diff --git a/ares/Makefile.dj b/ares/Makefile.dj new file mode 100644 index 000000000..ca9e84f0c --- /dev/null +++ b/ares/Makefile.dj @@ -0,0 +1,56 @@ +#
+# c-ares Makefile for djgpp/gcc/Watt-32
+# By Gisle Vanem <giva@bgnett.no> 2004.
+#
+.SUFFIXES: .exe
+
+WATT32_ROOT = $(subst \,/,$(WATT_ROOT))
+
+CC = gcc
+CFLAGS = -O2 -Wall -DWATT32 -Dselect=select_s -I$(WATT32_ROOT)/inc
+LDFLAGS = -s
+EX_LIBS = $(WATT32_ROOT)/lib/libwatt.a
+
+SOURCE = ares_cancel.c ares_destroy.c ares_expand_name.c ares_expand_string.c ares_fds.c \
+ ares_free_hostent.c ares_free_string.c ares_gethostbyaddr.c ares_gethostbyname.c \
+ ares_init.c ares_mkquery.c ares_parse_a_reply.c ares_parse_ptr_reply.c \
+ ares_process.c ares_query.c ares_search.c ares_send.c ares_strerror.c \
+ ares_timeout.c ares__close_sockets.c ares__get_hostent.c ares__read_line.c \
+ ares_version.c
+
+OBJ_DIR = djgpp
+
+OBJECTS = $(addprefix $(OBJ_DIR)/, $(SOURCE:.c=.o))
+
+
+all: $(OBJ_DIR) libcares.a ahost.exe adig.exe
+ @echo Welcome to c-ares.
+
+$(OBJ_DIR):
+ - mkdir $(OBJ_DIR)
+
+libcares.a: $(OBJECTS)
+ ar rs $@ $?
+
+ahost.exe: ahost.c libcares.a
+ $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(EX_LIBS)
+
+adig.exe: adig.c libcares.a
+ $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(EX_LIBS)
+
+clean:
+ rm -f $(OBJECTS) libcares.a
+
+vclean realclean: clean
+ rm -f ahost.exe adig.exe depend.dj
+ - rmdir $(OBJ_DIR)
+
+$(OBJ_DIR)/%.o: %.c
+ $(CC) $(CFLAGS) -o $@ -c $<
+ @echo
+
+depend:
+ $(CC) -MM $(CFLAGS) $(SOURCE) | \
+ sed -e 's/^\([a-zA-Z0-9_-]*\.o:\)/$$(OBJ_DIR)\/\1/' > depend.dj
+
+-include depend.dj
|