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