# Note: BINDIR, DATADIR also occur in src/Makefile.
MANDIR  = $(DESTDIR)/usr/man
BINDIR  = $(DESTDIR)/usr/bin
DATADIR = $(DESTDIR)@datadir@
# 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.03wip

SUBDIRS = src openvt po

.EXPORT_ALL_VARIABLES:

all:
	for i in $(SUBDIRS); 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

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

