summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMarco d'Itri <md@linux.it>2005-09-11 16:04:48 +0200
committerMarco d'Itri <md@linux.it>2013-03-30 02:31:32 +0100
commit9ad7ad696c3bfd7086b453ee07305ceedeeb0a4e (patch)
tree19a4fc0b06c12acbbc22923fbc52404173c98e2f /Makefile
parent8d33311a6803e9d3f0ab8509c8bae686f2ff2d2f (diff)
downloadwhois-9ad7ad696c3bfd7086b453ee07305ceedeeb0a4e.tar.gz
Imported Debian version 4.7.7v4.7.7
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 15 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index ec2a88d..f377841 100644
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,9 @@
prefix ?= /usr/local
-OPTS=-O2
+OPTS := -O2
# Solaris
-#LDFLAGS=-lnsl -lsocket
-
-# obsolete linux (libc 5)
-#LDFLAGS=-lintl
+#whois_LDADD += -lnsl -lsocket
# FreeBSD
#LDFLAGS=-L/usr/local/lib -lgnugetopt -lintl
@@ -16,8 +13,15 @@ OPTS=-O2
#LDFLAGS=-lsocket -Zexe -Dstrncasecmp=strnicmp
ifdef HAVE_LIBIDN
-LIBIDN += -lidn
-CFLAGS += -DHAVE_LIBIDN
+whois_LDADD += -lidn
+whois_CFLAGS += -DHAVE_LIBIDN
+endif
+
+ifdef HAVE_XCRYPT
+mkpasswd_LDADD += -lxcrypt
+mkpasswd_CFLAGS += -DHAVE_XCRYPT
+else
+mkpasswd_LDADD += -lcrypt
endif
PERL := perl
@@ -25,10 +29,12 @@ PERL := perl
all: whois #pos
whois: whois.c whois.h config.h data.h as_del.h ip_del.h ip6_del.h tld_serv.h
- $(CC) $(CFLAGS) $(OPTS) whois.c -o whois $(LDFLAGS) $(LIBIDN)
+ $(CC) $(CFLAGS) $(whois_CFLAGS) $(OPTS) whois.c -o whois \
+ $(LDFLAGS) $(whois_LDADD)
mkpasswd: mkpasswd.c
- $(CC) $(CFLAGS) $(OPTS) mkpasswd.c -o mkpasswd -lcrypt
+ $(CC) $(CFLAGS) $(mkpasswd_CFLAGS) $(OPTS) mkpasswd.c -o mkpasswd \
+ $(LDFLAGS) $(mkpasswd_LDADD)
as_del.h: as_del_list make_as_del.pl
$(PERL) -w make_as_del.pl < as_del_list > as_del.h