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

Makefile
themes/Makefile

index 2ae06d1..8d3d9dc 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,33 +1,15 @@
 PREFIX ?= /usr
-EFL_THEME_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 -rf themes/white*.edc
-       rm -rf themes/widgets
-
-install_themes:
-       cd themes && make install
 
-install: install_themes
-
-copy_edc:
-       cp $(EFL_THEME_DIR)/tizen.edc themes/white-hd.edc
-       cp $(EFL_THEME_DIR)/widgets themes/ -r
+install: all
+       cd themes && make $@
 
-white-hd:
+uninstall:
        cd themes && make $@
 
 clean:
-       rm -rf themes/*.edj
-       rm -rf themes/white*.edc
-       rm -rf themes/widgets
+       cd themes && make $@
 
 distclean: clean
index 14ba9d5..1f07a2e 100644 (file)
@@ -1,26 +1,36 @@
-PREFIX ?= /usr
+TARGET=white-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: white-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)
 
-white-hd: white-hd.edj
+$(TARGET): $(SRC)
+       cp -f ./inc/$(@:.edj=-inc.edc) ./inc/$(TMP_INC)
+       edje_cc $(EDJE_FLAGS_$(V)) -id ./images/$(@:.edj=) -sd ./sounds -fd ../objects $(SRC) $@
 
-clean:
+clean: rm_edc
        rm -f *.edj
+       rm -f ./inc/$(TMP_INC)
+
+distclean: clean
 
 install:
-       mkdir -p $(themedir)
-       $(INSTALL) white*.edj $(themedir)
+       mkdir -p $(THEME_DIR)
+       $(INSTALL) $(TARGET) $(THEME_DIR)
 
-distclean: clean
+uninstall:
+       rm -f $(THEME_DIR)/$(TARGET)
+
+$(SRC):
+       cp -rf $(EDC_DIR)/$(SRC) $(EDC_DIR)/widgets .
+
+rm_edc:
+       rm -rf $(SRC) widgets