source: rtems/cpukit/libcsupport/Makefile.am @ bce9f3b1

Last change on this file since bce9f3b1 was 81df4984, checked in by Ralf Corsepius <ralf.corsepius@…>, on Jan 14, 2003 at 6:41:29 PM

2003-01-10 Ralf Corsepius <corsepiu@…>

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