This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Implementing readdir() question


Hi,

I'm working on a readdir() implementation for a bare-metal target. The
actual implementation will be done in libgloss. I learned that the
"dirent.h" header for the target is maintained under
"newlib/libc/sys/<target>/sys/dirent.h". I have successfully modified
the build system so that my dirent.h does get installed with "make
install". So far, so good.

What I couldn't figure out is how to set up the build system unter
"newlib/libc/sys/<target>" so that I doesn't need to produce a "lib.a"
library there. At the moment I'm compiling an empty C module there to
produce a "lib.a" library from this "Makefile.am":

--------------------------------------------------------------
## Process this file with automake to generate Makefile.in

AUTOMAKE_OPTIONS = cygnus

INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)

AM_CCASFLAGS = $(INCLUDES)

noinst_LIBRARIES = lib.a

# We only want to install dirent.h, but the build system
# seems to force the compilation of a module here
lib_a_SOURCES = dummy.c
lib_a_CCASFLAGS = $(AM_CCASFLAGS)
lib_a_CFLAGS = $(AM_CFLAGS)

ACLOCAL_AMFLAGS = -I ../../.. -I ../../../..
CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
--------------------------------------------------------------

Is it possible to set up this Makefile so that the "dirent.h" header is
installed, but no useless library is built, or is the build of "lib.a" a
must?

Thanks
Stephan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]