isdn4k-utils/isdnlog/tools/zone/Makefile.in

207 lines
4.7 KiB
Makefile

#
# Makefile for mkzonedb (parts borrowed from iMON)
#
# (C) 1999 l.toetsch <lt@toetsch.at>
#
BZIP2 = @BZIP2@
SHELL = /bin/sh
CFLAGS = -Wall -g
INCLUDES =
LDFLAGS = @DBMLIB@
CDBEXTRALIBS = @CDBEXTRALIBS@
DBEXT = @DBEXT@
RDBEXT = @RDBEXT@
BIGENDIAN = @WORDS_BIGENDIAN@
PROGRAM = mkzonedb
MODULES = $(PROGRAM).o
MANPAGE = $(PROGRAM).8
HEADERS = config.h common.h
MANDIR = @CONFIG_MANDIR@
SBINDIR = @CONFIG_SBINDIR@
MAN8DIR = $(MANDIR)/man8
INSTALL = @INSTALL@
INSTALL_PROGRAM = $(INSTALL) -o 0 -g 0 -m 0750
INSTALL_MAN = $(INSTALL) -o 0 -g 0 -m 0644
prefix = @prefix@
exec_prefix = @exec_prefix@
#CC = @CC@ -V2.7.2.3
CC = @CC@
ifeq ($(BIGENDIAN), yes)
ZONEFILES=zonefiles
endif
.SUFFIXES:
.SUFFIXES: .c .o
.PHONY: all config zonefiles AT DE NL distclean dist test install uninstall country
%.o: %.c Makefile
$(CC) $(CFLAGS) $(DEFS) $(INCLUDES) -c -o $@ $<
all: cdb $(PROGRAM) country
cdb:
@if [ -e ../cdb/i4l_cdb.c ] ; then \
$(MAKE) -C ../cdb ;\
fi
country:
ifeq ($(CONFIG_ISDN_LOG_AT),y)
$(MAKE) AT
endif
ifeq ($(CONFIG_ISDN_LOG_DE),y)
$(MAKE) DE
endif
ifeq ($(CONFIG_ISDN_LOG_NL),y)
$(MAKE) NL
endif
config:
@./configure
config.h: config.h.in
@./configure
Makefile: Makefile.in config.status
./config.status
config.status: configure
./config.status --recheck
$(MODULES): $(HEADERS)
$(PROGRAM): $(MODULES) $(CDBEXTRALIBS)
$(CC) $(CFLAGS) $? $(LDFLAGS) -o $@ $(CDBEXTRALIBS)
zone: ../zone.c $(HEADERS) Makefile $(CDBEXTRALIBS)
$(CC) -DSTANDALONE -DZONETEST $(CFLAGS) ../zone.c $(LDFLAGS) -o $@ $(CDBEXTRALIBS)
install-man: $(PROGRAM).man
mkdir -p $(DESTDIR)$(MAN8DIR)
$(INSTALL_MAN) $< $(DESTDIR)$(MAN8DIR)/$(MANPAGE)
install: $(PROGRAM) # install-man
$(INSTALL_PROGRAM) $(PROGRAM) $(DESTDIR)$(SBINDIR)/$(PROGRAM)
install-strip: $(PROGRAM)
$(INSTALL_PROGRAM) -s $(PROGRAM) $(DESTDIR)$(SBINDIR)/$(PROGRAM)
uninstall:
rm -f $(DESTDIR)$(SBINDIR)/$(PROGRAM) $(DESTDIR)$(MAN8DIR)/$(MANPAGE)
clean:
rm -f *.o *~ $(PROGRAM) zone
@if [ -e ../cdb/i4l_cdb.c ] ; then \
$(MAKE) -C ../cdb clean ; \
fi
dataclean: clean
rm -f *.db *.gdbm *.cdb ../../zone*.{gdbm,db,cdb}
distclean: clean
rm -f config.h config.status config.cache config.log *.man Makefile
@if [ -e ../cdb/i4l_cdb.c ] ; then \
$(MAKE) -C ../cdb distclean ; \
fi
test: zone mkzonedb
-$(BZIP2) -d at/pta/zred.pta.bz2
-$(BZIP2) -d at/pta/zoneall.pta.bz2
./$(PROGRAM) -d zone-at-pta$(DBEXT) -r at/pta/zred.pta -v
./zone -d zone-at-pta$(RDBEXT) -z at/pta/zoneall.pta -v
$(BZIP2) -9 at/pta/zred.pta
$(BZIP2) -9 at/pta/zoneall.pta
#
# ATTENTION:
# zonedatabasefilenames must be zone-CC-*
#
zonefiles: AT DE NL
at:
AT
de:
DE
nl:
NL
AT: AT-pta AT-1002 AT-1007 AT-1012 AT-1024 AT-1066 AT-1004 AT-1001
.PHONY: AT-pta AT-1002 AT-1007 AT-1012 AT-1024 AT-1066 AT-1004 AT-1001
AT-pta:
if [ ! -e ../../zone-at-pta$(DBEXT) ] ; then \
$(BZIP2) -d at/pta/zred.pta.bz2; \
./$(PROGRAM) -d ../../zone-at-pta$(DBEXT) -r at/pta/zred.pta -v; \
$(BZIP2) -9 at/pta/zred.pta; \
fi
AT-1001:
if [ ! -e ../../zone-at-1001$(DBEXT) ] ; then \
$(BZIP2) -d at/1001/zred.bz2; \
./$(PROGRAM) -d ../../zone-at-1001$(DBEXT) -r at/1001/zred -v; \
$(BZIP2) -9 at/1001/zred; \
fi
AT-1002:
if [ ! -e ../../zone-at-uta$(DBEXT) ] ; then \
$(BZIP2) -d at/uta/zred.uta.bz2; \
./$(PROGRAM) -d ../../zone-at-uta$(DBEXT) -r at/uta/zred.uta -v; \
$(BZIP2) -9 at/uta/zred.uta; \
fi
AT-1004:
if [ ! -e ../../zone-at-1004$(DBEXT) ] ; then \
$(BZIP2) -d at/1004/zred.bz2; \
./$(PROGRAM) -d ../../zone-at-1004$(DBEXT) -r at/1004/zred -v; \
$(BZIP2) -9 at/1004/zred; \
fi
AT-1007:
if [ ! -e ../../zone-at-1007$(DBEXT) ] ; then \
$(BZIP2) -d at/1007/zred.bz2; \
./$(PROGRAM) -d ../../zone-at-1007$(DBEXT) -r at/1007/zred -v; \
$(BZIP2) -9 at/1007/zred; \
fi
AT-1012:
if [ ! -e ../../zone-at-1012$(DBEXT) ] ; then \
./$(PROGRAM) -d ../../zone-at-1012$(DBEXT) -r at/1012/zred-at-1012 -v -l4; \
fi
AT-1024:
if [ ! -e ../../zone-at-1024$(DBEXT) ] ; then \
$(BZIP2) -d at/1024/zred.bz2; \
./$(PROGRAM) -d ../../zone-at-1024$(DBEXT) -r at/1024/zred -v -l4; \
$(BZIP2) -9 at/1024/zred; \
fi
AT-1066:
if [ ! -e ../../zone-at-1066$(DBEXT) ] ; then \
$(BZIP2) -d at/1066/zred.bz2; \
./$(PROGRAM) -d ../../zone-at-1066$(DBEXT) -r at/1066/zred -v; \
$(BZIP2) -9 at/1066/zred; \
fi
DE: DE-dtag
.PHONY: DE-dtag
DE-dtag:
if [ ! -e ../../zone-de-dtag$(DBEXT) ] ; then \
$(BZIP2) -d de/01033/zred.dtag.bz2; \
./$(PROGRAM) -d ../../zone-de-dtag$(DBEXT) -r de/01033/zred.dtag -v; \
$(BZIP2) -9 de/01033/zred.dtag; \
fi
NL: NL-kpn
.PHONY: NL-kpn
NL-kpn:
if [ ! -e ../../zone-nl-kpn$(DBEXT) ] ; then \
$(BZIP2) -d nl/kpn/zred.bz2; \
./$(PROGRAM) -d ../../zone-nl-kpn$(DBEXT) -r nl/kpn/zred -v -o3 -l7; \
$(BZIP2) -9 nl/kpn/zred; \
fi