Makefile 914 Bytes
Newer Older
1 2

DESTDIR=/usr/local
Paul Bakker's avatar
Paul Bakker committed
3
PREFIX=polarssl_
4 5 6 7

.SILENT:

all:
Paul Bakker's avatar
Paul Bakker committed
8 9 10
	cd library  && $(MAKE) all && cd ..
	cd programs && $(MAKE) all && cd ..
	cd tests && $(MAKE) all && cd ..
11 12

install:
Paul Bakker's avatar
Paul Bakker committed
13 14
	mkdir -p $(DESTDIR)/include/polarssl
	cp -r include/polarssl $(DESTDIR)/include
15 16
	
	mkdir -p $(DESTDIR)/lib
Paul Bakker's avatar
Paul Bakker committed
17
	cp library/libpolarssl.* $(DESTDIR)/lib
18 19 20 21 22 23 24 25 26 27 28
	
	mkdir -p $(DESTDIR)/bin
	for p in programs/*/* ; do              \
	    if [ -x $$p ] && [ ! -d $$p ] ;     \
	    then                                \
	        f=$(PREFIX)`basename $$p` ;     \
	        cp $$p $(DESTDIR)/bin/$$f ;     \
	    fi                                  \
	done

clean:
Paul Bakker's avatar
Paul Bakker committed
29 30 31
	cd library  && $(MAKE) clean && cd ..
	cd programs && $(MAKE) clean && cd ..
	cd tests && $(MAKE) clean && cd ..
32

33
check:
Paul Bakker's avatar
Paul Bakker committed
34
	( cd tests && $(MAKE) check )
35 36 37 38 39 40 41 42 43 44

apidoc:
	mkdir -p apidoc
	doxygen doxygen/polarssl.doxyfile

apidoc_clean:
	if [ -d apidoc ] ;			\
	then				    	\
		rm -rf apidoc ;			\
	fi