diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-11-22 13:41:11 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-11-22 13:41:11 +0000 |
commit | 9608320702e8dba9947987cd34001824638c434e (patch) | |
tree | 4352f820543cb2755ff8d6cfa2d9a0e7d0fc7544 /c/src/libchip/serial | |
parent | Small patch (rtems-rc-19991117-5.diff) from Ralf Corsepius (diff) | |
download | rtems-9608320702e8dba9947987cd34001824638c434e.tar.bz2 |
Patch rtems-rc-19991117-4.diff from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
.. a major configuration cleanup
... major enhancement of automake support.
... and it contains a *major* breakthough:
Automake support for libchip and libmisc *LEAF* directories.
To implement this I have used several nasty tricks
* The basical trick is to wrap an old Makefile.in's contents into a
Makefile.am and still continue to use (i.e include) the old
*.cfg files.
* Replaced each INSTALL_IF_CHANGE and INSTALL_VARIANT with make
dependencies
* Add a gnu-make ifdef AUTOMAKE to main.cfg to avoid conflicts between
automake and RTEMS make rules
* Replaced each install:: and preinstall:: rule with make dependencies
* Replaced SUB_DIRS with SUBDIRS in all Makefile.ins (Automake
convention)
* Removed each manually added autoconf substitution which automake
performs automatically.
This is not yet full automake support, because using the temporary
installation directory, preinstallation in general and building variants
are in contradiction to automake's basic working principles ...
... the new Makefile.ams work still somewhat clumsy
... nevertheless they work (quite well).
WARNING:
At first glance this patch is small, but
* it affects the whole configuration system.
* it opens the road to introducing automake to all Makefile.ins
currently not being under automake control.
JOEL> Does this remove or add any files?
Both, all Makefile.ins below libchip and libmisc get replaced with
Makefile.ams.
Diffstat (limited to 'c/src/libchip/serial')
-rw-r--r-- | c/src/libchip/serial/Makefile.am | 56 | ||||
-rw-r--r-- | c/src/libchip/serial/Makefile.in | 75 |
2 files changed, 56 insertions, 75 deletions
diff --git a/c/src/libchip/serial/Makefile.am b/c/src/libchip/serial/Makefile.am new file mode 100644 index 0000000000..2f4a16f697 --- /dev/null +++ b/c/src/libchip/serial/Makefile.am @@ -0,0 +1,56 @@ +# +# $Id$ +# + +AUTOMAKE_OPTIONS = foreign 1.4 + +LIBNAME = libserialio +LIB = ${ARCH}/${LIBNAME}.a + +C_FILES = mc68681.c mc68681_baud.c mc68681_reg.c mc68681_reg2.c \ + mc68681_reg4.c mc68681_reg8.c ns16550.c z85c30.c z85c30_reg.c \ + serprobe.c termios_baud2index.c termios_baud2num.c +C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o) + +H_FILES = mc68681_p.h ns16550_p.h sersupp.h z85c30_p.h +INSTALLED_H_FILES = mc68681.h ns16550.h z85c30.h serial.h +noinst_HEADERS = $(H_FILES) $(INSTALLED_H_FILES) + +SRCS = $(C_FILES) $(H_FILES) +OBJS = $(C_O_FILES) + +include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg +include $(RTEMS_ROOT)/make/lib.cfg + +PREINSTALL_FILES = \ +$(PROJECT_INCLUDE)/libchip \ +$(INSTALLED_H_FILES:%=$(PROJECT_INCLUDE)/libchip/%) + +TMPINSTALL_FILES = \ +$(PROJECT_RELEASE)/lib/$(LIBNAME)$(LIBSUFFIX_VA) + +$(PROJECT_INCLUDE)/libchip: + @$(mkinstalldirs) $@ +$(PROJECT_INCLUDE)/libchip/%.h: %.h + $(INSTALL_DATA) $< $@ + +# +# Add local stuff here using += +# + +AM_CFLAGS += $(LIBC_DEFINES) + +$(LIB): $(SRCS) ${OBJS} + $(make-library) + +$(PROJECT_RELEASE)/lib/$(LIBNAME)$(LIBSUFFIX_VA): $(LIB) + $(INSTALL_DATA) $< $@ + +all: ${ARCH} $(PREINSTALL_FILES) $(TMPINSTALL_FILES) + +DOC_FILES = \ +README.mc68681 README.ns16550 README.xr88681 README.z85c30 STATUS + +EXTRA_DIST += $(C_FILES) $(DOC_FILES) + +include $(top_srcdir)/../../../automake/local.am diff --git a/c/src/libchip/serial/Makefile.in b/c/src/libchip/serial/Makefile.in deleted file mode 100644 index ee1d4cede6..0000000000 --- a/c/src/libchip/serial/Makefile.in +++ /dev/null @@ -1,75 +0,0 @@ -# -# $Id$ -# - -@SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -top_builddir = .. -subdir = serial - -RTEMS_ROOT = @RTEMS_ROOT@ -PROJECT_ROOT = @PROJECT_ROOT@ - -VPATH = @srcdir@ - -LIBNAME = libserialio.a -LIB = ${ARCH}/${LIBNAME} - -C_PIECES = mc68681 mc68681_baud mc68681_reg mc68681_reg2 mc68681_reg4 \ - mc68681_reg8 ns16550 z85c30 z85c30_reg serprobe termios_baud2index \ - termios_baud2num - -C_FILES = $(C_PIECES:%=%.c) -C_O_FILES = $(C_PIECES:%=${ARCH}/%.o) - -INSTALLED_H_FILES = $(srcdir)/mc68681.h $(srcdir)/ns16550.h \ - $(srcdir)/z85c30.h $(srcdir)/serial.h -SRCS = $(C_FILES) $(H_FILES) $(SYS_H_FILES) $(RTEMS_H_FILES) \ - $(PRIVATE_H_FILES) -OBJS = $(C_O_FILES) - -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)/libchip - -$(INSTALLDIRS): - @$(mkinstalldirs) $(INSTALLDIRS) - -# -# 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) $(PROJECT_INCLUDE)/libchip - @$(INSTALL_CHANGE) -m 644 $(INSTALLED_H_FILES) $(PROJECT_INCLUDE)/libchip - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status |