[svn] / ecrypt / trunk / test / ecrypt-test.mk  

svn: ecrypt/trunk/test/ecrypt-test.mk

File: [svn] / ecrypt / trunk / test / ecrypt-test.mk (download)
Revision: 91, Thu Aug 25 10:31:14 2005 UTC (7 years, 8 months ago) by cdecanni
File size: 1133 byte(s)
* fixed some small problems when running under windows.
all: build

reports := $(root)/reports-$(shell \
  if [ -n "$$HOSTNAME" ]; then \
    echo "$$HOSTNAME"; \
  else \
    hostname; \
  fi)

ifdef conf
  include $(reports)/configs/$(conf).mk
endif

include $(root)/test/compiler.mk

api = ecrypt-$(type).h
binary = ecrypt-test$(id)$(exe)

ifdef var
  defvar = -DECRYPT_VARIANT=$(var)
endif

CFLAGS = $(opt)
LDFLAGS = $(CFLAGS)
TARGET_ARCH = $(arch)
CPPFLAGS = -DECRYPT_API=$(api) $(defvar) -I$(root)/include -I$(srcdir)
VPATH = $(srcdir):$(root)/test:$(root)/api:$(root)/include

build: $(binary)

name:
	@echo $(name)

hash: $(binary)
	@((objdump -d $< 2> /dev/null) || cat $<) | md5sum

run: $(binary)
	@echo $(run) ./$<

$(binary): ecrypt-test$(obj) ecrypt-$(type)$(obj) ./$(name)$(obj)
$(api): ecrypt-config.h ecrypt-machine.h ecrypt-portable.h 
ecrypt-test$(obj): $(api)
ecrypt-$(type)$(obj): $(api)
$(name)$(obj): $(api)

variants: $(api)
	max=`awk \
	  '/^#define[ \t]+ECRYPT_MAXVARIANT/ { print $$3; exit; }' $<`; \
	var=0; while [ "$$var" -lt "$$max" ]; do var=$$((var+1)); \
	  echo $$var; \
	done > $@

clean:
	$(RM) $(binary) *$(obj)

.PHONY: all build name hash run clean

eSTREAM Project

Powered by ViewCVS 1.0-dev
(Powered by Apache)

ViewCVS and CVS Help