#
# Makefile
#

# dirs in crypto to build
ifeq ($(FULL), yes)
EXTRADIRS= bio err
endif
SUBDIRS=  common aes bn buffer lhash modes rand rsa stack $(EXTRADIRS) test

.PHONY: all clean cleanobjs $(SUBDIRS)
.DELETE_ON_ERROR:

default: all

TOPLEVEL=../..
CRYPTOTOP=.
include $(CRYPTOTOP)/common.mk
LIB= $(LIBDIR)/libcrypto.a

all:
ifeq ($(TEST),yes)
	touch rand/gen_entropy_test.c
	touch rand/display_entropy.c
	touch rand/rsa_test_2.c
endif
	for i in $(SUBDIRS); do $(MAKE) -C $$i all; done

clean:
	for i in $(SUBDIRS); do $(MAKE) -C $$i clean; done
	rm $(LIB)

cleanobjs:
	for i in $(SUBDIRS); do $(MAKE) -C $$i cleanobjs; done
