1 ################################################################################
2 # automake file for generating the user splashutils' Makefile file.
4 # Copyright (c) 2004-2007, Michal Januszewski <spock@gentoo.org>
5 # Copyright (c) 2007, Paul Bender <pebender@gmail.com>
7 # This file is free software; you can redistribute it and/or modify it
8 # under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
12 # This program is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # General Public License for more details.
16 ################################################################################
22 ################################################################################
24 ################################################################################
29 nodist_include_HEADERS =
49 ################################################################################
51 ################################################################################
53 INCLUDES = -I$(top_srcdir) -I$(top_builddir)
58 BUILT_SOURCES += fbsplash.h
60 dist-hook: dist-hook-header
62 ################################################################################
64 ################################################################################
66 nodist_include_HEADERS += fbsplash.h
68 EXTRA_DIST += fbsplash.h.in
70 MOSTLYCLEANFILES += fbsplash.h
73 @# Removing this file from the distribution is easier than putting it
74 @# in a nodist_*_SOURCES rather than the normal _SOURCES list for all
75 @# the programs and libraries that depend on it.
76 @rm -f $(top_distdir)/fbsplash.h
78 fbsplash.h: fbsplash.h.in $(top_builddir)/config.h
79 @$(call infmsg,CREATE,$@)
83 -e 's|@bindir[@]|$(eexecbindir)|g' \
84 -e 's|@sbindir[@]|$(eexecsbindir)|g' \
85 -e 's|@sysconfdir[@]|$(sysconfdir)|g' \
86 -e 's|@themedir[@]|$(themedir)|g' \
87 -e 's|@libdir[@]|$(eexeclibdir)|g' \
90 $(top_builddir)/config.h:
91 @echo "The file 'config.h' is missing. Please run 'configure'."
94 ################################################################################
96 ################################################################################
98 lib_LTLIBRARIES += libfbsplash.la
99 lib_LTLIBRARIES += libfbsplashrender.la
101 libfbsplash_la_SOURCES = libfbsplash.c common.h fbsplash.h
102 libfbsplash_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(libfbsplash_version)
103 libfbsplash_la_LIBADD =
105 libfbsplashrender_la_SOURCES = \
106 libfbsplashrender.c \
115 ../include/console_decor.h \
116 ../include/fbcondecor.h \
120 libfbsplashrender_la_CFLAGS = $(AM_CFLAGS)
121 libfbsplashrender_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(libfbsplashrender_version)
122 libfbsplashrender_la_LIBADD = -lfbsplash
124 libfbsplashrender_la_CFLAGS += $(JPEG_CFLAGS)
125 libfbsplashrender_la_LIBADD += $(JPEG_LIBS)
128 libfbsplashrender_la_SOURCES += mng_callbacks.c mng_render.c mng_splash.h common.h render.h fbsplash.h
129 libfbsplashrender_la_CFLAGS += $(MNG_CFLAGS)
130 libfbsplashrender_la_LIBADD += $(MNG_LIBS)
133 libfbsplashrender_la_CFLAGS += $(PNG_CFLAGS)
134 libfbsplashrender_la_LIBADD += $(PNG_LIBS)
137 libfbsplashrender_la_SOURCES += ttf.c ttf.h fbsplash.h
138 libfbsplashrender_la_CFLAGS += $(FREETYPE2_CFLAGS) $(M_CFLAGS)
139 libfbsplashrender_la_LIBADD += $(FREETYPE2_LIBS) $(M_LIBS)
142 AM_MAKEFLAGS += "libfbsplashrender_la_CFLAGS=$(libfbsplashrender_la_CFLAGS)"
144 pkgconfigdir = $(libdir)/pkgconfig
145 pkgconfig_DATA = libfbsplash.pc libfbsplashrender.pc
146 EXTRA_DIST += libfbsplash.pc.in libfbsplashrender.pc.in
147 MOSTLYCLEANFILES += libfbsplash.pc libfbsplashrender.pc
150 @$(call infmsg,CREATE,$@)
153 $(Q)cat $< | $(SED) \
154 -e 's|@prefix[@]|$(prefix)|g' \
155 -e 's|@exec_prefix[@]|$(exec_prefix)|g' \
156 -e 's|@libdir[@]|$(libdir)|g' \
157 -e 's|@includedir[@]|$(includedir)|g' \
158 -e 's|@libs_private[@]|$(strip $($(basename $(@F))_la_LIBADD))|g' \
161 ################################################################################
163 ################################################################################
165 if CONFIG_FBCON_DECOR
166 sbin_PROGRAMS += fbcondecor_ctl
168 sbin_PROGRAMS += fbsplashd
169 bin_PROGRAMS += splash_util
170 eexecsbin_PROGRAMS += fbsplashctl
172 fbcondecor_ctl_SOURCES = fbcon_decor_ctl.c fbcon_decor.h ../include/console_decor.h ../include/fbcondecor.h common.h fbsplash.h
173 fbcondecor_ctl_CPPFLAGS = $(AM_CPPFLAGS) -DTARGET_UTIL $(libfbsplashrender_la_CFLAGS)
174 fbcondecor_ctl_LDFLAGS = $(AM_LDFLAGS)
175 fbcondecor_ctl_LDADD = libfbsplashrender.la libfbsplash.la
177 fbsplashd_SOURCES = daemon_cmd.c daemon.c daemon.h common.h render.h fbsplash.h
178 fbsplashd_CPPFLAGS = $(AM_CPPFLAGS) -DTARGET_UTIL
179 fbsplashd_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) $(RT_CFLAGS) $(libfbsplashrender_la_CFLAGS)
180 fbsplashd_LDFLAGS = $(AM_LDFLAGS)
181 fbsplashd_LDADD = libfbsplashrender.la libfbsplash.la $(PTHREAD_LIBS) $(RT_LIBS) $(GPM_LIBS)
183 splash_util_SOURCES = util.c common.h fbsplash.h
184 splash_util_CPPFLAGS = $(AM_CPPFLAGS) -DTARGET_UTIL $(libfbsplashrender_la_CFLAGS)
185 splash_util_LDFLAGS = $(AM_LDFLAGS)
186 splash_util_LDADD = libfbsplashrender.la libfbsplash.la
188 fbsplashctl_SOURCES = $(fbsplashd_SOURCES) $(splash_util_SOURCES) fbsplashctl.c
189 fbsplashctl_CFLAGS = $(AM_CFLAGS) $(PTHREAD_STATIC_CFLAGS) $(RT_CFLAGS) $(libfbsplashrender_la_CFLAGS) -DUNIFIED_BUILD
190 fbsplashctl_CPPFLAGS = $(fbsplashd_CPPFLAGS) $(splash_util_CPPFLAGS)
191 fbsplashctl_LDFLAGS = $(AM_LDFLAGS) -all-static
192 fbsplashctl_LDADD = libfbsplashrender.la libfbsplash.la $(PTHREAD_STATIC_LIBS) $(RT_LIBS) $(GPM_LIBS)
194 if CONFIG_FBCON_DECOR
195 fbsplashctl_SOURCES += $(fbcondecor_ctl_SOURCES)
196 fbsplashctl_CPPFLAGS += $(fbcondecor_ctl_CPPFLAGS)
200 $(LN_S) $(DESTDIR)$(eexecsbindir)/fbsplashctl$(EXEEXT) $(DESTDIR)$(eexecsbindir)/fbsplashd.static$(EXEEXT)
201 $(LN_S) $(DESTDIR)$(eexecsbindir)/fbsplashctl$(EXEEXT) $(DESTDIR)$(eexecbindir)/splash_util.static$(EXEEXT)
202 if CONFIG_FBCON_DECOR
203 $(LN_S) $(DESTDIR)$(eexecsbindir)/fbsplashctl$(EXEEXT) $(DESTDIR)$(eexecsbindir)/fbcondecor_ctl.static$(EXEEXT)
206 ################################################################################
208 ################################################################################
211 eexecsbin_PROGRAMS += fbcondecor_helper
214 fbcondecor_helper_SOURCES = \
217 libfbsplashrender.c \
226 ../include/console_decor.h \
227 ../include/fbcondecor.h \
231 fbcondecor_helper_CPPFLAGS = -DWITH_ERRLIST -DTARGET_KERNEL -DTT_CONFIG_OPTION_BYTECODE_INTERPRETER
232 fbcondecor_helper_CFLAGS = -Os -w -ffunction-sections -fdata-sections -I.@am__isrc@
233 fbcondecor_helper_LDFLAGS =
234 fbcondecor_helper_LDADD =
235 fbcondecor_helper_CFLAGS += -I$(abs_top_builddir)/libs/libjpeg -I$(LIBJPEG_SOURCE)
236 fbcondecor_helper_LDADD += $(top_builddir)/libs/libjpeg.a
238 fbcondecor_helper_CFLAGS += -I$(LIBPNG_SOURCE)
239 fbcondecor_helper_LDADD += $(top_builddir)/libs/libpng.a $(top_builddir)/libs/libz.a
242 fbcondecor_helper_SOURCES += ttf.c ttf.h fbsplash.h
243 fbcondecor_helper_CFLAGS += -I$(LIBFREETYPE2_SOURCE)/include -I$(LIBZ_SOURCE)
244 fbcondecor_helper_LDADD += $(top_builddir)/libs/libfreetype.a
246 if CONFIG_KLIBC_SHARED
247 fbcondecor_helper_LDFLAGS += -shared
249 fbcondecor_helper_LDFLAGS += -static
252 # Override automake's generation of target rules for building fbcondecor_helper.
253 fbcondecor_helper: $(fbcondecor_helper_LDADD) $(fbcondecor_helper_OBJECTS)
254 @$(call infmsg,LD,$@)
256 $(Q)$(KLCC) $(fbcondecor_helper_CFLAGS) $(fbcondecor_helper_LDFLAGS) $+ $(fbcondecor_helper_LDADD) -o $@
259 # Override automake's generation of target rules for building fbcondecor_helper object files.
260 fbcondecor_helper-kernel.o:
261 fbcondecor_helper-libfbsplash.o:
262 fbcondecor_helper-libfbsplashrender.o:
263 fbcondecor_helper-fbcon_decor.o:
264 fbcondecor_helper-common.o:
265 fbcondecor_helper-parse.o:
266 fbcondecor_helper-list.o:
267 fbcondecor_helper-render.o:
268 fbcondecor_helper-image.o:
269 fbcondecor_helper-effects.o:
270 fbcondecor_helper-ttf.o:
271 fbcondecor_helper-%.o: %.c
272 @$(call infmsg,CC,$@)
274 $(Q)$(KLCC) $(fbcondecor_helper_CPPFLAGS) $(fbcondecor_helper_CFLAGS) $(INCLUDES) -c $< -o $@