diff options
Diffstat (limited to 'maje.c')
-rw-r--r-- | maje.c | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -42,13 +42,12 @@ int main(int argc, char *argv[]) struct majefile *sources = find_source_files(srcdir); char *mainname = find_main(sources); - if (!mainname) { - printf("libraries not yet supported\n"); - return 0; + char *target = NULL; + if (mainname) { + target = strdup(mainname); + target[strlen(target) - 2] = '\0'; + target = basename(target); } - char *target = strdup(mainname); - target[strlen(target) - 2] = '\0'; - target = basename(target); FILE *makefile = fopen("Makefile", "w"); if (makefile == NULL) { |