fbf3de13484926ab34786e8cc94f2cc8c374cfe8
[platform/core/system/tizen-platform-config.git] / src / Makefile.am
1 lib_LTLIBRARIES = libtzplatform-config-@LIBTZPLATFORM_CONFIG_VERSION@.la
2
3 bin_PROGRAMS = tzplatform-get
4
5 SRC_FROMWRAPPER_STATIC= \
6         static-api.c \
7         isadmin.h \
8         isadmin.c
9
10 SRC_FROMWRAPPER_SHARED= \
11         buffer.h \
12         buffer.c \
13         foreign.h \
14         foreign.c \
15         heap.h \
16         heap.c \
17         parser.h \
18         parser.c \
19         passwd.h \
20         passwd.c \
21         scratch.h \
22         scratch.c \
23         context.c \
24         context.h \
25         hashing.c \
26         hashing.h \
27         init.c \
28         init.h \
29         shared-api.c \
30         shared-api.h \
31         tzplatform_config.sym \
32         tzplatform_config.h
33
34 SRC_FROMWRAPPER=$(SRC_FROMWRAPPER_SHARED) $(SRC_FROMWRAPPER_STATIC)
35
36 SRC_TOOL = \
37         buffer.c \
38         foreign.c \
39         heap.c \
40         parser.c \
41         sha256sum.c \
42         toolbox.c
43
44 SRC_FROMTOOL= \
45         tzplatform_variables.h \
46         signup.inc \
47         hash.inc
48
49 libtzplatform_config_@LIBTZPLATFORM_CONFIG_VERSION@_la_CFLAGS = -fPIC
50
51 BUILT_SOURCES=tzplatform-tool $(SRC_FROMTOOL)
52
53 CLEANFILES=tzplatform-tool $(SRC_FROMTOOL)
54
55 libtzplatform_config_@LIBTZPLATFORM_CONFIG_VERSION@_la_SOURCES = \
56         $(SRC_FROMWRAPPER) \
57         $(SRC_FROMTOOL)
58
59 tzplatform-tool: $(SRC_TOOL)
60         $(CC) $^ -o $@
61
62 tizen-platform.conf: /etc/tizen-platform.meta tzplatform-tool
63         ./tzplatform-tool pretty $< >$@
64
65 tzplatform_variables.h: tizen-platform.conf tzplatform-tool
66         ./tzplatform-tool h $< >$@
67
68 hash.inc: tizen-platform.conf tzplatform-tool
69         ./tzplatform-tool c $< >$@
70
71 signup.inc: tizen-platform.conf tzplatform-tool
72         ./tzplatform-tool signup $< >$@
73
74 libtzplatform_config_@LIBTZPLATFORM_CONFIG_VERSION@_la_LDFLAGS = -version-info $(LIBTZPLATFORM_CONFIG_SO_VERSION)
75 libtzplatform_config_@LIBTZPLATFORM_CONFIG_VERSION@_la_LDFLAGS += -Wl,--version-script=tzplatform_config.sym
76 libtzplatform_config_@LIBTZPLATFORM_CONFIG_VERSION@_la_LDFLAGS += -Wl,-O3
77 libtzplatform_config_@LIBTZPLATFORM_CONFIG_VERSION@_la_LDFLAGS += -lpthread
78
79 libtzplatform_config_includedir = $(includedir)/
80 nobase_libtzplatform_config_include_HEADERS = tzplatform_variables.h tzplatform_config.h
81
82 dist_sysconf_DATA=tizen-platform.conf
83
84 macros.tizen-platform: tizen-platform.conf tzplatform-tool
85         ./tzplatform-tool rpm $< | grep -v TZ_USER_ > $@
86
87 tzplatform_config_sysconfdir= $(sysconfdir)/rpm
88 dist_tzplatform_config_sysconf_DATA=macros.tizen-platform
89
90 tzplatform_get_SOURCES = tzplatform_get.c
91 tzplatform_get_LDADD = libtzplatform-config-@LIBTZPLATFORM_CONFIG_VERSION@.la
92