1 #############################################################################
3 # Makefile for AES on Raspberry Pi
5 # License: GPL (General Public License)
6 # Author: Georgios Spanos (spaniakos) <spaniakos@gmail.com>
11 # use make all and mak install to install the library
12 # You can change the install directory by editing the LIBDIR line
17 # where to put the lib
24 # Where to put the header files
25 HEADER_DIR=${PREFIX}/include/AES
27 # The recommended compiler flags for the Raspberry Pi
28 CCFLAGS=-Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s
31 # reinstall the library after each recompilation
36 g++ -shared -Wl,-soname,$@.so.1 ${CCFLAGS} -o ${LIBNAME} $^
40 g++ -Wall -fPIC ${CCFLAGS} -c $^
45 rm -rf ${LIBDIR}/${LIB}.*
48 install: all install-libs install-headers
50 # Install the library to LIBPATH
52 @echo "[Installing Libs]"
53 @if ( test ! -d $(PREFIX)/lib ) ; then mkdir -p $(PREFIX)/lib ; fi
54 @install -m 0755 ${LIBNAME} ${LIBDIR}
55 @ln -sf ${LIBDIR}/${LIBNAME} ${LIBDIR}/${LIB}.so.1
56 @ln -sf ${LIBDIR}/${LIBNAME} ${LIBDIR}/${LIB}.so
60 @echo "[Installing Headers]"
61 @if ( test ! -d ${HEADER_DIR} ) ; then mkdir -p ${HEADER_DIR} ; fi
62 @install -m 0644 *.h ${HEADER_DIR}