1 ## Process this file with automake to produce Makefile.in
2 ## =====================================================================
6 ## Host side implementation of the eCos infrastructure
8 ## =====================================================================
9 #######ECOSHOSTGPLCOPYRIGHTBEGIN####
10 ## ----------------------------------------------------------------------------
11 # Copyright (C) 2002 Bart Veer
12 # Copyright (C) 1998, 1999, 2000, 2001 Red Hat, Inc.
14 # This file is part of the eCos host tools.
16 # This program is free software; you can redistribute it and/or modify it
17 # under the terms of the GNU General Public License as published by the Free
18 # Software Foundation; either version 2 of the License, or (at your option)
21 # This program is distributed in the hope that it will be useful, but WITHOUT
22 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
23 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
26 # You should have received a copy of the GNU General Public License along with
27 # this program; if not, write to the Free Software Foundation, Inc.,
28 # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
30 ## ----------------------------------------------------------------------------
31 #######ECOSHOSTGPLCOPYRIGHTEND####
32 ## =====================================================================
33 #######DESCRIPTIONBEGIN####
40 ######DESCRIPTIONEND####
41 ## =====================================================================
43 AUTOMAKE_OPTIONS = 1.3 foreign
46 ## The generated makefile is responsible for the following:
48 ## 1) copy across the shared header files cyg_type.h, cyg_ass.h and
49 ## cyg_trac.h from the include directory into the appropriate part
52 ## 2) on the target side the infrastructure headers depend on
53 ## the configuration system via <pkgconf/infra.h>, and on the
54 ## HAL package via <cyg/hal/basetype.h>. These two files need
55 ## to be implemented somewhat differently on the host side.
56 ## There are usable versions in the source tree.
58 ## 3) build libcyginfra.a
60 ## 4) allow the whole system to be installed, and all the usual
63 ## The main target is a static library. The problem is naming it
64 ## correctly. automake seems to insist on calling it libcyginfra.a,
65 ## even when compiling it with VC++. Various attempts to use
66 ## cyginfra.lib instead with VC++ have failed. Instead the library
67 ## will always be built as libcyginfra.a, but it may get installed
70 noinst_LIBRARIES = libcyginfra.a
71 libcyginfra_a_SOURCES = assert.cxx \
76 ## Pick up compiler flags etc. from configury
77 INCLUDES = @ecos_INCLUDES@
78 LIBS = @ecos_LIBS@ @ecos_LDADD@
79 AM_CFLAGS = @ecos_CFLAGS@
80 AM_CXXFLAGS = @ecos_CXXFLAGS@
83 all-local: cyginfra.lib
85 cyginfra.lib: libcyginfra.a
91 install-exec-local: all-local
92 $(mkinstalldirs) $(DESTDIR)$(libdir)
93 $(INSTALL) cyginfra.lib $(DESTDIR)$(libdir)/cyginfra.lib
100 install-exec-local: libcyginfra.a
101 $(mkinstalldirs) $(DESTDIR)$(libdir)
102 $(INSTALL) libcyginfra.a $(DESTDIR)$(libdir)/libcyginfra.a
106 ## ----------------------------------------------------------------------------
107 ## The header files do not all belong in the same directory. This
108 ## causes problems with automake. First list the header files.
110 copies = cyg/infra/cyg_type.h \
111 cyg/infra/cyg_ass.h \
112 cyg/infra/cyg_trac.h \
113 cyg/infra/testcase.h \
118 ## The headers are not installed as part of the default install
119 ## target, instead a data hook is used. This avoids problems when the
120 ## appropriate directories do not yet exist in the install tree.
121 noinst_HEADERS = $(copies)
123 install-data-local: $(copies)
124 $(mkinstalldirs) $(DESTDIR)$(includedir) \
125 $(DESTDIR)$(includedir)/cyg \
126 $(DESTDIR)$(includedir)/cyg/infra \
127 $(DESTDIR)$(includedir)/cyg/hal \
128 $(DESTDIR)$(includedir)/pkgconf
129 $(INSTALL_DATA) cyg/infra/cyg_type.h $(DESTDIR)$(includedir)/cyg/infra
130 $(INSTALL_DATA) cyg/infra/cyg_ass.h $(DESTDIR)$(includedir)/cyg/infra
131 $(INSTALL_DATA) cyg/infra/cyg_trac.h $(DESTDIR)$(includedir)/cyg/infra
132 $(INSTALL_DATA) cyg/infra/testcase.h $(DESTDIR)$(includedir)/cyg/infra
133 $(INSTALL_DATA) cyg/hal/basetype.h $(DESTDIR)$(includedir)/cyg/hal
134 $(INSTALL_DATA) pkgconf/infra.h $(DESTDIR)$(includedir)/pkgconf
135 $(INSTALL_DATA) pkgconf/hostinfra.h $(DESTDIR)$(includedir)/pkgconf
137 ## It is necessary to have an extra set of rules to copy the header files
138 ## into the build tree, so that they are in a sensible location when
139 ## building the sources in this package. There are explicit dependencies
140 ## for all the object files on these headers.
142 ## The header file copies should be part of the clean.
143 CLEANFILES = $(copies)
145 cyg/infra/cyg_type.h: cyg_type.h
146 @if [ -d cyg ] ; then true ; else mkdir cyg ; fi
147 @if [ -d cyg/infra ] ; then true ; else mkdir cyg/infra ; fi
148 $(INSTALL_DATA) $(<) $(@)
150 cyg/infra/cyg_ass.h: cyg_ass.h
151 @if [ -d cyg ] ; then true ; else mkdir cyg ; fi
152 @if [ -d cyg/infra ] ; then true ; else mkdir cyg/infra ; fi
153 $(INSTALL_DATA) $(<) $(@)
155 cyg/infra/cyg_trac.h: cyg_trac.h
156 @if [ -d cyg ] ; then true ; else mkdir cyg ; fi
157 @if [ -d cyg/infra ] ; then true ; else mkdir cyg/infra ; fi
158 $(INSTALL_DATA) $(<) $(@)
160 cyg/infra/testcase.h: testcase.h
161 @if [ -d cyg ] ; then true ; else mkdir cyg ; fi
162 @if [ -d cyg/infra ] ; then true ; else mkdir cyg/infra ; fi
163 $(INSTALL_DATA) $(<) $(@)
165 pkgconf/infra.h : infra.h
166 @if [ -d pkgconf ] ; then true ; else mkdir pkgconf ; fi
167 $(INSTALL_DATA) $(<) $(@)
169 pkgconf/hostinfra.h : hostinfra.h
170 @if [ -d pkgconf ] ; then true ; else mkdir pkgconf ; fi
171 $(INSTALL_DATA) $(<) $(@)
173 cyg/hal/basetype.h : basetype.h
174 @if [ -d cyg ] ; then true ; else mkdir cyg ; fi
175 @if [ -d cyg/hal ] ; then true ; else mkdir cyg/hal ; fi
176 $(INSTALL_DATA) $(<) $(@)
178 ## ----------------------------------------------------------------------------
179 ## Add specific dependencies for all source files
181 assert.$(OBJEXT) : Makefile \
183 pkgconf/hostinfra.h \
184 cyg/infra/cyg_type.h \
188 trace.$(OBJEXT) : Makefile \
190 pkgconf/hostinfra.h \
191 cyg/infra/cyg_type.h \
193 cyg/infra/cyg_ass.h \
196 checkdata.$(OBJEXT) : Makefile \
197 cyg/infra/cyg_ass.h \
199 pkgconf/hostinfra.h \
200 cyg/infra/cyg_type.h \
203 testcase.$(OBJEXT): Makefile \
204 cyg/infra/testcase.h \
205 cyg/infra/cyg_type.h \