summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMarco d'Itri <md@linux.it>2011-10-10 02:04:32 +0200
committerMarco d'Itri <md@linux.it>2013-03-30 02:31:41 +0100
commit6c3ca39f2504328fb876cec1a003a4e9689e6753 (patch)
tree70f18102b245888bbe0ef1a71a0ad1238fa0e6f7 /Makefile
parent1712990060242307d09528b5349eebbe7e2efec3 (diff)
downloadwhois-6c3ca39f2504328fb876cec1a003a4e9689e6753.tar.gz
Imported Debian version 5.0.12v5.0.12
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 11 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 44f09dd..8ac844d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
prefix = /usr
-CFLAGS = -g -O2
+CFLAGS ?= -g -O2
PERL = perl
INSTALL = install
@@ -44,17 +44,23 @@ endif
ifdef HAVE_XCRYPT
mkpasswd_LDADD += -lxcrypt
-DEFS += -DHAVE_XCRYPT
+DEFS += -DHAVE_XCRYPT -DHAVE_LINUX_CRYPT_GENSALT
else
+ifdef HAVE_LINUX_CRYPT_GENSALT
+# owl and openSUSE have crypt_gensalt(3) in the libc's libcrypt
+DEFS += -DHAVE_LINUX_CRYPT_GENSALT
+endif
mkpasswd_LDADD += -lcrypt
endif
+CPPFLAGS += $(DEFS) $(INCLUDES)
+
##############################################################################
all: Makefile.depend whois mkpasswd #pos
##############################################################################
%.o: %.c
- $(CC) $(DEFS) $(INCLUDES) $(CFLAGS) -c $<
+ $(CC) $(CPPFLAGS) $(CFLAGS) -c $<
whois: $(whois_OBJECTS)
$(CC) $(LDFLAGS) -o $@ $^ $(whois_LDADD) $(LIBS)
@@ -104,7 +110,7 @@ distclean: clean
clean:
rm -f Makefile.depend as_del.h ip_del.h ip6_del.h tld_serv.h \
- *.o whois mkpasswd
+ servers_charset.h *.o whois mkpasswd
rm -f po/*.mo
pos:
@@ -112,6 +118,6 @@ pos:
depend: Makefile.depend
Makefile.depend:
- $(CC) $(DEFS) $(INCLUDES) $(CFLAGS) -MM -MG *.c > $@
+ $(CC) $(CPPFLAGS) $(CFLAGS) -MM -MG *.c > $@
-include Makefile.depend