KODEV_OUTPUT tells kodev the outdir of the binary.

eg:

$ env KODEV_OUTPUT=/tmp kodev build

will place the resulting binary under /tmp/<binary>
This commit is contained in:
Joris Vink 2018-11-28 14:24:42 +01:00
parent 8dd075e71c
commit fd1ab5879d
1 changed files with 6 additions and 2 deletions

View File

@ -387,6 +387,7 @@ static int cflags_count = 0;
static int cxxflags_count = 0;
static int ldflags_count = 0;
static char *flavor = NULL;
static char *out_dir = ".";
static char *object_dir = ".objs";
static char *cflags[CFLAGS_MAX];
static char *cxxflags[CXXFLAGS_MAX];
@ -425,6 +426,9 @@ main(int argc, char **argv)
if ((env = getenv("KORE_OBJDIR")) != NULL)
object_dir = env;
if ((env = getenv("KODEV_OUTPUT")) != NULL)
out_dir = env;
(void)umask(S_IWGRP | S_IWOTH);
for (i = 0; cmds[i].name != NULL; i++) {
@ -1465,9 +1469,9 @@ cli_link_application(void *arg)
bopt = arg;
if (bopt->single_binary)
(void)cli_vasprintf(&output, "%s", appl);
(void)cli_vasprintf(&output, "%s/%s", out_dir, appl);
else
(void)cli_vasprintf(&output, "%s.so", appl);
(void)cli_vasprintf(&output, "%s/%s.so", out_dir, appl);
idx = 0;
args[idx++] = compiler_ld;