Makefile 751 Bytes
Newer Older
1 2

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

.SILENT:

all:
	cd library  && make all && cd ..
	cd programs && make all && cd ..
Paul Bakker's avatar
Paul Bakker committed
10
	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 29 30
	
	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:
	cd library  && make clean && cd ..
	cd programs && make clean && cd ..
Paul Bakker's avatar
Paul Bakker committed
31
	cd tests && make clean && cd ..
32

33 34
check:
	( cd tests && make check )