From 1acf6ba82293cda3fc18cc3ba3a64328e496ca64 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Thu, 25 Jun 2009 13:06:49 -0700 Subject: [PATCH] Handle the new ELF headers in the dependency generation The dependency machinery relies on properly rooted includes, so give it to them... the path syntax munging machinery in the dependency script handles it from a Makefile syntax perspective, and then we can hope that C compilers are smart enough to deal with forward-slash paths even when that is not the native syntax. Signed-off-by: H. Peter Anvin --- Makefile.in | 13 +++++++++---- Mkfiles/msvc.mak | 10 +++++++--- Mkfiles/netware.mak | 10 +++++++--- Mkfiles/openwcom.mak | 10 +++++++--- Mkfiles/owlinux.mak | 10 +++++++--- output/elf32.h | 2 +- output/elf64.h | 2 +- output/outelf.c | 6 +++--- output/outelf32.c | 6 +++--- output/outelf64.c | 6 +++--- 10 files changed, 48 insertions(+), 27 deletions(-) diff --git a/Makefile.in b/Makefile.in index 50736b95..fbdf3f68 100644 --- a/Makefile.in +++ b/Makefile.in @@ -294,12 +294,17 @@ output/outcoff.$(O): output/outcoff.c compiler.h config.h insnsi.h nasm.h \ nasmlib.h outform.h outlib.h pptok.h preproc.h raa.h regs.h saa.h output/outdbg.$(O): output/outdbg.c compiler.h config.h insnsi.h nasm.h \ nasmlib.h outform.h pptok.h preproc.h regs.h +output/outelf.$(O): output/outelf.c compiler.h config.h insnsi.h nasm.h \ + nasmlib.h output/dwarf.h output/elfcommon.h output/outelf.h pptok.h \ + preproc.h regs.h output/outelf32.$(O): output/outelf32.c compiler.h config.h insnsi.h nasm.h \ - nasmlib.h outform.h outlib.h pptok.h preproc.h raa.h rbtree.h regs.h saa.h \ - stdscan.h + nasmlib.h outform.h outlib.h output/dwarf.h output/elf32.h \ + output/elfcommon.h output/outelf.h pptok.h preproc.h raa.h rbtree.h regs.h \ + saa.h stdscan.h output/outelf64.$(O): output/outelf64.c compiler.h config.h insnsi.h nasm.h \ - nasmlib.h outform.h outlib.h pptok.h preproc.h raa.h rbtree.h regs.h saa.h \ - stdscan.h + nasmlib.h outform.h outlib.h output/dwarf.h output/elf64.h \ + output/elfcommon.h output/outelf.h pptok.h preproc.h raa.h rbtree.h regs.h \ + saa.h stdscan.h output/outieee.$(O): output/outieee.c compiler.h config.h insnsi.h nasm.h \ nasmlib.h outform.h pptok.h preproc.h regs.h output/outmacho.$(O): output/outmacho.c compiler.h config.h insnsi.h nasm.h \ diff --git a/Mkfiles/msvc.mak b/Mkfiles/msvc.mak index a2a51936..e70f1e1e 100644 --- a/Mkfiles/msvc.mak +++ b/Mkfiles/msvc.mak @@ -40,7 +40,7 @@ NASM = nasm.$(O) nasmlib.$(O) ver.$(O) \ assemble.$(O) labels.$(O) hashtbl.$(O) crc64.$(O) parser.$(O) \ outform.$(O) outlib.$(O) output/outbin.$(O) \ output/outaout.$(O) output/outcoff.$(O) \ - output/outelf32.$(O) output/outelf64.$(O) \ + output/outelf.$(O) output/outelf32.$(O) output/outelf64.$(O) \ output/outobj.$(O) output/outas86.$(O) output/outrdf2.$(O) \ output/outdbg.$(O) output/outieee.$(O) output/outmacho.$(O) \ preproc.$(O) quote.$(O) pptok.$(O) macros.$(O) \ @@ -232,10 +232,14 @@ output/outcoff.$(O): output/outcoff.c compiler.h insnsi.h nasm.h nasmlib.h \ outform.h outlib.h pptok.h preproc.h raa.h regs.h saa.h output/outdbg.$(O): output/outdbg.c compiler.h insnsi.h nasm.h nasmlib.h \ outform.h pptok.h preproc.h regs.h +output/outelf.$(O): output/outelf.c compiler.h insnsi.h nasm.h nasmlib.h \ + output/dwarf.h output/elfcommon.h output/outelf.h pptok.h preproc.h regs.h output/outelf32.$(O): output/outelf32.c compiler.h insnsi.h nasm.h nasmlib.h \ - outform.h outlib.h pptok.h preproc.h raa.h rbtree.h regs.h saa.h stdscan.h + outform.h outlib.h output/dwarf.h output/elf32.h output/elfcommon.h \ + output/outelf.h pptok.h preproc.h raa.h rbtree.h regs.h saa.h stdscan.h output/outelf64.$(O): output/outelf64.c compiler.h insnsi.h nasm.h nasmlib.h \ - outform.h outlib.h pptok.h preproc.h raa.h rbtree.h regs.h saa.h stdscan.h + outform.h outlib.h output/dwarf.h output/elf64.h output/elfcommon.h \ + output/outelf.h pptok.h preproc.h raa.h rbtree.h regs.h saa.h stdscan.h output/outieee.$(O): output/outieee.c compiler.h insnsi.h nasm.h nasmlib.h \ outform.h pptok.h preproc.h regs.h output/outmacho.$(O): output/outmacho.c compiler.h insnsi.h nasm.h nasmlib.h \ diff --git a/Mkfiles/netware.mak b/Mkfiles/netware.mak index 692206fd..30a575a4 100644 --- a/Mkfiles/netware.mak +++ b/Mkfiles/netware.mak @@ -36,7 +36,7 @@ NASM = nasm.o nasmlib.o ver.o \ assemble.o labels.o hashtbl.o crc64.o parser.o \ outform.o outlib.o outbin.o \ outaout.o outcoff.o \ - outelf32.o outelf64.o \ + outelf.o outelf32.o outelf64.o \ outobj.o outas86.o outrdf2.o \ outdbg.o outieee.o outmacho.o \ preproc.o quote.o pptok.o macros.o \ @@ -171,10 +171,14 @@ outcoff.o: outcoff.c compiler.h config.h insnsi.h nasm.h nasmlib.h outform.h \ outlib.h pptok.h preproc.h raa.h regs.h saa.h outdbg.o: outdbg.c compiler.h config.h insnsi.h nasm.h nasmlib.h outform.h \ pptok.h preproc.h regs.h +outelf.o: outelf.c compiler.h config.h insnsi.h nasm.h nasmlib.h dwarf.h \ + elfcommon.h outelf.h pptok.h preproc.h regs.h outelf32.o: outelf32.c compiler.h config.h insnsi.h nasm.h nasmlib.h \ - outform.h outlib.h pptok.h preproc.h raa.h rbtree.h regs.h saa.h stdscan.h + outform.h outlib.h dwarf.h elf32.h elfcommon.h outelf.h pptok.h preproc.h \ + raa.h rbtree.h regs.h saa.h stdscan.h outelf64.o: outelf64.c compiler.h config.h insnsi.h nasm.h nasmlib.h \ - outform.h outlib.h pptok.h preproc.h raa.h rbtree.h regs.h saa.h stdscan.h + outform.h outlib.h dwarf.h elf64.h elfcommon.h outelf.h pptok.h preproc.h \ + raa.h rbtree.h regs.h saa.h stdscan.h outieee.o: outieee.c compiler.h config.h insnsi.h nasm.h nasmlib.h outform.h \ pptok.h preproc.h regs.h outmacho.o: outmacho.c compiler.h config.h insnsi.h nasm.h nasmlib.h \ diff --git a/Mkfiles/openwcom.mak b/Mkfiles/openwcom.mak index 5215159b..80770b79 100644 --- a/Mkfiles/openwcom.mak +++ b/Mkfiles/openwcom.mak @@ -52,7 +52,7 @@ NASM = nasm.$(O) nasmlib.$(O) ver.$(O) & assemble.$(O) labels.$(O) hashtbl.$(O) crc64.$(O) parser.$(O) & outform.$(O) outlib.$(O) output\outbin.$(O) & output\outaout.$(O) output\outcoff.$(O) & - output\outelf32.$(O) output\outelf64.$(O) & + output\outelf.$(O) output\outelf32.$(O) output\outelf64.$(O) & output\outobj.$(O) output\outas86.$(O) output\outrdf2.$(O) & output\outdbg.$(O) output\outieee.$(O) output\outmacho.$(O) & preproc.$(O) quote.$(O) pptok.$(O) macros.$(O) & @@ -261,10 +261,14 @@ output\outcoff.$(O): output\outcoff.c compiler.h insnsi.h nasm.h nasmlib.h & outform.h outlib.h pptok.h preproc.h raa.h regs.h saa.h output\outdbg.$(O): output\outdbg.c compiler.h insnsi.h nasm.h nasmlib.h & outform.h pptok.h preproc.h regs.h +output\outelf.$(O): output\outelf.c compiler.h insnsi.h nasm.h nasmlib.h & + output\dwarf.h output\elfcommon.h output\outelf.h pptok.h preproc.h regs.h output\outelf32.$(O): output\outelf32.c compiler.h insnsi.h nasm.h nasmlib.h & - outform.h outlib.h pptok.h preproc.h raa.h rbtree.h regs.h saa.h stdscan.h + outform.h outlib.h output\dwarf.h output\elf32.h output\elfcommon.h & + output\outelf.h pptok.h preproc.h raa.h rbtree.h regs.h saa.h stdscan.h output\outelf64.$(O): output\outelf64.c compiler.h insnsi.h nasm.h nasmlib.h & - outform.h outlib.h pptok.h preproc.h raa.h rbtree.h regs.h saa.h stdscan.h + outform.h outlib.h output\dwarf.h output\elf64.h output\elfcommon.h & + output\outelf.h pptok.h preproc.h raa.h rbtree.h regs.h saa.h stdscan.h output\outieee.$(O): output\outieee.c compiler.h insnsi.h nasm.h nasmlib.h & outform.h pptok.h preproc.h regs.h output\outmacho.$(O): output\outmacho.c compiler.h insnsi.h nasm.h nasmlib.h & diff --git a/Mkfiles/owlinux.mak b/Mkfiles/owlinux.mak index be56653c..a9ef0011 100644 --- a/Mkfiles/owlinux.mak +++ b/Mkfiles/owlinux.mak @@ -63,7 +63,7 @@ NASM = nasm.$(O) nasmlib.$(O) ver.$(O) \ assemble.$(O) labels.$(O) hashtbl.$(O) crc64.$(O) parser.$(O) \ outform.$(O) outlib.$(O) output/outbin.$(O) \ output/outaout.$(O) output/outcoff.$(O) \ - output/outelf32.$(O) output/outelf64.$(O) \ + output/outelf.$(O) output/outelf32.$(O) output/outelf64.$(O) \ output/outobj.$(O) output/outas86.$(O) output/outrdf2.$(O) \ output/outdbg.$(O) output/outieee.$(O) output/outmacho.$(O) \ preproc.$(O) quote.$(O) pptok.$(O) macros.$(O) \ @@ -271,10 +271,14 @@ output/outcoff.$(O): output/outcoff.c compiler.h insnsi.h nasm.h nasmlib.h \ outform.h outlib.h pptok.h preproc.h raa.h regs.h saa.h output/outdbg.$(O): output/outdbg.c compiler.h insnsi.h nasm.h nasmlib.h \ outform.h pptok.h preproc.h regs.h +output/outelf.$(O): output/outelf.c compiler.h insnsi.h nasm.h nasmlib.h \ + output/dwarf.h output/elfcommon.h output/outelf.h pptok.h preproc.h regs.h output/outelf32.$(O): output/outelf32.c compiler.h insnsi.h nasm.h nasmlib.h \ - outform.h outlib.h pptok.h preproc.h raa.h rbtree.h regs.h saa.h stdscan.h + outform.h outlib.h output/dwarf.h output/elf32.h output/elfcommon.h \ + output/outelf.h pptok.h preproc.h raa.h rbtree.h regs.h saa.h stdscan.h output/outelf64.$(O): output/outelf64.c compiler.h insnsi.h nasm.h nasmlib.h \ - outform.h outlib.h pptok.h preproc.h raa.h rbtree.h regs.h saa.h stdscan.h + outform.h outlib.h output/dwarf.h output/elf64.h output/elfcommon.h \ + output/outelf.h pptok.h preproc.h raa.h rbtree.h regs.h saa.h stdscan.h output/outieee.$(O): output/outieee.c compiler.h insnsi.h nasm.h nasmlib.h \ outform.h pptok.h preproc.h regs.h output/outmacho.$(O): output/outmacho.c compiler.h insnsi.h nasm.h nasmlib.h \ diff --git a/output/elf32.h b/output/elf32.h index ff5e863f..e9589b0a 100644 --- a/output/elf32.h +++ b/output/elf32.h @@ -1,7 +1,7 @@ #ifndef OUTPUT_ELF32_H #define OUTPUT_ELF32_H -#include "elfcommon.h" +#include "output/elfcommon.h" /* ELF standard typedefs (yet more proof that was way overdue) */ typedef uint16_t Elf32_Half; diff --git a/output/elf64.h b/output/elf64.h index 626a24ec..8df6e6fe 100644 --- a/output/elf64.h +++ b/output/elf64.h @@ -1,7 +1,7 @@ #ifndef OUTPUT_ELF64_H #define OUTPUT_ELF64_H -#include "elfcommon.h" +#include "output/elfcommon.h" /* ELF standard typedefs (yet more proof that was way overdue) */ typedef uint16_t Elf64_Half; diff --git a/output/outelf.c b/output/outelf.c index 69acf3f4..d13fb98a 100644 --- a/output/outelf.c +++ b/output/outelf.c @@ -10,9 +10,9 @@ #include "nasm.h" -#include "elfcommon.h" -#include "dwarf.h" -#include "outelf.h" +#include "output/elfcommon.h" +#include "output/dwarf.h" +#include "output/outelf.h" const struct elf_known_section elf_known_sections[] = { { ".text", SHT_PROGBITS, SHF_ALLOC|SHF_EXECINSTR, 16 }, diff --git a/output/outelf32.c b/output/outelf32.c index f413c236..6e4b20d0 100644 --- a/output/outelf32.c +++ b/output/outelf32.c @@ -24,9 +24,9 @@ #include "outlib.h" #include "rbtree.h" -#include "elf32.h" -#include "dwarf.h" -#include "outelf.h" +#include "output/elf32.h" +#include "output/dwarf.h" +#include "output/outelf.h" #ifdef OF_ELF32 diff --git a/output/outelf64.c b/output/outelf64.c index 4b2325fa..80fba870 100644 --- a/output/outelf64.c +++ b/output/outelf64.c @@ -23,9 +23,9 @@ #include "outlib.h" #include "rbtree.h" -#include "elf64.h" -#include "dwarf.h" -#include "outelf.h" +#include "output/elf64.h" +#include "output/dwarf.h" +#include "output/outelf.h" #ifdef OF_ELF64 -- 2.11.4.GIT