summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Juyung Seo <juyung.seo@samsung.com>2013-06-16 23:50:17 +0900
committerDaniel Juyung Seo <juyung.seo@samsung.com>2013-06-16 23:50:17 +0900
commitc7bc8db92eb91c2b957b398a91783bb416eabde5 (patch)
tree4059c87e8c1da8c5b0a37893afdba6b17ff207d0
parentfbb97d576d588d80ec7f75c828eb15d84eb3095a (diff)
source/3-final: added separated Makefile for data/edc.
-rw-r--r--source/3-final/Makefile25
-rw-r--r--source/3-final/data/edc/Makefile17
2 files changed, 29 insertions, 13 deletions
diff --git a/source/3-final/Makefile b/source/3-final/Makefile
index 818bbb9..a73df9d 100644
--- a/source/3-final/Makefile
+++ b/source/3-final/Makefile
@@ -1,7 +1,6 @@
1SRCDIR=src 1SRCDIR=src
2EDJDIR=data/edc 2EDJDIR=data/edc
3OBJECTS=$(SRCDIR)/main.o 3OBJECTS=$(SRCDIR)/main.o
4EDJS=$(EDJDIR)/layout.edj
5BINARY=sample 4BINARY=sample
6DIRNAME=sample 5DIRNAME=sample
7 6
@@ -15,10 +14,7 @@ CFLAGS = `pkg-config --cflags elementary evas`
15CFLAGS += -g -W -Wextra #-Wall 14CFLAGS += -g -W -Wextra #-Wall
16LDFLAGS = `pkg-config --libs elementary evas` 15LDFLAGS = `pkg-config --libs elementary evas`
17 16
18EDJE_CC = edje_cc 17all: $(OBJECTS) $(BINARY) theme
19EDJE_FLAGS = -id data/images
20
21all: $(OBJECTS) $(BINARY) $(EDJS)
22 18
23%.o : %.c 19%.o : %.c
24 @echo " Compilation of $(@D)/$(<F)" 20 @echo " Compilation of $(@D)/$(<F)"
@@ -28,17 +24,20 @@ $(BINARY): $(OBJECTS)
28 @echo " Linking $(@F)" 24 @echo " Linking $(@F)"
29 @$(CC) -o $(BINARY) $(OBJECTS) $(LDFLAGS) 25 @$(CC) -o $(BINARY) $(OBJECTS) $(LDFLAGS)
30 26
31$(EDJDIR)/layout.edj: $(EDJDIR)/layout.edc 27theme:
32 @echo " Compilation of $(@D)/$(<F)" 28 $(MAKE) -C $(EDJDIR)
33 @$(EDJE_CC) $(EDJE_FLAGS) $(EDJDIR)/layout.edc $(EDJDIR)/layout.edj 29
30theme_install:
31 $(MAKE) -C $(EDJDIR) install
32
33theme_clean:
34 $(MAKE) -C $(EDJDIR) clean
34 35
35install: $(BINARY) $(EDJDIR)/layout.edj 36install: $(BINARY) theme_install
36 @echo "installation of executables" 37 @echo "installation of executables"
37 @mkdir -p $(BINDIR) 38 @mkdir -p $(BINDIR)
38 @install -m 0755 $(BINARY) $(BINDIR) 39 @install -m 0755 $(BINARY) $(BINDIR)
39 @echo "installation of data" 40 @echo "installation of data"
40 @mkdir -p $(DATADIR)/edj
41 @install $(EDJDIR)/layout.edj $(DATADIR)/edj
42 @mkdir -p $(DATADIR)/images 41 @mkdir -p $(DATADIR)/images
43 @install data/images/* $(DATADIR)/images 42 @install data/images/* $(DATADIR)/images
44 43
@@ -46,5 +45,5 @@ uninstall:
46 rm -rf $(DATADIR) 45 rm -rf $(DATADIR)
47 rm -rf $(BINDIR)/$(BINARY) 46 rm -rf $(BINDIR)/$(BINARY)
48 47
49clean: 48clean: theme_clean
50 @rm -f *.o *.edj *~ $(BINARY) 49 @rm -f src/*.o *~ $(BINARY)
diff --git a/source/3-final/data/edc/Makefile b/source/3-final/data/edc/Makefile
new file mode 100644
index 0000000..ff604b3
--- /dev/null
+++ b/source/3-final/data/edc/Makefile
@@ -0,0 +1,17 @@
1PREFIX=/usr/local
2DATADIR=$(PREFIX)/share/sample
3
4EDJ=layout.edj
5EDJE_CC = edje_cc
6EDJE_FLAGS = -id ../images
7
8$(EDJ): layout.edc
9 @echo " Compilation of $(@D)/$(<F)"
10 @$(EDJE_CC) $(EDJE_FLAGS) layout.edc $(EDJS)
11
12install: $(EDJ)
13 @mkdir -p $(DATADIR)/edj
14 @install $(EDJ) $(DATADIR)/edj
15
16clean:
17 @rm -f *.edj