Makefile 1.43 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
	
	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

35 36 37 38 39 40 41 42 43 44 45 46
uninstall:
	rm -rf $(DESTDIR)/include/polarssl
	rm -f $(DESTDIR)/lib/libpolarssl.*
	
	for p in programs/*/* ; do              \
	    if [ -x $$p ] && [ ! -d $$p ] ;     \
	    then                                \
	        f=$(PREFIX)`basename $$p` ;     \
	        rm -f $(DESTDIR)/bin/$$f ;      \
	    fi                                  \
	done

47
clean:
Paul Bakker's avatar
Paul Bakker committed
48 49
	cd library  && $(MAKE) clean && cd ..
	cd programs && $(MAKE) clean && cd ..
Paul Bakker's avatar
Paul Bakker committed
50
	cd tests    && $(MAKE) clean && cd ..
51

52 53
check: lib
	( cd tests && $(MAKE) && $(MAKE) check )
54

55 56 57
test-ref-configs:
	tests/scripts/test-ref-configs.pl

58 59 60 61 62 63 64 65 66
apidoc:
	mkdir -p apidoc
	doxygen doxygen/polarssl.doxyfile

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