aboutsummaryrefslogblamecommitdiff
path: root/source/Makefile
blob: 5913f47b0fa39efc5da363b2afdd9560e21333d1 (plain) (tree)
1
2
3
4
5
6
7
8
9
10





                                                                     

                              

                                                           


                                                                     

    
                            

                
                               

            
                                                                                                                           

                                                                                                                  


                                                                       
# Source package makefile for Cryptech Alpha board software.
#
# This is, deliberately, a very simplified Makefile.  for the most
# part we just want to do the bare minimum needed for whatever
# software packaging system we use to work.  At least for the moment,
# the primary packaging system is Debian-based, so this is written
# to work in that environment.
#
# See setup.py for installation of the Python-related bits.
#
# We also support Homebrew for MacOSX, using the source tarball
# generated by the Debian packaging process, but the Homebrew formula
# handles the build and installation for that environment.

all:
	${MAKE} -C sw/pkcs11

clean distclean:
	${MAKE} -C sw/pkcs11 $@

install: all
	install -D -m 644 cryptech-alpha-firmware.tar.gz		${DESTDIR}/usr/share/cryptech-alpha-firmware.tar.gz
	install -D -m 644 sw/pkcs11/libcryptech-pkcs11.so		${DESTDIR}/usr/lib/libcryptech-pkcs11.so
	ln	-s	            libcryptech-pkcs11.so		${DESTDIR}/usr/lib/libcryptech-pkcs11.so.0
	python2 setup.py install --install-layout=deb --root=${DESTDIR}
	python3 setup.py install --install-layout=deb --root=${DESTDIR}
	find ${DESTDIR} -type d -name __pycache__ -exec rm -rf {} +