summaryrefslogtreecommitdiffstats
path: root/patches/usplash_0.5.49/cross-compile.diff
blob: e94f1e968efd45f5c5ae4ef4bab2b835177e1c85 (plain)
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
From: Robert Schwebel <r.schwebel@pengutronix.de>
Subject: [patch] add config option for convert tools

Add a configure option to enable the ???-to-usplash tools. When we cross
build for embedded systems, we might want to disable these tools (they
would have to be built for the "build" machine otherwhise).

Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>

---
 Makefile.am      |   12 ++++++++++--
 bogl/Makefile.am |   29 ++++++++++++++++++++---------
 configure.ac     |   14 ++++++++++++++
 3 files changed, 44 insertions(+), 11 deletions(-)

Index: b/Makefile.am
===================================================================
--- a/Makefile.am
+++ b/Makefile.am
@@ -41,10 +41,18 @@ usplash_LDADD = \
 usplash_write_SOURCES = \
 	usplash_write.c
 
+if CONVERT_TOOLS
 %.c: %.bdf
-	./bogl/bdftobogl $< > $@
+	./bogl/bdftousplash $< > $@
 
 %.c: %.png
-	./bogl/pngtobogl $< > $@
+	./bogl/pngtousplash $< > $@
+else
+%.c: %.bdf
+	bdftousplash $< > $@
+
+%.c: %.png
+	pngtousplash $< > $@
+endif
 
 SUFFIXES: .png .bdf
Index: b/configure.ac
===================================================================
--- a/configure.ac
+++ b/configure.ac
@@ -70,10 +70,23 @@ AM_CONDITIONAL(SVGA_BACKEND, test "$CONF
 # FIXME:
 AM_CONDITIONAL(NO_ASM, test false)
 
+AC_MSG_CHECKING([whether to enable convert tools])
+AC_ARG_ENABLE(convert-tools,
+	AS_HELP_STRING([--disable-convert-tools], [disable convert tools]),
+	[
+		case "$enableval" in
+			y | yes) CONFIG_TOOLS=yes ;;
+			*) CONFIG_TOOLS=no ;;
+		esac],
+	[CONFIG_TOOLS=yes])
+AC_MSG_RESULT([${CONFIG_TOOLS}])
+AM_CONDITIONAL(CONVERT_TOOLS, test "$CONFIG_TOOLS" = "yes")
+
 #
 # Checks for libraries.
 #
 
+if test "$CONFIG_TOOLS" = "yes"; then
 ##
 # libgd
 ##
@@ -96,6 +109,7 @@ PKG_CHECK_MODULES([libpng],
 )
 AC_SUBST(libpng_CFLAGS)
 AC_SUBST(libpng_LIBS)
+fi
 
 #
 # Checks for header files.
Index: b/bogl/Makefile.am
===================================================================
--- a/bogl/Makefile.am
+++ b/bogl/Makefile.am
@@ -3,7 +3,10 @@ AM_CFLAGS = \
 	-fPIC -I../
 
 lib_LTLIBRARIES = libbogl.la
-bin_PROGRAMS = bdftobogl pngtobogl bterm reduce-font
+bin_PROGRAMS = bterm reduce-font
+if CONVERT_TOOLS
+bin_PROGRAMS += bdftousplash pngtousplash
+endif
 EXTRA_PROGRAMS = bogl-test bowl-boxes
 
 LIBBOGLSOURCES = \
@@ -32,17 +35,17 @@ LIBRSRCSOURCES = \
 	timBI18.c \
 	tux75.c
 
-bdftobogl_SOURCES = \
+bdftousplash_SOURCES = \
 	bdftobogl.c \
 	$(LIBBOGLSOURCES)
 
-pngtobogl_SOURCES = \
+pngtousplash_SOURCES = \
 	pngtobogl.c
 
-pngtobogl_CFLAGS = \
+pngtousplash_CFLAGS = \
 	$(libpng_CFLAGS)
 
-pngtobogl_LDADD = \
+pngtousplash_LDADD = \
 	-lgd -lm \
 	$(libpng_LIBS)
 
@@ -69,11 +72,19 @@ bterm_LDADD = \
 bterm_DEPENDENCIES = \
 	libbogl.la
 
-%.c: %.bdf bdftobogl
-	./bdftobogl $< > $@
+if CONVERT_TOOLS
+%.c: %.bdf bdftousplash
+	./bdftousplash $< > $@
+
+%.c: %.png pngtousplash
+	./pngtousplash $< > $@
+else
+%.c: %.bdf
+	bdftousplash $< > $@
 
-%.c: %.png pngtobogl
-	./pngtobogl $< > $@
+%.c: %.png
+	pngtousplash $< > $@
+endif
 
 bogl_test_SOURCES = \
 	bogl-test.c \