One more Makefile.in

This commit is contained in:
Frank Denis
2013-01-19 18:10:29 -08:00
parent 9cd4c769a7
commit b801c07db2
+43
View File
@@ -0,0 +1,43 @@
CC=@CC@
CFLAGS=@CFLAGS@
CPP=@CPPFLAGS@
LDFLAGS=@LDFLAGS@
LIBS=@LIBS@
TESTS_RESULTS = \
auth.res auth2.res auth5.res box.res box2.res box7.res box8.res \
core1.res core2.res core3.res core4.res core5.res core6.res \
hash.res hash3.res onetimeauth.res onetimeauth2.res \
onetimeauth7.res scalarmult.res scalarmult2.res scalarmult5.res \
scalarmult6.res secretbox.res secretbox2.res secretbox7.res \
secretbox8.res stream.res stream2.res stream3.res stream4.res
all: test
run-tests: $(TESTS_RESULTS)
test: .done
.done: run-tests
touch .done
.exe.res:
outfile=`echo "$@" | sed 's/.res$$/.out/'` ; \
`pwd`/$< | cmp $$outfile || exit 1
.c.exe:
nacl_lib="`pwd`/../../@NACL_PATH@/lib/local" ; \
nacl_include="`pwd`/../../@NACL_PATH@/include/local" ; \
nacl_include_extra="`pwd`/../../@NACL_PATH@/include" ; \
$(CC) $(CPPFLAGS) $(CFLAGS) -I$$nacl_include -I$$nacl_include_extra $< $$nacl_lib/randombytes.o -o $@ $(LDFLAGS) -L$$nacl_lib -lnacl $(LIBS)
clean:
-rm -f .done
-rm -f *.exe
-rm -f *.res
-rm -fr *.dSYM
distclean: clean
.SUFFIXES: .c .cpp .res .exe