Makefile 863 Bytes
PRDEPTH = ../../../..
include $(PRDEPTH)/PRdefs

#
# C Flags
#
LCINCS  = -I. -I$(ROOT)/usr/include/PR
LCOPTS  = -g -DDEBUG -D_LANGUAGE_C
LCFLAGS = $(LCOPTS) $(LCINCS) -pedantic -DINTEL_GCC

OBJECTS = pi_aes.o rijndael-alg-ref.o rijndael-api-ref.o
PI_AES_LIB = pi_aes.a
PI_AES_TESTS = test_pi_keygen test_pi_encrypt test_pi_decrypt

default: $(PI_AES_TESTS)

subdirs: $(PI_AES_LIB)
	@echo "  in the subdir aes"

test_pi_keygen: test_pi_keygen.o test_utils.o $(PI_AES_LIB)
	$(HOST_CC) $(LCFLAGS) -o $@ $^

test_pi_encrypt: test_pi_encrypt.o test_utils.o $(PI_AES_LIB)
	$(HOST_CC) $(LCFLAGS) -o $@ $^

test_pi_decrypt: test_pi_decrypt.o test_utils.o $(PI_AES_LIB)
	$(HOST_CC) $(LCFLAGS) -o $@ $^

$(PI_AES_LIB):  $(OBJECTS)
	$(AR) rc $@ $(OBJECTS)

clean:
	rm -f *.o $(PI_AES_TESTS) $(PI_AES_LIB)

#include $(COMMONRULES)

.c.o:
	$(HOST_CC) $(LCFLAGS) -c $<