summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 19 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 35bccca..698ff10 100644
--- a/Makefile
+++ b/Makefile
@@ -1,24 +1,38 @@
+prefix=/usr/local
+
OPTS=-O2
+# Solaris
+#LDFLAGS=-lnsl -lsocket
+
all: whois #pos
-whois: whois.c whois.h config.h data.h ip_del.h tld_serv.h
- $(CC) $(OPTS) whois.c -o whois
+whois: whois.c whois.h config.h data.h as_del.h ip_del.h tld_serv.h
+ $(CC) $(OPTS) whois.c -o whois $(LDFLAGS)
mkpasswd:
$(CC) $(OPTS) mkpasswd.c -o mkpasswd -lcrypt
+as_del.h: as_del_list make_as_del.pl
+ perl make_as_del.pl < as_del_list > as_del.h
+
ip_del.h: ip_del_list make_ip_del.pl
- ./make_ip_del.pl < ip_del_list > ip_del.h
+ perl make_ip_del.pl < ip_del_list > ip_del.h
tld_serv.h: tld_serv_list make_tld_serv.pl
- ./make_tld_serv.pl < tld_serv_list > tld_serv.h
+ perl make_tld_serv.pl < tld_serv_list > tld_serv.h
+
+install: whois
+ install --strip -m 0755 whois $(BASEDIR)$(prefix)/bin/
+ install --strip -m 0644 whois.1 $(BASEDIR)$(prefix)/man/man1/
+ cd po && $(MAKE) $@
+
distclean: clean
rm -f po/whois.pot
clean:
- rm -f tld_serv.h ip_del.h whois mkpasswd
+ rm -f as_del.h ip_del.h tld_serv.h whois mkpasswd
rm -f po/*.mo
test: