Makefile 932 Bytes
#
# Makefile for the Rijndael algorithm using GCC-based compilers
#

CC=	gcc
CFLAGS=	-Os  -mcpu=pentiumpro -pedantic -fomit-frame-pointer -DINTEL_GCC

OBJ=	rijndael-alg-ref.o rijndael-api-ref.o 
TRACE_OBJ=

#
# Rules
#

all:	test_enc test_dec

#
# Dependencies
# 

rijndael-alg-ref.o:	rijndael-alg-ref.c rijndael-alg-ref.h
	$(CC) $(CFLAGS) -c rijndael-alg-ref.c

rijndael-api-ref.o:	rijndael-api-ref.c rijndael-api-ref.h
	$(CC) $(CFLAGS) -c rijndael-api-ref.c

test_enc.o:	test_enc.c rijndael-api-ref.h
	$(CC) $(CFLAGS) -c test_enc.c

test_enc:	test_enc.o $(OBJ)
	$(CC) $(CFLAGS) -o test_enc test_enc.o $(OBJ)

test_dec.o:	test_dec.c rijndael-api-ref.h
	$(CC) $(CFLAGS) -c test_dec.c

test_dec:	test_dec.o $(OBJ)
	$(CC) $(CFLAGS) -otest_dec  test_dec.o $(OBJ)



#
# Run the Tests
#
runtests: all
	-test_enc
	-test_dec
#
# Clean
#
clean:
	-rm *.o

cleanexes:
	-rm test_enc test_dec

cleanall: clean cleanexes 

#
# End Of Makefile