diff -urN makedepf90-2.8.8/Makefile.in makedepf90-2.8.8-sdk2/Makefile.in
--- makedepf90-2.8.8/Makefile.in	2006-06-13 03:27:28.000000000 -0500
+++ makedepf90-2.8.8-sdk2/Makefile.in	2019-04-26 21:58:46.000000000 -0500
@@ -25,7 +25,7 @@
 
 PROG = makedepf90@EXEEXT@
 
-VERSION = 2.8.8
+VERSION = 2.8.8-sdk2
 
 CC = @CC@
 CFLAGS = @CFLAGS@
diff -urN makedepf90-2.8.8/global.h makedepf90-2.8.8-sdk2/global.h
--- makedepf90-2.8.8/global.h	2006-06-13 03:27:28.000000000 -0500
+++ makedepf90-2.8.8-sdk2/global.h	2019-04-26 21:58:08.000000000 -0500
@@ -59,6 +59,7 @@
                           files */
     bool warn_confused; /* Write warnings when makedefp90 gets confused for
                             some reason. */
+    bool external_mods; /* Add dependencies on external modules */
     char *modfile_fmt;  /* format of '*.mod-file' names */
     List *ignore_mods;   /* Modules to be ignored */
     SourceFmt src_fmt;
diff -urN makedepf90-2.8.8/main.c makedepf90-2.8.8-sdk2/main.c
--- makedepf90-2.8.8/main.c	2006-06-13 03:27:28.000000000 -0500
+++ makedepf90-2.8.8-sdk2/main.c	2019-04-26 22:03:10.000000000 -0500
@@ -56,6 +56,7 @@
     "\n-h\tprint this message to stdout and quit.\n"
     "\n-V\tprint version and copyright information to stdout and quit.\n"
     "\n-W\tprint warning messages about missing includes/modules.\n"
+    "\n-X\tprint Add dependencies on external modules (not listed in sourcefiles).\n"
     "\n-m fmt\tWrite mod-file names using the format 'fmt'.\n"
           "\t'fmt' may contain any of the following modifiers:\n"
           "\t  '%%' for '%'\n"
@@ -136,6 +137,7 @@
 
     /* Set a few option defaults */
     options.warn_missing = false;
+    options.external_mods = false;
     options.modfile_fmt = (char *)MODFILE_FMT_DEFAULT;
     options.src_fmt = SUFFIX;
     options.create_obj = false;
@@ -167,6 +169,9 @@
         } else if (strcmp(argv[i], "-Wconfused") == 0) {
             options.warn_confused = true;
 
+        } else if (strcmp(argv[i], "-X") == 0 ) {
+            options.external_mods = true;
+
         } else if (strncmp(argv[i], "-m", 2) == 0) {
             if (strlen(argv[i]) == 2) {
                 if (i == argc-1)  fatal_error("Option '-m' needs argument");
@@ -382,8 +387,11 @@
     if (options.create_obj) {
         printf("FOBJ=");
         for (h1 = obj; h1; h1 = h1->next)
-            if (options.obj_dir_set)
-                printf("%s ", set_path(h1->data, options.obj_dir));
+            if (options.obj_dir_set) {
+		char *pn = set_path(h1->data, options.obj_dir);
+		printf("%s ", pn);
+		free(pn);
+	    }
             else
                 printf("%s ", (char *)h1->data);
         printf("\n\n%s: $(FOBJ)\n\t%s\n\n", options.exe_name,options.link_rule);
@@ -401,8 +409,11 @@
 
         /* Targets */
         for (h2 = dep->targets; h2; h2 = h2->next)  
-            if (options.obj_dir_set)
-                printf("%s ", set_path(h2->data, options.obj_dir));
+            if (options.obj_dir_set) {
+		char *pn = set_path(h2->data, options.obj_dir);
+                printf("%s ", pn);
+		free(pn);
+	    }
             else
                 printf("%s ", (char *)h2->data);
 
@@ -418,19 +429,29 @@
             s = (char *)h2->data;
 
             if (!(l = list_find(modlist, s, &modstrcmp))) {
-                /* Don't write *.mod-file to dependency list if its definition 
-                 * isn't found. */
                 if (options.warn_missing)  warning("Module '%s' not found", s);
-
+                if (options.external_mods) {
+                    char *mn = modfile_name(s, s);
+                    if (options.obj_dir_set) {
+                        char *pn = set_path(mn, options.obj_dir);
+                        printf("%s ", pn);
+                        free(pn);
+                    }
+                    else
+                      printf("%s ", mn);
+		    free(mn);
+                }
             } else {
                 mod = (Module *)l->data;
                 if (strcasecmp(mod->sourcefile, dep->sourcefile) == 0) {
                     /* Dont' write *.mod-file to the dependency list if it 
                      * defined in the same file it is USEd from. */
                 } else {
-                    if (options.obj_dir_set)
-                        printf("%s ", 
-                               set_path(mod->modfile_name, options.obj_dir));
+                    if (options.obj_dir_set) {
+			char *pn = set_path(mod->modfile_name, options.obj_dir);
+                        printf("%s ", pn);
+			free(pn);
+		    }
                     else
                         printf("%s ", mod->modfile_name);
                 }
