All pastes #204803 Raw Edit

Someone

public text v1 · immutable
#204803 ·published 2006-10-16 08:20 UTC
rendered paste body
-(ashen@oasu3)-(~/work/bootsplash/splashy-0.1.8.1)-> cat src/Makefile.am
EXTRA_DIST = \
             splashy_functions.h \
             splashy_video.h \
             splashy_config-functions.h \
             xml_functions.h \
             xml_format.h \
             xml_format.h.in \
             xml_parser.h \
             xml_config.h \
             common_functions.h \
             common_macros.h

DFB_PREFIX = $(shell directfb-config --prefix)
DFB_VERSION = $(shell directfb-config --version)
DFB = $(shell directfb-config --libs \
                              --graphics=$(shell ls $(DFB_PREFIX)/lib/directfb-$(DFB_VERSION)/gfxdrivers/*.a \
                                               | sed 's,.*/libdirectfb_\(.*\)\.a,\1,g' \
                                               | tr "\n" ",") \
                              --imageprovider=gif,png,jpeg \
                              --input=keyboard \
                              --font=default,ft2 \
            | sed 's,\.o,.a,g;s,\.so.*,.a,g;s,\-l\([a-z0-9]*\),$(DFB_PREFIX)/lib/lib\1.a,g')

## HACK ALERT! - Otavio Salvador
# Express the symbols need for compilation so they will be forced inside of the binary
DFBHACK = $(DFB)  -Wl,-udirectfb_fbdev -Wl,-udirectfbwm_default -Wl,-uIDirectFBFont_Default -Wl,-uIDirectFBFont_FT2 \
                  -Wl,-uIDirectFBImageProvider_GIF -Wl,-uIDirectFBImageProvider_PNG -Wl,-uIDirectFBImageProvider_JPEG \
                  -Wl,-udirectfb_keyboard -Wl,-udirectfb_ati128 -Wl,-udirectfb_cyber5k -Wl,-udirectfb_i810 \
                  -Wl,-udirectfb_i830 -Wl,-udirectfb_mach64 -Wl,-udirectfb_neomagic -Wl,-udirectfb_nsc \
                  -Wl,-udirectfb_radeon -Wl,-udirectfb_savage -Wl,-udirectfb_sis315 -Wl,-udirectfb_tdfx

# set the include path found by configure
INCLUDES = $(all_includes) $(splashy_CFLAGS) -I$(DFB_PREFIX)/include/directfb -D_REENTRANT -L$(DFB_PREFIX)/lib/directfb-$(DFB_VERSION)/inputdrivers

# The order of the libraries to be statically link matters! so, do not change this unless
# you truely know what you are doing!
# NOTES:
# - when linking statically, the order of dependancies is calculated from last to
#   first (counter-intuitive as usual)
# - can't get rid of warnings about glib needed some libc6 functions shared as well
#   as the static ones... at least it uses /lib/libc.so.6 and not from /usr/lib!
# - there are 15 gfxdrivers we should loop through them
# - directfb-config (from libdirectfb debian package) is simply a piece of shit.
#   we rolled out our own

sbin_PROGRAMS = splashy splashy_config splashy_update splashy_pgrep

splashy_SOURCES = splashy_main.c splashy_functions.c xml_parser.c xml_config.c splashy_video.c common_functions.c

# -lutil is needed for openpty()... not used any longer
splashy_LDFLAGS = -static -all_load -lgcc_s -lpthread -lm -lc $(DFB) /usr/lib/libglib-2.0.a $(DFBHACK)
# if you need a fully statically compile binary, try using this line instead:
#splashy_LDFLAGS = -static -all_load -lgcc_s $(DFB) /usr/lib/libglib-2.0.a /usr/lib/libpng.a /usr/lib/libz.a  /usr/lib/libpthread.a /usr/lib/libm.a /usr/lib/libc.a /usr/lib/libsysfs.a $(DFBHACK)

splashy_config_SOURCES = splashy_config-main.c splashy_config-functions.c xml_functions.c xml_config.c common_functions.c xml_parser.c
splashy_config_LDFLAGS = -static -all_load $(all_libraries) /usr/lib/libglib-2.0.a /usr/lib/libmagic.a /usr/lib/libz.a

splashy_update_SOURCES = splashy_update.c xml_config.c common_functions.c xml_parser.c
splashy_update_LDFLAGS = $(splashy_update_LIBS) /usr/lib/libglib-2.0.a

# we need pgrep/pkill in /sbin
splashy_pgrep_SOURCES = splashy_pgrep.c
splashy_pgrep_LDFLAGS = $(splashy_pgrep_LIBS) /usr/lib/libproc.a

install-exec-hook:
        cd $(DESTDIR)$(sbindir) && \
        rm -f splashy_chvt && \
        $(LN_S) splashy splashy_chvt