X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=Makefile.am;h=8f97c06cb7b58de5155b6ad00b547fac4f709631;hb=refs%2Fheads%2Ftizen_3.0.2014.q3_common;hp=557b944ad16fc37693a1752e4914c5d32334c455;hpb=1e94fc361ed9bfecf22935a2e12a7c2bfc8e60f9;p=platform%2Fupstream%2Fkmscon.git diff --git a/Makefile.am b/Makefile.am index 557b944..8f97c06 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,18 +4,6 @@ # # -# Library Version Numbers -# - -LIBELOOP_CURRENT = 1 -LIBELOOP_REVISION = 0 -LIBELOOP_AGE = 0 - -LIBUTERM_CURRENT = 1 -LIBUTERM_REVISION = 0 -LIBUTERM_AGE = 0 - -# # Global Configurations and Initializations # @@ -34,11 +22,7 @@ EXTRA_DIST = \ COPYING \ NEWS \ docs/kmscon.service \ - docs/kmsconvt@.service \ - docs/pc/libeloop.pc.in \ - docs/pc/libuterm.pc.in \ - docs/sym/libeloop.sym \ - docs/sym/libuterm.sym + docs/kmsconvt@.service CLEANFILES = pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = @@ -147,6 +131,7 @@ CLEANFILES += src/*.bin.lo src/*.bin.o src/%.bin.lo: src/%.bin $(AM_V_GEN)$(LD) -r -o "src/$*.bin.o" -z noexecstack --format=binary "$<" + $(AM_V_at)$(OBJCOPY) --rename-section .data=.rodata,alloc,load,readonly,data,contents "src/$*.bin.o" $(AM_V_at)echo "# $@ - a libtool object file" >"$@" $(AM_V_at)echo "# Generated by $(shell $(LIBTOOL) --version | head -n 1)" >>"$@" $(AM_V_at)echo "#" >>"$@" @@ -161,6 +146,51 @@ src/%.bin.lo: src/%.bin $(AM_V_at)echo >>"$@" # +# Shader Converter +# We use a few built-in shader files. To reduce memory-consumption, this helper +# removes useless lines from the shaders before they are compiled into an object +# file. +# +# Following regexp are used to remove characters/lines: +# ^/*.*$ Start of multi-line comment +# ^ *.*$ Multi-line comment body +# ^[ \t]* Indentation whitespace +# [\r\n] Newlines +# + +CLEANFILES += src/*.vert.bin src/*.frag.bin +SHADER_SED = -e 's/^\/\*.*$$//' -e 's/^ \*.*$$//' -e 's/^[ \t]*//' +SHADER_TR = -d "\r\n" + +src/%.vert.bin: $(top_srcdir)/src/%.vert + $(AM_V_at)$(SED) $(SHADER_SED) "$<" | tr $(SHADER_TR) >"$@" + +src/%.frag.bin: $(top_srcdir)/src/%.frag + $(AM_V_at)$(SED) $(SHADER_SED) "$<" | tr $(SHADER_TR) >"$@" + +# +# XKB Fallback Converter +# We use a static built-in XKB fallback keymap. To avoid huge memory consumption +# we remove useless lines/characters first. +# We also append an ASCII 0 character so it can be used as regular C-string. +# +# Following regexp are used to remove characters/lines: +# *= * Whitespace around assignments +# *, * Whitespace around commatas +# *[][{}()] * Whitespace around braces +# ^[ \t]* Indentation whitespace +# [\r\n] Newlines +# + +CLEANFILES += src/*.xkb.bin +XKB_SED = -e 's/^[ \t]*//' -e 's/ *\([,=]\) */\1/g' -e 's/ *\([][{}()]\) */\1/g' +XKB_TR = -d "\r\n" + +src/%.xkb.bin: $(top_srcdir)/src/%.xkb + $(AM_V_at)$(SED) $(XKB_SED) "$<" | tr $(XKB_TR) >"$@" + $(AM_V_at)echo -ne "\x00" >>"$@" + +# # SHL - Static Helper Library # The SHL subsystem contains several small code pieces used all over kmscon and # other applications. @@ -196,17 +226,19 @@ libshl_la_LIBADD = \ $(AM_LIBADD) \ $(XKBCOMMON_LIBS) +if BUILD_HAVE_GLES2 +libshl_la_SOURCES += src/shl_gl.h src/shl_gl_shader.c src/shl_gl_math.c +libshl_la_CPPFLAGS += $(GLES2_CFLAGS) +libshl_la_LIBADD += $(GLES2_LIBS) +endif + # # libeloop # This library contains the whole event-loop implementation of kmscon. It is # compiled into a separate object to allow using it in several other programs. # -if BUILD_ENABLE_ELOOP -lib_LTLIBRARIES += libeloop.la -include_HEADERS += src/eloop.h -pkgconfig_DATA += docs/pc/libeloop.pc -endif +noinst_LTLIBRARIES += libeloop.la libeloop_la_SOURCES = \ src/eloop.h \ @@ -214,21 +246,7 @@ libeloop_la_SOURCES = \ libeloop_la_LIBADD = libshl.la libeloop_la_CPPFLAGS = $(AM_CPPFLAGS) -EXTRA_libeloop_la_DEPENDENCIES = ${top_srcdir}/docs/sym/libeloop.sym -libeloop_la_LDFLAGS = \ - $(AM_LDFLAGS) \ - -version-info $(LIBELOOP_CURRENT):$(LIBELOOP_REVISION):$(LIBELOOP_AGE) \ - -Wl,--version-script=$(top_srcdir)/docs/sym/libeloop.sym - - -if BUILD_ENABLE_ELOOP_DBUS -libeloop_la_SOURCES += \ - external/dbus-common.h \ - external/dbus-loop.h \ - external/dbus-loop.c -libeloop_la_CPPFLAGS += $(DBUS_CFLAGS) -libeloop_la_LIBADD += $(DBUS_LIBS) -endif +libeloop_la_LDFLAGS = $(AM_LDFLAGS) # # libuterm @@ -238,15 +256,7 @@ endif # abstractions and an input layer # -if BUILD_ENABLE_UTERM -lib_LTLIBRARIES += libuterm.la -include_HEADERS += \ - src/uterm_input.h \ - src/uterm_monitor.h \ - src/uterm_video.h \ - src/uterm_vt.h -pkgconfig_DATA += docs/pc/libuterm.pc -endif +noinst_LTLIBRARIES += libuterm.la libuterm_la_SOURCES = \ src/uterm_input.h \ @@ -266,16 +276,16 @@ nodist_libuterm_la_SOURCES = libuterm_la_CPPFLAGS = \ $(AM_CPPFLAGS) \ + $(UDEV_CFLAGS) \ $(XKBCOMMON_CFLAGS) libuterm_la_LIBADD = \ + $(UDEV_LIBS) \ $(XKBCOMMON_LIBS) \ libeloop.la \ - libshl.la -EXTRA_libuterm_la_DEPENDENCIES = ${top_srcdir}/docs/sym/libuterm.sym + libshl.la \ + src/uterm_input_fallback.xkb.bin.lo libuterm_la_LDFLAGS = \ - $(AM_LDFLAGS) \ - -version-info $(LIBUTERM_CURRENT):$(LIBUTERM_REVISION):$(LIBUTERM_AGE) \ - -Wl,--version-script="$(top_srcdir)/docs/sym/libuterm.sym" + $(AM_LDFLAGS) if BUILD_ENABLE_MULTI_SEAT libuterm_la_SOURCES += src/uterm_systemd.c @@ -283,11 +293,6 @@ libuterm_la_CPPFLAGS += $(SYSTEMD_CFLAGS) libuterm_la_LIBADD += $(SYSTEMD_LIBS) endif -if BUILD_ENABLE_HOTPLUG -libuterm_la_CPPFLAGS += $(UDEV_CFLAGS) -libuterm_la_LIBADD += $(UDEV_LIBS) -endif - if BUILD_ENABLE_VIDEO_FBDEV libuterm_la_SOURCES += \ src/uterm_fbdev_internal.h \ @@ -305,15 +310,10 @@ libuterm_la_LIBADD += $(DRM_LIBS) endif if BUILD_ENABLE_VIDEO_DRM3D -noinst_PROGRAMS += genshader libuterm_la_SOURCES += \ src/uterm_drm3d_internal.h \ src/uterm_drm3d_video.c \ - src/uterm_drm3d_render.c \ - src/static_gl.h \ - src/static_gl_math.c \ - src/static_gl_shader.c -nodist_libuterm_la_SOURCES += src/static_shaders.c + src/uterm_drm3d_render.c libuterm_la_CPPFLAGS += \ $(DRM_CFLAGS) \ $(EGL_CFLAGS) \ @@ -323,7 +323,13 @@ libuterm_la_LIBADD += \ $(DRM_LIBS) \ $(EGL_LIBS) \ $(GBM_LIBS) \ - $(GLES2_LIBS) + $(GLES2_LIBS) \ + src/uterm_drm3d_blend.vert.bin.lo \ + src/uterm_drm3d_blend.frag.bin.lo \ + src/uterm_drm3d_blit.vert.bin.lo \ + src/uterm_drm3d_blit.frag.bin.lo \ + src/uterm_drm3d_fill.vert.bin.lo \ + src/uterm_drm3d_fill.frag.bin.lo endif # add shared sources only once @@ -339,39 +345,6 @@ endif endif # -# Shaders -# As there is no need to modify shaders at run-time, we statically compile them -# into object files. As autotools would ignore them, we need to add them to -# EXTRA_DIST. -# The program that converts the shaders into C-source files is "genshader". It's -# pretty simple and just creates a string with the shader source as content. -# - -SHADERS = \ - $(srcdir)/src/static_fill.vert \ - $(srcdir)/src/static_fill.frag \ - $(srcdir)/src/static_blend.vert \ - $(srcdir)/src/static_blend.frag \ - $(srcdir)/src/static_blit.vert \ - $(srcdir)/src/static_blit.frag \ - $(srcdir)/src/static_gltex.vert \ - $(srcdir)/src/static_gltex.frag - -EXTRA_DIST += $(SHADERS) -CLEANFILES += src/static_shaders.c -genshader_SOURCES = src/genshader.c - -# TODO: Using $(BUILD_EXEEXT) breaks if it doesn't equal $(EXEEXT). But stupid -# automake doesn't allow $(EXEEXT) so lets just rely on both being the same. - -src/static_shaders.c: $(SHADERS) genshader$(BUILD_EXEEXT) - $(AM_V_GEN)./genshader$(BUILD_EXEEXT) src/static_shaders.c $(SHADERS) - -genshader$(BUILD_EXEEXT) $(genshader_OBJECTS): CC = $(CC_FOR_BUILD) -genshader$(BUILD_EXEEXT) $(genshader_OBJECTS): CFLAGS = $(CFLAGS_FOR_BUILD) -genshader$(BUILD_EXEEXT): LDFLAGS = $(LDFLAGS_FOR_BUILD) - -# # Unifont Generator # This generates the unifont sources from raw hex-encoded font data. # @@ -442,7 +415,12 @@ mod_bbulk_la_SOURCES = \ src/kmscon_module_interface.h \ src/text_bbulk.c \ src/kmscon_mod_bbulk.c -mod_bbulk_la_LIBADD = libshl.la +mod_bbulk_la_CPPFLAGS = \ + $(AM_CPPFLAGS) \ + $(TSM_CFLAGS) +mod_bbulk_la_LIBADD = \ + $(TSM_LIBS) \ + libshl.la mod_bbulk_la_LDFLAGS = \ $(AM_LDFLAGS) \ -module \ @@ -450,24 +428,22 @@ mod_bbulk_la_LDFLAGS = \ if BUILD_ENABLE_RENDERER_GLTEX module_LTLIBRARIES += mod-gltex.la -noinst_PROGRAMS += genshader endif mod_gltex_la_SOURCES = \ src/kmscon_module_interface.h \ src/text_gltex.c \ - src/static_gl.h \ - src/static_gl_math.c \ - src/static_gl_shader.c \ src/kmscon_mod_gltex.c -nodist_mod_gltex_la_SOURCES = \ - src/static_shaders.c mod_gltex_la_CPPFLAGS = \ $(AM_CPPFLAGS) \ + $(TSM_CFLAGS) \ $(GLES2_CFLAGS) mod_gltex_la_LIBADD = \ $(GLES2_LIBS) \ - libshl.la + $(TSM_LIBS) \ + libshl.la \ + src/text_gltex_atlas.vert.bin.lo \ + src/text_gltex_atlas.frag.bin.lo mod_gltex_la_LDFLAGS = \ $(AM_LDFLAGS) \ -module \ @@ -499,7 +475,6 @@ mod_pixman_la_LDFLAGS = \ # built as part of kmscon. # -if BUILD_ENABLE_KMSCON bin_PROGRAMS += kmscon check_PROGRAMS += \ test_output \ @@ -507,7 +482,6 @@ check_PROGRAMS += \ test_input \ test_key MANPAGES += docs/man/kmscon.1 -endif kmscon_SOURCES = \ src/conf.h \ @@ -654,3 +628,10 @@ endif # BUILD_HAVE_XSLTPROC # .PHONY: $(TPHONY) + +# +# Empty .SECONDARY target causes alle intermediate files to be treated as +# secondary files. That is, they don't get deleted after make finished. +# + +.SECONDARY: