#
# This is the master makefile.  It's responsible for the simple stuff,
# but doesn't actually do any compilation.  That is done by Makefile.sub,
# which is generated by configure (which is generated by GNU autoconf)
include ../../Makefile.defs

all: $(U_DIR)/dhtest $(U_DIR)/dsatest

$(U_DIR)/dhtest: $(U_DIR)/Makefile.sub dhtest.c ../$(U_DIR)/libbn.a \
  ../$(U_DIR)/config.h
	cd $(U_DIR); $(MAKE) -f Makefile.sub BNDIR=../../$(U_DIR) dhtest

$(U_DIR)/dsatest: $(U_DIR)/Makefile.sub dsatest.c ../$(U_DIR)/libbn.a \
  ../$(U_DIR)/config.h
	cd $(U_DIR); $(MAKE) -f Makefile.sub BNDIR=../../$(U_DIR) dsatest

$(U_DIR)/Makefile.sub: Makefile.in ../$(U_DIR)/config.status
	cd $(U_DIR); CONFIG_HEADERS= CONFIG_FILES=Makefile.sub:Makefile.in \
		../../$(U_DIR)/config.status

.INIT:
	@[ -d $(U_DIR) ] || mkdir -p $(U_DIR)

clean:
	@$(RM) -r $(U_DIR)
	@$(RM) -f *32.[ch] *64.[ch]
	@-$(SCCSCLEAN)

cleanall:
	@$(RM) -rf *bin.* *32.[ch] *64.[ch]
	@-$(SCCSCLEAN)
