Previous 199869 Revisions Next

r23765 Tuesday 18th June, 2013 at 08:15:37 UTC by Miodrag Milanović
create lib per driver source file, and make linking correct (nw)
[src/build]makemak.c

trunk/src/build/makemak.c
r23764r23765
320320   if (srcdir.len() == 0)
321321      usage(argv[0]);
322322
323
324   if (sourcecount>0)
325   {   
326      printf("OBJDIRS += \\\n");
327      printf("\t$(OBJ)/mame/audio \\\n");
328      printf("\t$(OBJ)/mame/drivers \\\n");
329      printf("\t$(OBJ)/mame/layout \\\n");
330      printf("\t$(OBJ)/mame/machine \\\n");
331      printf("\t$(OBJ)/mame/video \\\n");
332      printf("\n\n");
333      printf("DRVLIBS += \\\n");
334     
335      for(int i=0;i<sourcecount;i++) {     
336         printf("\t$(OBJ)/mame/%s.a \\\n",sourcelst[i]);
337      }
338      printf("\n");
339   }   
340
323341   // recurse over subdirectories
324342   return recurse_dir(srcdir.len(), srcdir);
325343}
r23764r23765
450468                  // convert the target from source to object (makes assumptions about rules)
451469                  astring target(file.name);
452470                  target.replace(0, "src/", "$(OBJ)/");
453                  target.replace(0, ".c", ".o");
471                  target.replace(0, "drivers/", "");
472                  target.replace(0, ".c", ".a");
454473                  printf("\n%s : \\\n", target.cstr());
455474
456475                  // iterate over the hashed dependencies and output them as well
457                  for (dependency_map::entry_t *entry = depend_map.first(); entry != NULL; entry = depend_map.next(entry))
458                     printf("\t%s \\\n", entry->tag().cstr());
476                  for (dependency_map::entry_t *entry = depend_map.first(); entry != NULL; entry = depend_map.next(entry))
477                  {
478                     astring t(entry->tag());
479                     t.replace(0, "src/", "$(OBJ)/");
480                     t.replace(0, ".c", ".o");
481                     if (core_filename_ends_with(t, ".o"))
482                     {
483                        printf("\t%s \\\n", t.cstr());
484                     }
485                  }
486                  /*
487                  printf("\n");
488                  printf("\n");
489                  for (dependency_map::entry_t *entry = depend_map.first(); entry != NULL; entry = depend_map.next(entry))
490                  {
491                     astring t(entry->tag());
492                     if (core_filename_ends_with(t, ".h"))
493                     {
494                        printf("\t%s\n", t.cstr());
495                     }
496                  }*/
459497               }
460498            }
461499         }

Previous 199869 Revisions Next


© 1997-2024 The MAME Team