# Top-level Makefile for LCC
# Amiga port 26-Aug-1996; Joop van de Wege
# email: Joop.vandeWege@medew.ento.wau.nl
# TODO: make install rule
#       add rule for building with lcc/rcc (path problems!)
#       remove all unneeded stuff which still lingers here from the copy
#       fill most rules with something sensible or remove them

#PRODUCT = @PRODUCT@
#VERSION = @VERSION@

SHELL = /bin/sh
srcdir = @srcdir@
VPATH = @srcdir@
@SET_MAKE@

prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = $(exec_prefix)/bin
infodir = $(prefix)/info
mandir = $(prefix)/man

CC = @CXX@
CFLAGS = @CFLAGS@
GNUFLAGS = @GNUFLAGS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
RANLIB = @RANLIB@
LN_S = @LN_S@
AR = ar

MDEFINES = CC='$(CC)' CFLAGS='$(CFLAGS) $(GNUFLAGS)' \
TEMPLATEFLAGS='$(TEMPLATEFLAGS)' LDFLAGS='$(LDFLAGS)' LIBS='$(LIBS)' \
prefix='$(prefix)' exec_prefix='$(exec_prefix)' \
bindir='$(bindir)' infodir='$(infodir)' mandir='$(mandir)'

SUBDIRS = cpp etc lburg src

all:
	for subdir in $(SUBDIRS); do \
	  echo making $@ in $$subdir; \
	  (cd $$subdir && $(MAKE) $(MDEFINES) $@) || exit 1; \
	done

install: all
	for subdir in $(SUBDIRS); do \
	  echo making $@ in $$subdir; \
	  (cd $$subdir && $(MAKE) $(MDEFINES) $@) || exit 1; \
	done

uninstall:
	for subdir in $(SUBDIRS); do \
	  echo making $@ in $$subdir; \
	  (cd $$subdir && $(MAKE) $(MDEFINES) $@) || exit 1; \
	done
	rm -rf $(datasubdir)

manpage:
	cd man && $(MAKE) $@

info dvi:
	cd doc && $(MAKE) $@

check: all
	cd checks && $(MAKE) $@

mostlyclean: mostlyclean-recursive mostlyclean-local

clean: clean-recursive clean-local

distclean: distclean-recursive distclean-local

mostlyclean-recursive clean-recursive distclean-recursive realclean-recursive:

mostlyclean-local:
	rm -f *~ #*# *.tar.gz

clean-local: mostlyclean-local

distclean-local: clean-local

dist: $(DISTFILES)

bindist: $(DISTFILES) all

# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
