diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-05-20 14:21:29 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-05-20 14:21:29 -0700 |
commit | a4835d466c50237afcc30ff99bc980aeb5d17ce6 (patch) | |
tree | 66357bce22a451743c6b1b02e71f6860d9d84bd2 /macros.pl | |
parent | 73252a92ae00ab63a6f52f9c987d4550c20b9100 (diff) | |
download | nasm-a4835d466c50237afcc30ff99bc980aeb5d17ce6.tar.gz nasm-a4835d466c50237afcc30ff99bc980aeb5d17ce6.tar.bz2 nasm-a4835d466c50237afcc30ff99bc980aeb5d17ce6.zip |
Avoid #including .c files; instead compile as separate units
Don't #include .c files, even if they are auto-generated; instead
compile them as separate compilation units and let the linker do its
job.
Diffstat (limited to 'macros.pl')
-rw-r--r-- | macros.pl | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -21,9 +21,9 @@ open(OUTPUT,">macros.c") or die "unable to open macros.c\n"; print OUTPUT "/* This file auto-generated from standard.mac by macros.pl" . " - don't edit it */\n"; print OUTPUT "\n"; -print OUTPUT "#include \"compiler.h\"\n"; +print OUTPUT "#include \"tables.h\"\n"; print OUTPUT "\n"; -print OUTPUT "static const char * const stdmac[] = {\n"; +print OUTPUT "const char * const nasm_stdmac[] = {\n"; foreach $fname ( @ARGV ) { open(INPUT,$fname) or die "unable to open $fname\n"; @@ -46,7 +46,8 @@ foreach $fname ( @ARGV ) { } close(INPUT); } -print OUTPUT " NULL\n};\n"; +print OUTPUT " NULL\n};\n\n"; $tasm_count = $index unless ( defined($tasm_count) ); -print OUTPUT "#define TASM_MACRO_COUNT $tasm_count\n"; +print OUTPUT "const char * const * nasm_stdmac_after_tasm = ", + "&nasm_stdmac[$tasm_count];\n"; close(OUTPUT); |