58 lines
1.4 KiB
Makefile
58 lines
1.4 KiB
Makefile
AR = m68k-amigaos-ar
|
|
CC = m68k-amigaos-gcc
|
|
LD = m68k-amigaos-gcc
|
|
RANLIB = m68k-amigaos-ranlib
|
|
RM = rm -f
|
|
CFLAGS = -O2 -Wall -I. -Iinclude -DHAVE_CONFIG_H -DCARES_STATICLIB -DAMIGA -DAOS3
|
|
LDFLAGS = -noixemul -s
|
|
LIBS = -lm
|
|
|
|
LIB = libcares.a
|
|
LIBH = ares.h ares_build.h ares_rules.h
|
|
|
|
# Makefile.inc provides the CSOURCES and HHEADERS defines
|
|
include Makefile.inc
|
|
|
|
OBJLIB := $(patsubst %.c,%.o,$(strip $(CSOURCES)))
|
|
|
|
all: $(LIB) dig host country doc
|
|
|
|
dig: adig.o ares_getopt.o $(LIB)
|
|
$(CC) $(CFLAGS) $(LDFLAGS) -o dig adig.o ares_getopt.o $(LIB) $(LIBS)
|
|
|
|
host: ahost.o ares_getopt.o $(LIB)
|
|
$(CC) $(CFLAGS) $(LDFLAGS) -o host ahost.o ares_getopt.o $(LIB) $(LIBS)
|
|
|
|
country: acountry.o ares_getopt.o $(LIB)
|
|
$(CC) $(CFLAGS) $(LDFLAGS) -o country acountry.o ares_getopt.o $(LIB) $(LIBS)
|
|
|
|
$(LIB): $(OBJLIB)
|
|
$(AR) cru $@ $^
|
|
$(RANLIB) $@
|
|
|
|
doc:
|
|
./workman1 adig.1 >dig.txt
|
|
./workman2 adig.1 >dig.help
|
|
./workman1 ahost.1 >host.txt
|
|
./workman2 ahost.1 >host.help
|
|
./workman1 acountry.1 >country.txt
|
|
./workman2 acountry.1 >country.help
|
|
|
|
tags:
|
|
etags *.[ch]
|
|
|
|
$(OBJLIB): ares.h ares_dns.h ares_private.h ares_build.h ares_rules.h
|
|
|
|
.c.o:
|
|
$(CC) $(CFLAGS) -c $<
|
|
|
|
clean:
|
|
$(RM) adig.o ahost.o acountry.o ares_getopt.o $(OBJLIB) $(LIB) dig host country dig.txt dig.help host.txt host.help country.txt country.help
|
|
|
|
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
|
|
|