From c4cb73181f04e536d946d102e251efe4db446105 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Tue, 18 Jun 2013 08:15:37 +0000 Subject: [PATCH] create lib per driver source file, and make linking correct (nw) --- src/build/makemak.c | 44 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/src/build/makemak.c b/src/build/makemak.c index 23b99e6de44..529c680286d 100644 --- a/src/build/makemak.c +++ b/src/build/makemak.c @@ -320,6 +320,24 @@ int main(int argc, char *argv[]) if (srcdir.len() == 0) usage(argv[0]); + + if (sourcecount>0) + { + printf("OBJDIRS += \\\n"); + printf("\t$(OBJ)/mame/audio \\\n"); + printf("\t$(OBJ)/mame/drivers \\\n"); + printf("\t$(OBJ)/mame/layout \\\n"); + printf("\t$(OBJ)/mame/machine \\\n"); + printf("\t$(OBJ)/mame/video \\\n"); + printf("\n\n"); + printf("DRVLIBS += \\\n"); + + for(int i=0;itag().cstr()); + for (dependency_map::entry_t *entry = depend_map.first(); entry != NULL; entry = depend_map.next(entry)) + { + astring t(entry->tag()); + t.replace(0, "src/", "$(OBJ)/"); + t.replace(0, ".c", ".o"); + if (core_filename_ends_with(t, ".o")) + { + printf("\t%s \\\n", t.cstr()); + } + } + /* + printf("\n"); + printf("\n"); + for (dependency_map::entry_t *entry = depend_map.first(); entry != NULL; entry = depend_map.next(entry)) + { + astring t(entry->tag()); + if (core_filename_ends_with(t, ".h")) + { + printf("\t%s\n", t.cstr()); + } + }*/ } } }