diff --git a/Makefile b/Makefile index 08239e40..11c86d00 100644 --- a/Makefile +++ b/Makefile @@ -56,7 +56,7 @@ libcyclone.so.1: runtime.c runtime.h gcc -shared -Wl,-soname,libcyclone.so.1 -o libcyclone.so.1.0.1 runtime.o libcyclone.a: runtime.c runtime.h dispatch.c $(CC) -g -c dispatch.c -o dispatch.o - $(CC) -g -c -DCYC_INSTALL_DIR=\"$(PREFIX)\" runtime.c -o runtime.o + $(CC) -g -c -DCYC_INSTALL_DIR=\"$(PREFIX)\" -DCYC_INSTALL_SLD=\"/share/cyclone\" runtime.c -o runtime.o $(AR) rcs libcyclone.a runtime.o dispatch.o # Instructions from: http://www.adp-gmbh.ch/cpp/gcc/create_lib.html # Note compiler will have to link to this, eg: diff --git a/runtime.c b/runtime.c index 819a1fe8..f253041e 100644 --- a/runtime.c +++ b/runtime.c @@ -946,8 +946,14 @@ string_type Cyc_installation_dir(object type) { // TODO: need to handle 'inc 'lib 'sld and return appropriate dir. // EG: if 'sld, return (CYC_INSTALL_DIR "/" CYC_SLD_DIR) // need to use directives from makefile - make_string(str, CYC_INSTALL_DIR); - return str; + if (Cyc_is_symbol(type) == boolean_t && + strncmp(((symbol)type)->pname, "sld", 5) == 0) { + make_string(str, CYC_INSTALL_SLD); // TODO: prepend INSTALL_DIR + "/" + return str; + } else { + make_string(str, CYC_INSTALL_DIR); + return str; + } } /**