mkdir(abidir, 0755);
free(abidir);
- char *cmd = mkstr("%s %s -o bin/%s/%s -r %s",
+ char *cmd = mkstr("%s -r %s -o bin/%s/%s -s %s",
linker, IniFile_Get(opts, abi, "LDFLAGS", ""),
- abi, udiprops->ModuleName, objfiles_str);
+ abi, udiprops->ModuleName, objfiles_str
+ );
printf("--- Linking: bin/%s/%s\n", abi, udiprops->ModuleName);
+ printf("%s\n", cmd);
int rv = system(cmd);
free(cmd);
free(objfiles_str);
#include "include/inifile.h"
#include "include/udiprops.h"
+#define CONFIG_FILENAME "udibuild.ini"
#ifdef __ACESS__
-#define CONFIG_FILE "/Acess/Conf/UDI/udibuild.ini"
+#define RUNTIME_DIR "/Acess/Conf/UDI"
#else
-#define CONFIG_FILE "/etc/udi/udibuild.ini"
+#define RUNTIME_DIR "/etc/udi"
#endif
// === PROTOTYPES ===
void Usage(const char *progname);
// === GLOBALS ===
+const char *gsRuntimeDir = RUNTIME_DIR;
const char *gsOpt_ConfigFile;
const char *gsOpt_WorkingDir;
const char *gsOpt_UdipropsFile;
if( !gsOpt_ConfigFile && (argv[0][0] == '.' || argv[0][0] == '/') ) {
char *last_slash = strrchr(argv[0], '/');
if( last_slash ) {
- gsOpt_ConfigFile = mkstr("%.*s/udibuild.ini",
- last_slash-argv[0], argv[0]);
+ gsOpt_ConfigFile = mkstr("%.*s/%s",
+ last_slash-argv[0], argv[0], CONFIG_FILENAME);
}
//if( !file_exists(gsOpt_ConfigFile) ) {
// free(gsOpt_ConfigFile);
//}
}
// 3. Check ~/.config/udi/udibuild.ini
- // 4. Check CONFIGNAME
+ // 4. Check RUNTIME_DIR/udibuild.ini
// #. Oh well
if( !gsOpt_ConfigFile ) {
- fprintf(stderr, "Can't locate udibuild.ini file, please specify using '-c'\n");
+ fprintf(stderr, "Can't locate "CONFIG_FILENAME" file, please specify using '-c'\n");
exit(2);
}