use pkgconfig on tizen-platform-wrapper
[platform/core/system/tizen-platform-config.git] / src / Makefile.am
index 4534c18..0d2a594 100644 (file)
@@ -2,6 +2,8 @@ lib_LTLIBRARIES = libtzplatform-config-@LIBTZPLATFORM_CONFIG_VERSION@.la
 
 bin_PROGRAMS = tzplatform-get
 
+wrappersrcdir=$(shell pkg-config --variable=srcdir tizen-platform-wrapper)
+
 SRC_FROMWRAPPER= \
        buffer.h \
        buffer.c \
@@ -16,7 +18,7 @@ SRC_FROMWRAPPER= \
        scratch.h \
        scratch.c \
        tzplatform_config.c \
-       tzplatform_config.h 
+       tzplatform_config.h
 
 SRC_FROMTOOL= \
        tzplatform_variables.h \
@@ -34,7 +36,7 @@ tizen-platform.conf: ../tizen-platform.meta
        tzplatform-tool pretty $< >$@
 
 $(SRC_FROMWRAPPER) tzplatform_get.c:
-       cp $(datadir)/tizen-platform-wrapper/$@ .
+       cp $(wrappersrcdir)/tizen-platform-wrapper/$@ .
 
 tzplatform_variables.h: tizen-platform.conf
        tzplatform-tool h $< >$@
@@ -45,7 +47,7 @@ hash.inc: tizen-platform.conf
 libtzplatform_config_@LIBTZPLATFORM_CONFIG_VERSION@_la_LDFLAGS = -version-info $(LIBTZPLATFORM_CONFIG_SO_VERSION)
 libtzplatform_config_@LIBTZPLATFORM_CONFIG_VERSION@_la_LDFLAGS += -export-symbols-regex tzplatform_.*
 libtzplatform_config_@LIBTZPLATFORM_CONFIG_VERSION@_la_LDFLAGS += -Wl,-O3
-libtzplatform_config_@LIBTZPLATFORM_CONFIG_VERSION@_la_LDFLAGS += -lpthread 
+libtzplatform_config_@LIBTZPLATFORM_CONFIG_VERSION@_la_LDFLAGS += -lpthread
 
 libtzplatform_config_includedir = $(includedir)/
 nobase_libtzplatform_config_include_HEADERS = tzplatform_variables.h tzplatform_config.h
@@ -60,5 +62,3 @@ dist_tzplatform_config_sysconf_DATA=macros.tizen-platform
 
 tzplatform_get_SOURCES = tzplatform_get.c
 tzplatform_get_LDADD = libtzplatform-config-@LIBTZPLATFORM_CONFIG_VERSION@.la
-
-