Fix makefile
authorTae-Hwan Kim <the81.kim@samsung.com>
Tue, 24 Jul 2012 11:04:13 +0000 (20:04 +0900)
committerTae-Hwan Kim <the81.kim@samsung.com>
Tue, 24 Jul 2012 11:04:13 +0000 (20:04 +0900)
Change-Id: I788cda86555073b275b44e683f3b00846a6805a2

Makefile
themes/Makefile

index 654baca..8d3d9dc 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,36 +1,15 @@
 PREFIX ?= /usr
-INSTALL_DIR=$(DESTDIR)/opt/var/efl-theme-tizen-edc
 
-INSTALL=install -c
-
-$(warning $(CC) )
-
-all: themes
-       echo $(escaped_prefix)
-
-themes: copy_edc       
+all:
        cd themes && make
-       rm themes/tizen-*.edc
-
-install_themes:
-       cd themes && make install
 
-install_edc:
-       mkdir -p $(INSTALL_DIR)
-       cp themes/tizen.edc themes/widgets $(INSTALL_DIR) -r
-
-install: install_themes install_edc
-
-copy_edc:
-       cp themes/tizen.edc themes/tizen-hd.edc
+install: all
+       cd themes && make $@
 
-tizen-hd:
-       cp themes/tizen.edc themes/$@.edc
+uninstall:
        cd themes && make $@
-       rm themes/tizen-*.edc
 
 clean:
-       rm -rf themes/*.edj
-       rm -rf themes/tizen-*.edc
+       cd themes && make $@
 
 distclean: clean
index f8ea1e7..38e9202 100644 (file)
@@ -1,26 +1,33 @@
-PREFIX ?= /usr
+TARGET=tizen-hd.edj
+
+PREFIX?=/usr
 INSTALL=install -c
-themedir=$(DESTDIR)$(PREFIX)/share/elementary/themes
+EDC_DIR=$(DESTDIR)/opt/var/efl-theme-tizen-edc
+THEME_DIR=$(DESTDIR)$(PREFIX)/share/elementary/themes
 EDJE_FLAGS_VERBOSE_ =
 EDJE_FLAGS_VERBOSE_0 =
 EDJE_FLAGS_VERBOSE_1 = -v
+TMP_INC=tmp-inc.edc
+SRC=tizen.edc
 
-all: tizen-hd
-       echo $(escaped_prefix)
-
-.SUFFIXES: .edc .edj
-.edc.edj:
-       cp ./inc/$(@:.edj=-inc.edc) ./inc/tmp-inc.edc
-       edje_cc $(EDJE_FLAGS_$(V)) -id ./images/$(@:.edj=) -sd ./sounds -fd ../objects $(@:.edj=.edc)
-       rm ./inc/tmp-inc.edc
+all: $(TARGET)
 
-tizen-hd: tizen-hd.edj
+$(TARGET):
+       cp -f ./inc/$(@:.edj=-inc.edc) ./inc/$(TMP_INC)
+       edje_cc $(EDJE_FLAGS_$(V)) -id ./images/$(@:.edj=) -sd ./sounds -fd ../objects $(SRC) $@
 
 clean:
        rm -f *.edj
+       rm -f ./inc/$(TMP_INC)
+
+distclean: clean
 
 install:
-       mkdir -p $(themedir)
-       $(INSTALL) tizen*.edj $(themedir)
+       mkdir -p $(THEME_DIR)
+       $(INSTALL) $(TARGET) $(THEME_DIR)
+       mkdir -p $(EDC_DIR)
+       cp -r $(SRC) widgets $(EDC_DIR)
 
-distclean: clean
+uninstall:
+       rm -f $(THEME_DIR)/$(TARGET)
+       rm -f $(EDC_DIR)/$(SRC) && rm -rf $(EDC_DIR)/widgets