# # $Id$ # @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = ../../../.. subdir = c/src/lib/libc INSTALL = @INSTALL@ RTEMS_ROOT = $(top_srcdir)/@RTEMS_TOPdir@ PROJECT_ROOT = @PROJECT_ROOT@ VPATH = @srcdir@ LIBNAME=libcsupport.a LIB=${ARCH}/${LIBNAME} BASE_FS_PIECES=base_fs mount unmount ioman \ libio libio_sockets eval IMFS_PIECES= imfs_chown imfs_creat imfs_directory imfs_eval imfs_free \ imfs_gtkn imfs_init imfs_link imfs_mknod imfs_mount imfs_fchmod \ imfs_rmnod imfs_unlink imfs_unmount imfs_utime imfs_ntype imfs_stat \ imfs_getchild memfile deviceio imfs_handlers imfs_debug imfs_symlink \ imfs_readlink imfs_fdatasync TERMIOS_PIECES= cfgetispeed cfgetospeed cfsetispeed cfsetospeed \ tcgetattr tcsetattr tcdrain termios termiosinitialize \ termiosreserveresources SYSTEM_CALL_PIECES=\ open close read write lseek ioctl \ mkdir mknod mkfifo rmdir chdir \ chmod fchmod chown \ link unlink umask ftruncate utime \ fstat fcntl fpathconf getdents \ fsync fdatasync pipe dup dup2 \ symlink readlink DIRECTORY_SCAN_PIECES=\ opendir closedir readdir rewinddir scandir seekdir telldir getcwd MALLOC_PIECES=\ malloc __brk __sbrk \ LIBC_GLUE_PIECES=\ __gettod __times \ truncate access stat lstat pathconf \ newlibc no_libc UNIX_LIBC_PIECES=unixlibc hosterr C_FILES=$(C_PIECES:%=%.c) C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) H_FILES=$(srcdir)/libcsupport.h SYS_H_FILES= RTEMS_H_FILES=$(srcdir)/libio.h SRCS=$(C_FILES) $(H_FILES) $(SYS_H_FILES) $(RTEMS_H_FILES) OBJS=$(C_O_FILES) include $(RTEMS_ROOT)/make/custom/${RTEMS_BSP}.cfg include $(RTEMS_ROOT)/make/lib.cfg # C and C++ source names, if any, go here -- minus the .c or .cc ifeq ($(RTEMS_CPU),unix) C_PIECES=\ $(UNIX_LIBC_PIECES) \ $(BASE_FS_PIECES) \ $(MALLOC_PIECES) \ $(TERMIOS_PIECES) else C_PIECES=\ $(LIBC_GLUE_PIECES) \ $(BASE_FS_PIECES) \ $(MALLOC_PIECES) \ $(TERMIOS_PIECES) \ $(SYSTEM_CALL_PIECES) \ $(DIRECTORY_SCAN_PIECES) \ $(IMFS_PIECES) endif # # Add local stuff here using += # DEFINES += CPPFLAGS += CFLAGS += $(LIBC_DEFINES) # # Add your list of files to delete here. The config files # already know how to delete some stuff, so you may want # to just run 'make clean' first to see what gets missed. # 'make clobber' already includes 'make clean' # CLEAN_ADDITIONS += $(LIB) CLOBBER_ADDITIONS += all: ${ARCH} preinstall $(LIB) $(INSTALL_VARIANT) -m 644 ${LIB} ${PROJECT_RELEASE}/lib $(LIB): $(SRCS) ${OBJS} $(make-library) # Install the library, appending _g or _p as appropriate. # for include files, just use $(INSTALL_CHANGE) preinstall: $(INSTALL_CHANGE) -m 444 ${RTEMS_H_FILES} $(PROJECT_INCLUDE)/rtems $(INSTALL_CHANGE) -m 444 $(H_FILES) $(PROJECT_INCLUDE) $(INSTALL_CHANGE) -m 444 $(SYS_H_FILES) $(PROJECT_INCLUDE)/sys Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status