blob: e1203966f7476993f6c1f7a8d16997dab3fa881f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
VPATH = @srcdir@
RTEMS_ROOT = @top_srcdir@
PROJECT_ROOT = @PROJECT_ROOT@
INSTALL = @INSTALL@
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
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 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
|