source: rtems/cpukit/libcsupport/Makefile.am @ 42f22f84

4.104.114.84.95
Last change on this file since 42f22f84 was 42f22f84, checked in by Ralf Corsepius <ralf.corsepius@…>, on Nov 20, 2003 at 7:10:58 AM

2003-11-20 Ralf Corsepius <corsepiu@…>

  • src/config.h: Remove.
  • src/Makefile.am: AM_CPPFLAGS += -I$(top_builddir).
  • Property mode set to 100644
File size: 5.1 KB
Line 
1##
2##  $Id$
3##
4
5include $(top_srcdir)/automake/multilib.am
6include $(top_srcdir)/automake/compile.am
7include $(top_srcdir)/automake/lib.am
8
9include_HEADERS = include/chain.h include/console.h include/clockdrv.h \
10    include/iosupp.h include/ringbuf.h include/rtc.h \
11    include/spurious.h include/timerdrv.h include/vmeintr.h
12
13if NEED_STDINT_H
14LIBC_HFILES = include/stdint.h
15endif
16if NEED_INTTYPES_H
17LIBC_HFILES += include/inttypes.h
18endif
19include_HEADERS += $(LIBC_HFILES)
20
21PREINSTALL_FILES = $(PROJECT_INCLUDE) \
22    $(include_HEADERS:include/%=$(PROJECT_INCLUDE)/%)
23
24$(PROJECT_INCLUDE):
25        @$(mkinstalldirs) $@
26$(PROJECT_INCLUDE)/motorola:
27        @$(mkinstalldirs) $@
28$(PROJECT_INCLUDE)/rtems:
29        @$(mkinstalldirs) $@
30$(PROJECT_INCLUDE)/sys:
31        @$(mkinstalldirs) $@
32$(PROJECT_INCLUDE)/zilog:
33        @$(mkinstalldirs) $@
34
35$(PROJECT_INCLUDE)/%.h: include/%.h
36        $(INSTALL_DATA) $< $@
37
38## motorola
39
40include_motoroladir = $(includedir)/motorola
41
42include_motorola_HEADERS = include/motorola/mc68230.h include/motorola/mc68681.h
43
44PREINSTALL_FILES += $(PROJECT_INCLUDE)/motorola \
45    $(include_motorola_HEADERS:include/%=$(PROJECT_INCLUDE)/%)
46
47## rtems
48include_rtemsdir = $(includedir)/rtems
49
50include_rtems_HEADERS = \
51    include/rtems/assoc.h include/rtems/error.h include/rtems/libcsupport.h \
52    include/rtems/libio.h include/rtems/libio_.h \
53    include/rtems/termiostypes.h
54
55PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems \
56    $(include_rtems_HEADERS:include/%=$(PROJECT_INCLUDE)/%)
57
58## sys
59
60include_sysdir = $(includedir)/sys
61
62if NEWLIB
63NEWLIB_H_FILES = include/sys/termios.h include/sys/utsname.h
64endif
65
66if NEED_SYS_CDEFS_H
67SYS_H_FILES = include/sys/cdefs.h
68endif
69
70# FIXME: We should not install to include/sys unless using newlib.
71include_sys_HEADERS = \
72include/sys/filio.h \
73include/sys/ioccom.h \
74include/sys/ioctl.h \
75include/sys/sockio.h \
76include/sys/termios.h \
77include/sys/ttycom.h \
78$(SYS_H_FILES) \
79$(NEWLIB_H_FILES)
80
81PREINSTALL_FILES += $(PROJECT_INCLUDE)/sys \
82    $(include_sys_HEADERS:include/%=$(PROJECT_INCLUDE)/%)
83
84## zilog
85
86include_zilogdir = $(includedir)/zilog
87
88include_zilog_HEADERS = include/zilog/z8036.h include/zilog/z8530.h \
89    include/zilog/z8536.h
90
91PREINSTALL_FILES += $(PROJECT_INCLUDE)/zilog \
92    $(include_zilog_HEADERS:include/%=$(PROJECT_INCLUDE)/%)
93
94##  General stuff
95all-local: $(PREINSTALL_FILES)
96
97LIB = ${ARCH}/libcsupport.a
98
99AM_CPPFLAGS += -I$(top_builddir)
100
101ERROR_C_FILES = src/error.c
102
103ASSOCIATION_C_FILES = src/assoc.c src/assocnamebad.c
104
105BASE_FS_C_FILES = src/base_fs.c src/mount.c src/unmount.c src/libio.c \
106    src/libio_sockets.c src/eval.c src/fs_null_handlers.c src/privateenv.c
107
108TERMIOS_C_FILES = src/cfgetispeed.c src/cfgetospeed.c src/cfsetispeed.c \
109    src/cfsetospeed.c src/tcgetattr.c src/tcsetattr.c src/tcdrain.c \
110    src/tcflow.c src/tcflush.c src/tcgetprgrp.c src/tcsendbreak.c \
111    src/tcsetpgrp.c src/termios.c src/termiosinitialize.c \
112    src/termiosreserveresources.c
113
114SYSTEM_CALL_C_FILES = src/open.c src/close.c src/read.c src/write.c \
115    src/lseek.c src/ioctl.c src/mkdir.c src/mknod.c src/mkfifo.c src/rmdir.c \
116    src/chdir.c src/chmod.c src/fchdir.c src/fchmod.c src/chown.c src/link.c \
117    src/unlink.c src/umask.c src/ftruncate.c src/utime.c src/fstat.c \
118    src/fcntl.c src/fpathconf.c src/getdents.c src/fsync.c src/fdatasync.c \
119    src/pipe.c src/dup.c src/dup2.c src/symlink.c src/readlink.c src/creat.c \
120    src/chroot.c src/sync.c
121
122DIRECTORY_SCAN_C_FILES = src/opendir.c src/closedir.c src/readdir.c \
123    src/readdir_r.c src/rewinddir.c src/scandir.c src/seekdir.c \
124    src/telldir.c src/getcwd.c
125
126ID_C_FILES = src/getegid.c src/geteuid.c src/getgid.c src/getgroups.c \
127    src/getlogin.c src/getpgrp.c \
128    src/getpid.c src/getppid.c src/getuid.c src/setpgid.c src/setsid.c
129
130MALLOC_C_FILES = src/malloc.c src/mallocfreespace.c src/__brk.c src/__sbrk.c
131
132PASSWORD_GROUP_C_FILES = src/getpwent.c
133
134TERMINAL_IDENTIFICATION_C_FILES = src/ctermid.c src/isatty.c src/ttyname.c \
135    src/ttyname_r.c
136
137LIBC_GLUE_C_FILES = src/__getpid.c src/__gettod.c src/__times.c \
138    src/truncate.c src/access.c src/stat.c src/lstat.c src/pathconf.c \
139    src/newlibc.c src/no_posix.c src/no_libc.c src/utsname.c
140
141UNIX_LIBC_C_FILES = src/unixlibc.c src/hosterr.c
142
143BSD_LIBC_C_FILES = src/strlcpy.c src/strlcat.c
144
145COMMON_C_FILES = src/gxx_wrappers.c src/printk.c \
146    $(BSD_LIBC_C_FILES) \
147    $(BASE_FS_C_FILES) \
148    $(MALLOC_C_FILES) $(TERMIOS_C_FILES) $(ERROR_C_FILES) \
149    $(ASSOCIATION_C_FILES)
150
151UNIX_C_FILES = $(UNIX_LIBC_C_FILES)
152
153EMBEDDED_C_FILES = $(LIBC_GLUE_C_FILES) $(PASSWORD_GROUP_C_FILES) \
154    $(TERMINAL_IDENTIFICATION_C_FILES) $(SYSTEM_CALL_C_FILES) \
155    $(DIRECTORY_SCAN_C_FILES) $(ID_C_FILES)
156
157if UNIX
158C_FILES = $(COMMON_C_FILES) $(UNIX_C_FILES)
159else
160C_FILES = $(COMMON_C_FILES) $(EMBEDDED_C_FILES)
161endif
162
163OBJS = $(C_FILES:src/%.c=${ARCH}/%.$(OBJEXT))
164
165#
166# Add local stuff here using +=
167#
168
169AM_CFLAGS += $(LIBC_DEFINES)
170
171all-local: ${ARCH} ${LIB}
172
173${ARCH}/%.$(OBJEXT): src/%.c
174        ${COMPILE} -o $@ -c $<
175
176$(LIB): ${OBJS}
177        $(make-library)
178
179DOC_FILES = src/TODO src/CASES
180
181EXTRA_DIST = $(DOC_FILES) $(COMMON_C_FILES) $(EMBEDDED_C_FILES) \
182    $(UNIX_C_FILES)
183
184include $(top_srcdir)/automake/local.am
Note: See TracBrowser for help on using the repository browser.