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