trunk/src/build/makemak.c
| r23764 | r23765 | |
| 320 | 320 | if (srcdir.len() == 0) |
| 321 | 321 | usage(argv[0]); |
| 322 | 322 | |
| 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 | |
| 323 | 341 | // recurse over subdirectories |
| 324 | 342 | return recurse_dir(srcdir.len(), srcdir); |
| 325 | 343 | } |
| r23764 | r23765 | |
| 450 | 468 | // convert the target from source to object (makes assumptions about rules) |
| 451 | 469 | astring target(file.name); |
| 452 | 470 | target.replace(0, "src/", "$(OBJ)/"); |
| 453 | | target.replace(0, ".c", ".o"); |
| 471 | target.replace(0, "drivers/", ""); |
| 472 | target.replace(0, ".c", ".a"); |
| 454 | 473 | printf("\n%s : \\\n", target.cstr()); |
| 455 | 474 | |
| 456 | 475 | // 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 | }*/ |
| 459 | 497 | } |
| 460 | 498 | } |
| 461 | 499 | } |