Pick three bugfixes from next branch to trunk for inclusion in 4.5.0 RC2, as discusse...
[sdcc.git] / sdcc-cf / packages / build.boost / Makefile
blob71fea2b35751e1b5c6ef9c23c726e485b151f149
1 include ../packages.mk
3 PACKAGE=boost
4 ifeq ($(OS),SunOS)
5 VERSION=1_49_0
6 PACKAGE_FILE=$(PACKAGE)_$(VERSION).zip
7 # WITH_TOOLSET=--with-toolset=sun
8 WITH_TOOLSET=--with-toolset=
9 else
10 VERSION=1_59_0
11 PACKAGE_FILE=$(PACKAGE)_$(VERSION).tar.bz2
12 ifeq ($(OS), Darwin)
13 WITH_TOOLSET=--with-toolset=darwin
14 else
15 WITH_TOOLSET=
16 endif
17 endif
19 BJAM_FLAGS=link=static
21 ifeq ($(HOSTNAME),mypants)
22 BJAM_FLAGS+= pch=off
23 else
24 # # universal build on Mac OS X doesn't work
25 # ifeq ($(OS), Darwin)
26 # # Build universal binaries
27 # BJAM_FLAGS=macosx-version=10.5 macosx-version-min=10.4 architecture=combined threading=multi link=static address-model=32
28 # endif
29 endif
31 SUBDIR:=$(shell echo $(VERSION) | sed -e 's/_/./g')
32 PACKAGE_DIR=$(PACKAGE)_$(VERSION)
34 .PHONY: all
35 all: $(PACKAGE)-install.tag clean
37 download/$(PACKAGE_FILE):
38 wget -P download http://sourceforge.net/projects/boost/files/boost/$(SUBDIR)/$(PACKAGE_FILE)
40 $(PACKAGE)-download.tag: download/$(PACKAGE_FILE)
41 touch $@
43 $(PACKAGE)-unpack.tag: $(PACKAGE)-download.tag
44 ifeq ($(OS),SunOS)
45 unzip download/$(PACKAGE_FILE)
46 find $(PACKAGE_DIR) -type f -exec dos2unix {} {} \;
47 find $(PACKAGE_DIR) -name '*.sh' -exec chmod +x {} \;
48 else
49 tar xjvf download/$(PACKAGE_FILE)
50 endif
51 touch $@
53 $(PACKAGE)-configure.tag: $(PACKAGE)-unpack.tag
54 ifndef INCLUDES_ONLY
55 cd $(PACKAGE_DIR) && \
56 ./bootstrap.sh $(WITH_TOOLSET) --prefix=$(LOCAL_DIR) --with-libraries=graph
57 endif
58 touch $@
60 $(PACKAGE)-make.tag: $(PACKAGE)-configure.tag
61 ifndef INCLUDES_ONLY
62 cd $(PACKAGE_DIR) && \
63 ./bjam $(BJAM_FLAGS)
64 endif
65 touch $@
67 $(PACKAGE)-install.tag: $(PACKAGE)-make.tag
68 ifdef INCLUDES_ONLY
69 test -d $(LOCAL_DIR)/include || mkdir $(LOCAL_DIR)/include
70 -test -d $(LOCAL_DIR)/include/boost && rm -rf $(LOCAL_DIR)/include/boost
71 mv $(PACKAGE_DIR)/boost $(LOCAL_DIR)/include/
72 else
73 cd $(PACKAGE_DIR) && \
74 ./bjam $(BJAM_FLAGS) install
75 endif
76 touch $@
78 clean:
79 rm -rf $(PACKAGE_DIR) *.tag