Demo: Naviframe morebutton demo has been changed
[platform/framework/web/web-ui-fw.git] / Makefile
old mode 100644 (file)
new mode 100755 (executable)
index 45f7d47..76ac9e5
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,18 @@
+SHELL := /bin/bash
+
 ## Project setting
 DEBUG ?= yes
 PROJECT_NAME = tizen-web-ui-fw
-VERSION = 0.1
+VERSION = 0.2
 VERSION_COMPAT =
+PKG_VERSION = $(shell cat packaging/web-ui-fw.spec | grep Version: | sed -e "s@Version:\s*@@" )
 THEME_NAME = default
 
 PATH := $(CURDIR)/build-tools/bin:$(PATH)
 
 JSLINT_LEVEL = 1
 JSLINT = jslint --sloppy --eqeq --bitwise --forin --nomen --predef jQuery --color --plusplus --browser --jqmspace
+COMMON_WIDGET = common
 INLINE_PROTO = 1
 OUTPUT_ROOT = $(CURDIR)/build
 FRAMEWORK_ROOT = ${OUTPUT_ROOT}/${PROJECT_NAME}/${VERSION}
@@ -45,12 +49,24 @@ FW_LIBS_JS = ${JS_OUTPUT_ROOT}/${PROJECT_NAME}-libs.js
 FW_THEME_CSS_FILE = ${PROJECT_NAME}-theme.css
 FW_WIDGET_CSS_FILE = ${WIDGET_CSS_OUTPUT_ROOT}/${PROJECT_NAME}-widget.css
 
+GEO_VERSION = jquery-geo-1.0b2
+
 LIBS_JS_FILES = jlayout/jquery.sizes.js \
                                jlayout/jlayout.border.js \
                                jlayout/jlayout.grid.js \
                                jlayout/jlayout.flexgrid.js \
                                jlayout/jlayout.flow.js \
                                jlayout/jquery.jlayout.js \
+                               jquery.easing.1.3.js \
+                               jquery.tmpl.js \
+                               jquery.mobile.js \
+                               ${GEO_VERSION}/js/jsrender.js \
+                               ${GEO_VERSION}/js/jquery.mousewheel.js \
+                               ${GEO_VERSION}/js/jquery.geo.core.js \
+                               ${GEO_VERSION}/js/jquery.geo.geographics.js \
+                               ${GEO_VERSION}/js/jquery.geo.geomap.js \
+                               ${GEO_VERSION}/js/jquery.geo.tiled.js \
+                               ${GEO_VERSION}/js/jquery.geo.shingled.js \
                 $(NULL)
 
 JQUERY_MOBILE_CSS = submodules/jquery-mobile/compiled/jquery.mobile.structure.css \
@@ -58,20 +74,11 @@ JQUERY_MOBILE_CSS = submodules/jquery-mobile/compiled/jquery.mobile.structure.cs
                     $(NULL)
 JQUERY_MOBILE_IMAGES = submodules/jquery-mobile/css/themes/default/images
 
-JQM_VERSION = jquery-mobile-1.0.1pre
+JQM_VERSION = jquery-mobile-1.2.0
 JQM_LIB_PATH = $(CURDIR)/libs/js/${JQM_VERSION}
 
-ifeq (${DEBUG},yes)
-LIBS_JS_FILES +=\
-       jquery.mobile.js \
-    $(NULL)
-JQUERY = jquery-1.6.4.js
-else
-LIBS_JS_FILES +=\
-       jquery.mobile.min.js \
-    $(NULL)
-JQUERY = jquery-1.6.4.min.js
-endif
+JQUERY = jquery-1.8.2.js
+JQUERY_MIN = $(subst .js,.min.js,$(JQUERY))
 
 LIBS_CSS_FILES =
 ifeq (${DEBUG},yes)
@@ -85,7 +92,7 @@ LIBS_CSS_FILES +=\
 endif
 
 
-all: libs_prepare third_party widgets libs_cleanup loader themes version_compat compress
+all: libs_prepare third_party widgets libs_cleanup loader themes version version_compat compress
 
 libs_prepare:
        # Prepare libs/ build...
@@ -103,7 +110,7 @@ libs_cleanup:
 
 jqm: init
        # Building jQuery Mobile...
-       cd ${JQM_LIB_PATH} && make all-but-min || exit 1; \
+       cd ${JQM_LIB_PATH} && make js NODE=/usr/bin/node || exit 1; \
        cp -f ${JQM_LIB_PATH}/compiled/*.js ${JQM_LIB_PATH}/../; \
 
 third_party: init jqm
@@ -111,10 +118,11 @@ third_party: init jqm
        @@cd ${LIBS_DIR}/js; \
            for f in ${LIBS_JS_FILES}; do \
                cat $$f >> ${FW_LIB_JS}; \
-               uglifyjs $$f >> ${FW_LIB_MIN}; \
+               uglifyjs --ascii $$f >> ${FW_LIB_MIN}; \
                echo "" >> ${FW_LIB_MIN}; \
            done; \
            cp ${LIBS_DIR}/js/${JQUERY} ${JS_OUTPUT_ROOT}/jquery.js
+           cp ${LIBS_DIR}/js/${JQUERY_MIN} ${JS_OUTPUT_ROOT}/jquery.min.js
        @@cd ${LIBS_DIR}/css; \
            for f in ${LIBS_CSS_FILES}; do \
                cat $$f >> ${FW_CSS}; \
@@ -130,12 +138,14 @@ widgets: init third_party
            while read REPLY; do \
                echo "  # Building widget $$REPLY"; \
                        if test ${JSLINT_LEVEL} -ge 1; then \
-                               for FNAME in ${WIDGETS_DIR}/$$REPLY/js/*.js; do \
-                                       ${JSLINT} $$FNAME; \
-                                       if test ${JSLINT_LEVEL} -ge 2 -a $$? -ne 0; then \
-                                               exit 1; \
-                                       fi; \
-                               done; \
+                               if test $$REPLY != ${COMMON_WIDGET}; then \
+                                       for FNAME in ${WIDGETS_DIR}/$$REPLY/js/*.js; do \
+                                               ${JSLINT} $$FNAME; \
+                                               if test ${JSLINT_LEVEL} -ge 2 -a $$? -ne 0; then \
+                                                       exit 1; \
+                                               fi; \
+                                       done; \
+                               fi; \
                        fi; \
                        if test "x${INLINE_PROTO}x" = "x1x"; then \
                                ./tools/inline-protos.sh ${WIDGETS_DIR}/$$REPLY >> ${WIDGETS_DIR}/$$REPLY/js/$$REPLY.js.compiled; \
@@ -184,13 +194,23 @@ globalize: widgets
 themes:
        make -C src/themes || exit $?
 
-
-compress: widgets loader
-       @@echo "        # Compressing....";
-       echo '/*' > ${FW_MIN}
-       cat ${COPYING_FILE} >> ${FW_MIN}
-       echo '*/' >> ${FW_MIN}
-       uglifyjs -nc ${FW_JS} >> ${FW_MIN}
+version: loader themes
+       echo '(function($$){$$.tizen.frameworkData.pkgVersion="$(PKG_VERSION)";}(jQuery));' >> ${FW_JS}
+       echo "$(PKG_VERSION)" > ${FRAMEWORK_ROOT}/../VERSION
+
+compress: widgets loader themes
+       # Javacript code compressing
+       @@echo "        # Compressing...."; \
+       echo '/*' > ${FW_MIN}; \
+       cat ${COPYING_FILE} >> ${FW_MIN}; \
+       echo '*/' >> ${FW_MIN}; \
+       uglifyjs --ascii -nc ${FW_JS} >> ${FW_MIN}; \
+       # CSS compressing
+       @@cd ${THEME_OUTPUT_ROOT}; \
+       for csspath in */*.css; do \
+               echo "Compressing $$csspath"; \
+               cleancss -o $${csspath/%.css/.min.css} $$csspath; \
+       done
 
 
 docs: init
@@ -216,6 +236,7 @@ version_compat: third_party widgets
        for v_compat in ${VERSION_COMPAT}; do \
                ln -sf ${VERSION} ${FRAMEWORK_ROOT}/../$$v_compat; \
        done;
+       ln -sf ${VERSION} ${FRAMEWORK_ROOT}/../latest
 
 demo: widgets 
        mkdir -p ${OUTPUT_ROOT}/demos
@@ -224,10 +245,10 @@ demo: widgets
 
 
 install: all
-       mkdir -p ${INSTALL_DIR}/lib/tizen-web-ui-fw ${INSTALL_DIR}/bin ${INSTALL_DIR}/share/tizen-web-ui-fw/demos/
-       cp -av ${OUTPUT_ROOT}/tizen-web-ui-fw/* src/template ${INSTALL_DIR}/lib/tizen-web-ui-fw/
-       cp -av tools/* ${INSTALL_DIR}/bin/
-       cp -av demos/tizen-gray ${INSTALL_DIR}/share/tizen-web-ui-fw/demos/ && cd ${INSTALL_DIR}/share/tizen-web-ui-fw/demos/tizen-gray && sed -i -e "s#../../build#../../../../lib#g" *.html
+       mkdir -p ${INSTALL_DIR}/bin ${INSTALL_DIR}/share/tizen-web-ui-fw/demos/ ${INSTALL_DIR}/share/tizen-web-ui-fw/bin/
+       cp -av ${OUTPUT_ROOT}/tizen-web-ui-fw/* src/template ${INSTALL_DIR}/share/tizen-web-ui-fw/
+       cp -av tools/* ${INSTALL_DIR}/share/tizen-web-ui-fw/bin/
+       cp -av demos/tizen-winsets ${INSTALL_DIR}/share/tizen-web-ui-fw/demos/ && cd ${INSTALL_DIR}/share/tizen-web-ui-fw/demos/tizen-winsets && sed -i -e "s#../../build#../../..#g" *.html
 
 
 coverage: clean all
@@ -285,5 +306,4 @@ init: clean
        @@mkdir -p ${CSS_OUTPUT_ROOT}
        @@mkdir -p ${CSS_IMAGES_OUTPUT_DIR}
        @@mkdir -p ${PROTOTYPE_HTML_OUTPUT_DIR}
-       @@test -h ${LATEST_ROOT} || ln -s ${FRAMEWORK_ROOT} ${LATEST_ROOT}
        @@rm -f docs/*.html