else
m2/pge-boot/%.o: m2/pge-boot/%.c m2/gm2-libs/gm2-libs-host.h m2/gm2config.h
-test -d $(@D) || $(mkinstalldirs) $(@D)
- $(CXX) $(INCLUDES) -I$(srcdir)/m2/pge-boot -Im2/gm2-libs -g -c $< -o $@
+ $(CXX) $(CFLAGS) $(INCLUDES) -I$(srcdir)/m2/pge-boot -Im2/gm2-libs -g -c $< -o $@
m2/pge-boot/%.o: m2/pge-boot/%.cc m2/gm2-libs/gm2-libs-host.h m2/gm2config.h
-test -d $(@D) || $(mkinstalldirs) $(@D)
- $(CXX) $(INCLUDES) -I$(srcdir)/m2/pge-boot -Im2/gm2-libs -g -c $< -o $@
+ $(CXX) $(CXXFLAGS) $(INCLUDES) -I$(srcdir)/m2/pge-boot -Im2/gm2-libs -g -c $< -o $@
$(PGE): $(BUILD-PGE-O)
+$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ $(BUILD-PGE-O) -lm
if (strcmp (np.name, "") == 0)
append_option (OPT_fm2_pathname_, safe_strdup ("-"), 1);
else
- append_option (OPT_fm2_pathname_, safe_strdup (np.name), 1);
+ append_option (OPT_fm2_pathname_, safe_strdup (np.name), 1);
for (auto *s : np.path)
append_option (OPT_fm2_pathnameI, safe_strdup (s), 1);
}
/* Have we seen the -v flag? */
bool verbose = false;
+ /* Have we seen the -fm2-pathname flag? */
+ bool seen_pathname = false;
+
/* The number of libraries added in. */
int added_libraries;
uselist = decoded_options[i].value;
break;
case OPT_fm2_pathname_:
+ seen_pathname = true;
args[i] |= SKIPOPT; /* We will add the option if it is needed. */
m2_path_name = decoded_options[i].arg;
break;
if (language != NULL && (strcmp (language, "modula-2") != 0))
return;
+ if (! seen_pathname)
+ /* Not seen -fm2-pathname therefore make current working directory
+ the first place to look for modules. */
+ push_back_Ipath (".");
+
/* Override the default when the user specifies it. */
if (seen_scaffold_static && scaffold_static && !seen_scaffold_dynamic)
scaffold_dynamic = false;
libraries = xstrdup ("m2iso,m2cor,m2pim,m2log");
else
/* Default to pim libraries otherwise. */
- libraries = xstrdup ("m2pim,m2iso,m2cor,m2log");
+ libraries = xstrdup ("m2cor,m2log,m2pim,m2iso");
}
libraries = convert_abbreviations (libraries);
append_option (OPT_flibs_, xstrdup (libraries), 1);