[Newlib] Include subdirectories in Newlib
Posted: Mon Aug 05, 2013 4:27 pm
Hi,
I recently ported Newlib to my OS and I'm currently writing a BSD-like socket API. I have implemented some syscalls (socket, connect, bind, ...) in a source file and created some headers (netinet/in.h, arpa/inet.h, sys/socket.h).
Let's refer to the tutorial OS Specific Toolchain on the Wiki and use its notations. My system-specific header files are in newlib/libc/sys/myos/include/ (these files will eventually go into $PREFIX/i586-pc-myos/include/) and newlib/libc/sys/myos/sys/ (these ones will go into $PREFIX/i586-pc-myos/include/sys/). A problem occurs with netinet/in.h and arpa/inet.h. If I put these files respectively in newlib/libc/sys/myos/include/netinet/ and newlib/libc/sys/myos/include/arpa/, they are not copied on install.
I've remarked that if I previously create the directories netinet and arpa in $PREFIX/i586-pc-myos/include, the files netinet/in.h and arpa/inet.h are copied.
Consequently, I guess that netinet and arpa subdirectories should be created before doing make install (to install Newlib). The question is: shall I do it by hand or does Newlib allow me to do it automatically at make install if I modify some config file?
Thanks in advance for your help.
I recently ported Newlib to my OS and I'm currently writing a BSD-like socket API. I have implemented some syscalls (socket, connect, bind, ...) in a source file and created some headers (netinet/in.h, arpa/inet.h, sys/socket.h).
Let's refer to the tutorial OS Specific Toolchain on the Wiki and use its notations. My system-specific header files are in newlib/libc/sys/myos/include/ (these files will eventually go into $PREFIX/i586-pc-myos/include/) and newlib/libc/sys/myos/sys/ (these ones will go into $PREFIX/i586-pc-myos/include/sys/). A problem occurs with netinet/in.h and arpa/inet.h. If I put these files respectively in newlib/libc/sys/myos/include/netinet/ and newlib/libc/sys/myos/include/arpa/, they are not copied on install.
I've remarked that if I previously create the directories netinet and arpa in $PREFIX/i586-pc-myos/include, the files netinet/in.h and arpa/inet.h are copied.
Consequently, I guess that netinet and arpa subdirectories should be created before doing make install (to install Newlib). The question is: shall I do it by hand or does Newlib allow me to do it automatically at make install if I modify some config file?
Thanks in advance for your help.