Makefile
863 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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 $<