# This is the Makefile for the /macros directory of Meta-HTML.
# It simply builds the binary versions of the libraries from the source.
#

MCC = ../mhc/mhc ../utilities/mklib

TAGSETS	= acl.mhtml border.mhtml colors.mhtml crypto.mhtml \
	  debug.mhtml dirfuns.mhtml dump-package.mhtml \
	  english-numbers.mhtml general.mhtml initialize.mhtml \
	  input-macros.mhtml layout.mhtml make-identifier.mhtml \
	  menus.mhtml navlayout.mhtml numbers.mhtml pagecount.mhtml \
	  pagelist.mhtml parse-date.mhtml plist.mhtml sendmail.mhtml \
	  session.mhtml source.mhtml

LIBFILES= acl.lib border.lib colors.lib crypto.lib \
	  debug.lib dirfuns.lib dump-package.lib \
	  english-numbers.lib general.lib initialize.lib \
	  input-macros.lib layout.lib make-identifier.lib \
	  menus.lib navlayout.lib numbers.lib pagecount.lib \
	  pagelist.lib parse-date.lib plist.lib sendmail.lib \
	  session.lib source.lib

TARGET	= default.lib

.SUFFIXES: .lib .mhtml

.mhtml.lib:
	LD_LIBRARY_PATH=../../iodbc/lib:$$LD_LIBRARY_PATH \
	$(MCC) -o $@ $<

all: $(TARGET) $(LIBFILES)

$(TARGET): $(TAGSETS)
	LD_LIBRARY_PATH=../../iodbc/lib:$$LD_LIBRARY_PATH \
	$(MCC) -o $(TARGET) $(TAGSETS)

clean: FORCE
	rm -f $(TARGET)

distclean realclean: clean
	rm -rf $(LIBFILES)

FORCE:

