-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile.dfb
101 lines (76 loc) · 4.13 KB
/
Makefile.dfb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
JPEG_URL="http://www.ijg.org/files/jpegsrc.v9.tar.gz"
PNG_URL=ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng12/libpng-1.2.50.tar.gz
FREETYPE_URL=http://download.savannah.gnu.org/releases/freetype/freetype-2.5.0.tar.gz
# FLUX_URL=~/Projects/ThinkSilicon/DFB/flux/
# DFB_URL=~/Projects/ThinkSilicon/DFB/dfb-mainline/
DIRECTFB_EXAMPLES_URL=http://directfb.org/downloads/Extras/DirectFB-examples-1.7.0.tar.gz
DFB_URL=git://git.directfb.org/git/directfb/core/DirectFB.git
FLUX_URL=git://git.directfb.org/git/directfb/core/flux
dfb-deps: jpeg-lazy png-lazy freetype-lazy flux-lazy #filesystem
# JPEG
jpeg-tar-url=$(JPEG_URL)
TAR_PROJECTS += jpeg
jpeg-build: jpeg gnu-tools
$(call remote-maybe, cd $(SOURCES_DIR)/jpeg-archive/*/; \
./configure --host=$(GNU_TOOLS_HOST) CC="$(GNU_TOOLS_PREFIX)gcc" --prefix="$(FILESYSTEM_ROOT)" && \
$(MAKE) && \
$(MAKE) install)
jpeg:
@echo "Getting libjpeg"
jpeg-clean: jpeg-archive-clean
# PNG
png-tar-url=$(PNG_URL)
TAR_PROJECTS += png
png-build: png zlib-lazy gnu-tools
$(call remote-maybe, cd $(SOURCES_DIR)/png-archive/*/; mkdir -p objs/; cd objs/ && \
../configure --host=$(GNU_TOOLS_HOST) CC="$(GNU_TOOLS_PREFIX)gcc -I$(FILESYSTEM_ROOT)/include/" --with-sysroot="$(FILESYSTEM_ROOT)" --prefix="$(FILESYSTEM_ROOT)" --with-gnu-ld CFLAGS="-L$(FILESYSTEM_ROOT)/lib/"; \
echo "[CONFIGURED] -I$(FILESYSTEM_ROOT)/include/"; \
$(MAKE) LDFLAGS=" -L/homes/cperivol/Projects/xilinx-zynq-bootstrap/fs/lib/" && \
$(MAKE) install)
png:
@echo "Getting libpng"
# FreeType
freetype-tar-url=$(FREETYPE_URL)
TAR_PROJECTS += freetype
freetype-build: freetype zlib-lazy png-lazy gnu-tools
$(call remote-maybe, cd $(SOURCES_DIR)/freetype-archive/*/; ./autogen.sh && \
./configure --host=$(GNU_TOOLS_HOST) CC="$(GNU_TOOLS_PREFIX)gcc -I$(FILESYSTEM_ROOT)/include/" --with-sysroot="$(FILESYSTEM_ROOT)" --prefix="$(FILESYSTEM_ROOT)" --with-gnu-ld --with-png && \
echo "[CONFIGURED] $(LDFLAGS)" && \
$(MAKE) CFLAGS=" -I$(FILESYSTEM_ROOT)/include/ -L$(FILESYSTEM_ROOT)/lib/" LDFLAGS="-lpng" PKG_CONFIG_PATH="$(FILESYSTEM_ROOT)/usr/lib/pkgconfig:$(FILESYSTEM_ROOT)/lib/pkgconfig" && \
$(MAKE) install)
freetype:
@echo "Getting libfreetype"
freetype-clean: freetype-archive-clean
# Flux
flux-git-repo=$(FLUX_URL)
GIT_PROJECTS += flux
export PATH:=$(PATH):$(TOOLS_DIR)/usr/bin
flux-build: flux $(TOOLS_DIR)
$(call remote_maybe cd $(SOURCES_DIR)/flux-git ; \
./autogen.sh --prefix=$(TOOLS_DIR) && \
./configure --prefix=$(TOOLS_DIR) && $(MAKE) && $(MAKE) install)
# DirectFB
directfb-git-repo=$(DFB_URL)
GIT_PROJECTS += directfb
PATH:=$(PATH):$(TOOLS_DIR)/bin
directfb-build: directfb dfb-deps gnu-tools
$(call remote-maybe, [ -f $(SOURCES_DIR)/directfb-git/builder.sh ] || ln -s $(DATA_DIR)/dfb-builder.sh $(SOURCES_DIR)/directfb-git/builder.sh)
$(call remote-maybe, cd $(SOURCES_DIR)/directfb-git/; \
./builder.sh --sysroot $(FILESYSTEM_ROOT) --enable-debug --bsroot $(ROOT_DIR) --disable-think2d --make-cmd "$(MAKE) V=3")
directfb:
@echo "Getting directfb"
# DirectFB examples 1.7
directfb-examples-tar-url=$(DIRECTFB_EXAMPLES_URL)
TAR_PROJECTS += directfb-examples
directfb-examples-build: directfb-examples directfb-lazy
$(call remote-maybe, cd $(SOURCES_DIR)/directfb-examples-archive/*/; mkdir -p objs/; cd objs/; \
../configure --datadir="/usr/local/share" --host=$(GNU_TOOLS_HOST) CC="$(GNU_TOOLS_PREFIX)gcc" CFLAGS=" -I$(FILESYSTEM_ROOT)/usr/include/ -I$(FILESYSTEM_ROOT)/include/" LDFLAGS="--sysroot=$(FILESYSTEM_ROOT) -L$(FILESYSTEM_ROOT)/lib -L$(FILESYSTEM_ROOT)/usr/lib -L$(FILESYSTEM_ROOT)/usr/local/lib/" PKG_CONFIG_PATH="$(FILESYSTEM_ROOT)/usr/lib/pkgconfig:$(FILESYSTEM_ROOT)/lib/pkgconfig" --enable-debug && \
$(MAKE) CFLAGS=" -I$(FILESYSTEM_ROOT)/include/ -L$(FILESYSTEM_ROOT)/usr/lib/ -L$(FILESYSTEM_ROOT)/lib/ -g" LDFLAGS=" --sysroot=$(FILESYSTEM_ROOT) -L$(FILESYSTEM_ROOT)/lib -L$(FILESYSTEM_ROOT)/usr/lib -L$(FILESYSTEM_ROOT)/usr/local/lib/" && \
$(MAKE) install DESTDIR=$(FILESYSTEM_ROOT))
directfb-examples-clean:
$(call remote-maybe, cd $(SOURCES_DIR)/directfb-examples-archive/*/; cd objs/; \
$(MAKE) distclean;)
directfb-examples:
@echo "Getting directfb-examples"
.PHONY: dfb-all
dfb-all: directfb-lazy directfb-examples-lazy