summaryrefslogtreecommitdiff
path: root/src/static_libs/buildsystem/buildsystem_autotools.c
blob: 83d8c1f2df1003247ee39b6fd549dba43244c62e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifdef _WIN32
# define BIN_EXT ".exe"
#else
# define BIN_EXT ""
#endif

#include "config.h"

#include <stdio.h>
#include <Eina.h>

Eina_Bool
bs_mod_get(char *path, size_t maxlen, const char *subsystem, const char *mod_name)
{
   if (!getenv("EFL_RUN_IN_TREE")) return EINA_FALSE;

   snprintf(path, maxlen, PACKAGE_BUILD_DIR"/src/modules/%s/%s/.libs/module"SHARED_LIB_SUFFIX, subsystem, mod_name);

   return EINA_TRUE;
}

Eina_Bool
bs_mod_dir_get(char *path, size_t maxlen, const char *subsystem, const char *mod_name)
{
   if (!getenv("EFL_RUN_IN_TREE")) return EINA_FALSE;

   snprintf(path, maxlen, PACKAGE_BUILD_DIR"/src/modules/%s/%s/.libs", subsystem, mod_name);

   return EINA_TRUE;
}

Eina_Bool
bs_binary_get(char *path, size_t maxlen, const char *subsystem, const char *bin_name)
{
   if (!getenv("EFL_RUN_IN_TREE")) return EINA_FALSE;

   snprintf(path, maxlen, PACKAGE_BUILD_DIR"/src/bin/%s/%s"BIN_EXT, subsystem, bin_name);

   return EINA_TRUE;
}

Eina_Bool
bs_data_path_get(char *path, size_t maxlen, const char *subsystem, const char *file)
{
   if (!getenv("EFL_RUN_IN_TREE")) return EINA_FALSE;

   snprintf(path, maxlen, PACKAGE_SRC_DIR"/data/%s/%s", subsystem, file);

   return EINA_TRUE;
}