# Note: BINDIR, DATA_DIR, and DESTDIR also occur in src/Makefile.
DATA_DIR = @datadir@
MAN_DIR = @mandir@
BINDIR  = /usr/bin
MANDIR  = $(MAN_DIR)
DATADIR = $(DATA_DIR)
# If you change the names of any of the following subdirs,
# also change paths.h.
OLDKEYMAPDIR = keytables
KEYMAPDIR = keymaps
UNIMAPDIR = unimaps
FONTDIR   = consolefonts
PARTIALDIR= partialfonts
TRANSDIR  = consoletrans
KEYMAPSUBDIRS = include sun amiga atari i386/azerty i386/dvorak i386/fgGIod i386/qwerty i386/qwertz i386/include mac/include mac/all

# Do not use GZIP - it is interpreted by gzip
MYGZIP = gzip -f -9

DIR	= kbd-1.06

SUBDIRS = src openvt po

.EXPORT_ALL_VARIABLES:

all:
	for i in $(SUBDIRS) data; do (cd $$i && $(MAKE) all); done
	@echo "Done. You can now do  make install"

install:	install-progs install-data install-man

install-progs:
	for i in $(SUBDIRS); do (cd $$i && $(MAKE) install); done

install-man:
	cd man && $(MAKE) install
	cd openvt && $(MAKE) install-man

install-data:
	cd data && $(MAKE) install

tar: reallyclean # analyze.c loadkeys.c
	cd ..; 	tar cvfz $(DIR).tar.gz ./$(DIR)

clean:
	for i in $(SUBDIRS); do (cd $$i && $(MAKE) clean); done
	cd man && $(MAKE) clean
	cd data && $(MAKE) clean

reallyclean distclean spotless: clean
	find . -name "*~" -exec rm {} ";"
	for i in $(SUBDIRS); do (cd $$i && $(MAKE) distclean); done
	rm -f Makefile src/Makefile make_include defines.h

