#defineが重複するのを修正。
@@ -372,7 +372,7 @@ | ||
372 | 372 | #define $included |
373 | 373 | " >> "$path"".h" |
374 | 374 | echo "#include <stddef.h>" >> "$path"".h" |
375 | -echo "#include \"../cstl/common.h\"" >> "$path"".h" | |
375 | +echo "#include <cstl/common.h>" >> "$path"".h" | |
376 | 376 | if [ "$include_file" != "" ]; then |
377 | 377 | echo "#include \"$include_file\" |
378 | 378 | " >> "$path"".h" |
@@ -469,28 +469,9 @@ | ||
469 | 469 | if [ $lower = "list" ]; then |
470 | 470 | echo "\ |
471 | 471 | #if !defined(NDEBUG) && defined(CSTL_DEBUG) |
472 | -#include <assert.h> | |
473 | 472 | #define CSTL_MAGIC_LIST(Name) ((Name *) -1) |
474 | -#define CSTL_MAGIC(x) x | |
475 | -#define CSTL_ASSERT(x) assert(x) | |
476 | -#else | |
477 | -#define CSTL_MAGIC(x) | |
478 | -#define CSTL_ASSERT(x) | |
479 | 473 | #endif |
480 | -#define CSTL_UNUSED_PARAM(x) (void) x | |
481 | 474 | " >> "$path"".c" |
482 | -else | |
483 | -echo "\ | |
484 | -#if !defined(NDEBUG) && defined(CSTL_DEBUG) | |
485 | -#include <assert.h> | |
486 | -#define CSTL_MAGIC(x) x | |
487 | -#define CSTL_ASSERT(x) assert(x) | |
488 | -#else | |
489 | -#define CSTL_MAGIC(x) | |
490 | -#define CSTL_ASSERT(x) | |
491 | -#endif | |
492 | -#define CSTL_UNUSED_PARAM(x) (void) x | |
493 | -" >> "$path"".c" | |
494 | 475 | fi |
495 | 476 | if [ "$alloc" != "" ]; then |
496 | 477 | if [ "$alloc" = "gc" ]; then |
@@ -554,9 +535,9 @@ | ||
554 | 535 | |
555 | 536 | # コンパイル確認 |
556 | 537 | if [ "$nocompile" = "" ]; then |
557 | - gcc -Wall -ansi -pedantic-errors "$path"".c" -c -DCSTL_DEBUG | |
558 | - gcc -Wall -ansi -pedantic-errors "$path"".c" -c | |
559 | - g++ -Wall -ansi -pedantic-errors "$path"".c" -c -DCSTL_DEBUG | |
560 | - g++ -Wall -ansi -pedantic-errors "$path"".c" -c | |
538 | + gcc -Wall -ansi -pedantic-errors -I.. "$path"".c" -c -DCSTL_DEBUG | |
539 | + gcc -Wall -ansi -pedantic-errors -I.. "$path"".c" -c | |
540 | + g++ -Wall -ansi -pedantic-errors -I.. "$path"".c" -c -DCSTL_DEBUG | |
541 | + g++ -Wall -ansi -pedantic-errors -I.. "$path"".c" -c | |
561 | 542 | rm "$path"".o" |
562 | 543 | fi |
@@ -1,7 +1,7 @@ | ||
1 | 1 | CC=gcc |
2 | 2 | # MEMORY=-DPOOL_DEBUG -DMY_MALLOC |
3 | 3 | # CSTLGEN=-DCSTLGEN |
4 | -CFLAGS=-Wall -g -DCSTL_DEBUG $(MEMORY) #-fprofile-arcs -ftest-coverage | |
4 | +CFLAGS=-Wall -I.. -g -DCSTL_DEBUG $(MEMORY) #-fprofile-arcs -ftest-coverage | |
5 | 5 | ifneq ($(MEMORY),) |
6 | 6 | POOL="pool" |
7 | 7 | endif |