Makefile 1.02 KB
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
	cd library  && $(MAKE) all && cd ..
	cd programs && $(MAKE) all && cd ..
Paul Bakker's avatar
Paul Bakker committed
10
	cd tests    && $(MAKE) all && cd ..
11

Paul Bakker's avatar
Paul Bakker committed
12 13 14 15 16 17 18
no_test:
	cd library  && $(MAKE) all && cd ..
	cd programs && $(MAKE) all && cd ..

lib:
	cd library  && $(MAKE) all && cd ..

19
install:
Paul Bakker's avatar
Paul Bakker committed
20 21
	mkdir -p $(DESTDIR)/include/polarssl
	cp -r include/polarssl $(DESTDIR)/include
22 23
	
	mkdir -p $(DESTDIR)/lib
Paul Bakker's avatar
Paul Bakker committed
24
	cp library/libpolarssl.* $(DESTDIR)/lib
25 26 27 28 29 30 31 32 33 34 35
	
	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
36 37
	cd library  && $(MAKE) clean && cd ..
	cd programs && $(MAKE) clean && cd ..
Paul Bakker's avatar
Paul Bakker committed
38
	cd tests    && $(MAKE) clean && cd ..
39

40
check:
Paul Bakker's avatar
Paul Bakker committed
41
	( cd tests && $(MAKE) check )
42 43 44 45 46 47 48 49 50 51

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

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