mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-27 15:00:16 +00:00
123 lines
3.6 KiB
Makefile
123 lines
3.6 KiB
Makefile
#
|
|
# $Id$
|
|
#
|
|
|
|
@SET_MAKE@
|
|
srcdir = @srcdir@
|
|
top_srcdir = @top_srcdir@
|
|
top_builddir = ..
|
|
subdir = libc
|
|
|
|
RTEMS_ROOT = @RTEMS_ROOT@
|
|
PROJECT_ROOT = @PROJECT_ROOT@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
LIBNAME = libcsupport.a
|
|
LIB = ${ARCH}/${LIBNAME}
|
|
|
|
ERROR_C_PIECES=error
|
|
|
|
ASSOCIATION_C_PIECES=assoc assocnamebad
|
|
|
|
BASE_FS_C_PIECES = base_fs mount unmount ioman libio libio_sockets eval \
|
|
fs_null_handlers
|
|
|
|
IMFS_C_PIECES = imfs_chown imfs_creat imfs_directory imfs_eval imfs_free \
|
|
imfs_fsunmount imfs_gtkn imfs_init imfs_initsupp 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_device \
|
|
imfs_handlers_directory imfs_handlers_memfile imfs_debug imfs_symlink \
|
|
imfs_readlink imfs_fdatasync imfs_fcntl miniimfs_init
|
|
|
|
TERMIOS_C_PIECES = cfgetispeed cfgetospeed cfsetispeed cfsetospeed tcgetattr \
|
|
tcsetattr tcdrain tcflow tcflush termios \
|
|
termiosinitialize termiosreserveresources
|
|
|
|
SYSTEM_CALL_C_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 \
|
|
creat isatty
|
|
|
|
DIRECTORY_SCAN_C_PIECES = opendir closedir readdir rewinddir scandir seekdir \
|
|
telldir getcwd
|
|
|
|
MALLOC_C_PIECES = malloc __brk __sbrk
|
|
|
|
PASSWORD_GROUP_C_PIECES = getpwent getgrent
|
|
|
|
LIBC_GLUE_C_PIECES = __gettod __times truncate access stat lstat pathconf \
|
|
newlibc no_libc
|
|
|
|
UNIX_LIBC_C_PIECES = unixlibc hosterr
|
|
|
|
# C and C++ source names, if any, go here -- minus the .c or .cc
|
|
UNIX_C_PIECES = $(UNIX_LIBC_C_PIECES) $(BASE_FS_C_PIECES) $(MALLOC_C_PIECES) \
|
|
$(TERMIOS_C_PIECES) $(ERROR_C_PIECES) $(ASSOCIATION_C_PIECES)
|
|
|
|
EMBEDDED_C_PIECES = $(LIBC_GLUE_C_PIECES) $(BASE_FS_C_PIECES) \
|
|
$(MALLOC_C_PIECES) $(PASSWORD_GROUP_C_PIECES) $(TERMIOS_C_PIECES) \
|
|
$(SYSTEM_CALL_C_PIECES) $(DIRECTORY_SCAN_C_PIECES) $(IMFS_C_PIECES) \
|
|
$(ERROR_C_PIECES) $(ASSOCIATION_C_PIECES)
|
|
|
|
|
|
@UNIX_TRUE@C_PIECES = $(UNIX_C_PIECES)
|
|
@UNIX_FALSE@C_PIECES = $(EMBEDDED_C_PIECES)
|
|
C_FILES = $(C_PIECES:%=%.c)
|
|
C_O_FILES = $(C_PIECES:%=${ARCH}/%.o)
|
|
|
|
H_FILES = $(srcdir)/libcsupport.h $(srcdir)/imfs.h
|
|
SYS_H_FILES =
|
|
RTEMS_H_FILES = $(srcdir)/assoc.h $(srcdir)/error.h $(srcdir)/libio.h
|
|
|
|
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
|
|
include $(RTEMS_ROOT)/make/lib.cfg
|
|
|
|
INSTALL_CHANGE = @INSTALL_CHANGE@
|
|
mkinstalldirs = $(SHELL) $(top_srcdir)/@RTEMS_TOPdir@/mkinstalldirs
|
|
|
|
INSTALLDIRS = $(PROJECT_INCLUDE)/rtems $(PROJECT_INCLUDE)/sys \
|
|
$(PROJECT_INCLUDE)
|
|
|
|
$(INSTALLDIRS):
|
|
@$(mkinstalldirs) $(INSTALLDIRS)
|
|
|
|
SRCS = $(C_FILES) $(H_FILES) $(SYS_H_FILES) $(RTEMS_H_FILES)
|
|
OBJS = $(C_O_FILES)
|
|
|
|
#
|
|
# 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:
|
|
@$(mkinstalldirs) $(INSTALLDIRS)
|
|
@$(INSTALL_CHANGE) -m 644 $(RTEMS_H_FILES) $(PROJECT_INCLUDE)/rtems
|
|
@$(INSTALL_CHANGE) -m 644 $(H_FILES) $(PROJECT_INCLUDE)
|
|
@$(INSTALL_CHANGE) -m 644 $(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
|