[Slackbuilds-users] how can i define data_dir in makefile?
David Spencer
idlemoor at slackbuilds.org
Tue Aug 21 19:02:33 UTC 2018
Hi,
gabi gets my vote :D
-D.
On 21/08/18 19:21, Gabriel Diaz wrote:
> hello
>
> in the source code of icsim.c there is a
>
> #ifndef DATA_DIR
> #define DATA_DIR "./data/" // Needs trailing slash
> #endif
>
>
> and then
>
>
> if(stat(DATA_DIR, &dirstat) == -1) {
> printf("ERROR: DATA_DIR not found. Define in make file or run in src dir\n");
> exit(34);
> }
>
> so if there is no DATA_DIR defined, you might try to create a "data" diretory on the same path you´re running icsim.
>
>
> another option is to add -DDATA_DIR=/var/lib/iscsim or something like that to the CFLAGS so the DATA_DIR is defined to your liking.
>
> probably a good option is to define -DDATA_DIR in the CFLAGS and instruct the buildscript to define a DATA_DIR variable by default or pick one from the environment.
>
> my 2 cents.
>
> gabi
More information about the SlackBuilds-users
mailing list