]> www.ginac.de Git - cln.git/blob - src/Makefile.in
Cater to the fact that g++ 4.3 will use a different naming for
[cln.git] / src / Makefile.in
1 # Makefile for cln/src
2
3 #### Start of system configuration section. ####
4
5 # Directories used by "make":
6 srcdir = @srcdir@
7 top_srcdir = @top_srcdir@
8
9 # Directories used by "make install":
10 prefix = @prefix@
11 local_prefix = /usr/local
12 exec_prefix = @exec_prefix@
13 datarootdir = @datarootdir@
14 datadir = @datadir@
15 libdir = @libdir@
16 includedir = @includedir@
17 mandir = @mandir@
18 DESTDIR =
19
20 # Programs used by "make":
21 # C compiler
22 CC = @CC@
23 CFLAGS = @CFLAGS@
24 CPP = @CPP@
25 CPPFLAGS = @CPPFLAGS@
26 # C++ compiler
27 CXX = @CXX@
28 CXXFLAGS = @CXXFLAGS@
29 CXXCPP = @CXXCPP@
30 INCLUDES = -I../include -I${top_srcdir}/include
31 override CPPFLAGS += ${INCLUDES}
32 LDFLAGS = @LDFLAGS@
33 LIBS = @LIBS@
34 LIBTOOL = @LIBTOOL@
35 LIBTOOL_COMPILE = ${LIBTOOL} --mode=compile
36 LIBTOOL_LINK = ${LIBTOOL} --mode=link
37 LIBTOOL_INSTALL = ${LIBTOOL} --mode=install
38 LIBTOOL_UNINSTALL = ${LIBTOOL} --mode=uninstall
39 AR = ar
40 AR_FLAGS = rc
41 RANLIB = @RANLIB@
42 MV = mv
43 LN = ln
44 RM = rm -f
45 MKDIR = mkdir -p
46 @SET_MAKE@
47 # Libtool's library interface versions:
48 CL_CURRENT = @CL_CURRENT@
49 CL_REVISION = @CL_REVISION@
50 CL_AGE = @CL_AGE@
51
52 # Programs used by "make install":
53 INSTALL = @INSTALL@
54 INSTALL_PROGRAM = @INSTALL_PROGRAM@
55 INSTALL_DATA = @INSTALL_DATA@
56
57 #### End of system configuration section. ####
58
59 SHELL = /bin/sh
60
61 # Needed by ${LIBTOOL}.
62 top_builddir = ..
63
64 # When this Makefile is called with SUBDIR=some_subdirectory, it builds
65 # only the object files belonging to sources in that subdirectory. The
66 # final library is built only if SUBDIR=.
67 SUBDIR = .
68
69 # Define the search path for sources.
70 # The variable ${aux_srcdir} is needed because new versions of aufoconf tend to
71 # remove ${srcdir}, ${srcdir} and so on...
72 aux_srcdir = @srcdir@
73 VPATH = ${aux_srcdir}/${SUBDIR}
74
75 # Add subdirectory specific flags.
76 include ${srcdir}/${SUBDIR}/Makeflags
77 override CPPFLAGS += ${SUBDIR_INCLUDES}
78
79 # Need to know the system name.
80 SYSTEM := $(shell uname -s)
81
82 FILES_CC := $(notdir $(wildcard ${srcdir}/${SUBDIR}/*.cc))
83 FILES_CC := $(filter-out %.i.cc, ${FILES_CC})
84 ASMFILES_CC := $(patsubst cl_asm_@host_cpu@_%.cc,cl_asm_%.cc, $(filter cl_asm_@host_cpu@_%.cc, ${FILES_CC}))
85 FILES_CC := $(filter-out cl_asm_%.cc, ${FILES_CC})
86
87 FILES_I_CC := $(patsubst %.cc,%.i.cc,${FILES_CC})
88
89 FILES_S := $(patsubst %.cc,%.s,${FILES_CC})
90
91 FILES_LO := $(patsubst %.cc,%.lo,${FILES_CC})
92
93 ASMFILES_S := $(patsubst %.cc,%.s,${ASMFILES_CC})
94
95 ASMFILES_LO := $(patsubst %.cc,%.lo,${ASMFILES_CC})
96
97 OBJECTS_LO = ${FILES_LO} ${ASMFILES_LO}
98
99 SUBDIRS := $(patsubst ${srcdir}/%/.,%,$(wildcard ${srcdir}/${SUBDIR}/*/.))
100 # Avoid certain subdirectories:
101 #   private/ and old/ don't contain valid sources,
102 #   CVS/, RCS/ and SCCS/ are created when people put the sources under version control,
103 #   ii_files/ is created during "make" by SGI C++.
104 SUBDIRS := $(filter-out old ./old private ./private CVS %/CVS RCS %/RCS SCCS %/SCCS ii_files ./ii_files,${SUBDIRS})
105
106 SUBDIRS_TARGET := $(patsubst %,%.target,${SUBDIRS})
107 SUBDIRS_DIRDEP := $(patsubst %,%.dirdep,${SUBDIRS})
108
109 ifeq (${SUBDIR},.)
110 ALLFILES_CC := $(notdir $(wildcard ${srcdir}/*.cc) $(foreach subdir,${SUBDIRS}, $(wildcard ${srcdir}/${subdir}/*.cc) $(wildcard ${srcdir}/${subdir}/*/*.cc) $(wildcard ${srcdir}/${subdir}/*/*/*.cc)))
111 ALLFILES_CC := $(filter-out %.i.cc, ${ALLFILES_CC})
112 ALLASMFILES_CC := $(patsubst cl_asm_@host_cpu@_%.cc,cl_asm_%.cc, $(filter cl_asm_@host_cpu@_%.cc, ${ALLFILES_CC}))
113 ALLFILES_CC := $(filter-out cl_asm_%.cc, ${ALLFILES_CC})
114 ALLFILES_LO := $(patsubst %.cc,%.lo,${ALLFILES_CC})
115 ALLASMFILES_LO := $(patsubst %.cc,%.lo,${ALLASMFILES_CC})
116 ALLOBJECTS_LO = ${ALLFILES_LO} ${ALLASMFILES_LO}
117
118 all : ${OBJECTS_LO} ${SUBDIRS_TARGET} libcln.la
119 else
120 all : ${OBJECTS_LO} ${SUBDIRS_TARGET}
121 endif
122
123 alls : ${FILES_S} ${ASMFILES_S}
124
125 allo : ${FILES_LO} ${ASMFILES_LO}
126
127 ASMFLAGS := @ASMFLAGS@
128 ifeq (@AS_UNDERSCORE@,true)
129 ASMFLAGS += -DUNDERSCORE
130 endif
131
132 # Rules for normal compilation.
133
134 %.lo : %.c
135         ${LIBTOOL_COMPILE} ${CC} ${CFLAGS} ${CPPFLAGS} ${TARGET_ARCH} -c $<
136
137 %.lo : %.cc
138         ${LIBTOOL_COMPILE} ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${TARGET_ARCH} -c $<
139
140 # Rules for normal compilation, only needed for debugging.
141
142 %.s : %.c
143         ${CC} ${CFLAGS} ${CPPFLAGS} ${TARGET_ARCH} -S $< -o $@
144
145 %.s : %.cc
146         ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${TARGET_ARCH} -S $< -o $@
147
148 # Rules for preprocessing.
149
150 %.i : %.c
151         ${CPP} ${CFLAGS} ${CPPFLAGS} ${TARGET_ARCH} $< > $@
152
153 %.i.cc : %.cc
154         ${CXXCPP} ${CXXFLAGS} ${CPPFLAGS} ${TARGET_ARCH} $< > $@
155
156 # Rules for assembly language files,
157
158 ifneq (${ASMFILES_LO},)
159
160 ifneq ($(filter @host_cpu@,sparc sparc64),)
161 ${ASMFILES_S} : %.s : %.cc
162         ${CXXCPP} ${CXXFLAGS} ${CPPFLAGS} ${TARGET_ARCH} ${ASMFLAGS} $< | grep -v '^#' | grep -v '^ *#line' | sed -e 's/\([.%]\) /\1/g' -e 's/ , /,/g' -e 's/ :/:/g' -e 's/\$$/#/g' > $@
163 else
164 ifeq (@host_cpu@,m68k)
165 ${ASMFILES_S} : %.s : %.cc
166 ifeq (@AS_UNDERSCORE@,true)
167         ${CXXCPP} ${CXXFLAGS} ${CPPFLAGS} ${TARGET_ARCH} -P ${ASMFLAGS} $< | sed -e 's/\\#/#/g' -e 's/\$$//g' > $@
168 else
169         ${CXXCPP} ${CXXFLAGS} ${CPPFLAGS} ${TARGET_ARCH} -P ${ASMFLAGS} $< | sed -e 's/\\#/#/g' -e 's/\$$/%/g' > $@
170 endif
171 else
172 ifeq (@host_cpu@,hppa)
173 ${ASMFILES_S} : %.s : %.cc
174         -${CXXCPP} ${CXXFLAGS} ${CPPFLAGS} ${TARGET_ARCH} -P ${ASMFLAGS} $< > $@
175 else
176 ${ASMFILES_S} : %.s : %.cc
177         ${CXXCPP} ${CXXFLAGS} ${CPPFLAGS} ${TARGET_ARCH} -P ${ASMFLAGS} $< > $@
178 endif
179 endif
180 endif
181
182 ifeq (@host_cpu@,hppa)
183 # Only the native as groks the .SHORTDATA statements
184 ${ASMFILES_LO} : %.lo : %.s
185         ${LIBTOOL_COMPILE} ${CC} ${CFLAGS} ${TARGET_ARCH} -c $< \
186         || COMPILER_PATH=/usr/ccs/bin ${LIBTOOL_COMPILE} ${CC} ${CFLAGS} ${TARGET_ARCH} -c $< \
187         || COMPILER_PATH=/bin ${LIBTOOL_COMPILE} ${CC} ${CFLAGS} ${TARGET_ARCH} -c $<
188 else
189 ${ASMFILES_LO} : %.lo : %.s
190         ${LIBTOOL_COMPILE} ${CC} ${CFLAGS} ${ASMFLAGS} ${TARGET_ARCH} -c $<
191 endif
192
193 endif
194
195
196 # Recurse into subdirectories
197 ${SUBDIRS_TARGET} : %.target : %.dirdep
198         ${MAKE} SUBDIR=$*
199
200 ${SUBDIRS_DIRDEP} : %.dirdep :
201
202
203 ifeq (${SUBDIR},.)
204
205 ${ALLOBJECTS_LO} : ${SUBDIRS_TARGET}
206
207 libcln.la : ${LIBTOOL} ${ALLOBJECTS_LO}
208         echo ${ALLOBJECTS_LO} | tr ' ' '\n' > libcln.objectlist
209         ${LIBTOOL_LINK} ${CXX} -o libcln.la -rpath ${libdir} -version-info ${CL_CURRENT}:${CL_REVISION}:${CL_AGE} ${LDFLAGS} ${LIBS} -objectlist libcln.objectlist
210
211 install : all force
212         ${MKDIR} ${DESTDIR}${libdir}
213         ${LIBTOOL_INSTALL} ${INSTALL_PROGRAM} libcln.la ${DESTDIR}${libdir}/libcln.la
214         ${MKDIR} ${DESTDIR}${includedir}/cln
215         ${INSTALL_DATA} ${top_srcdir}/include/cln/*.h ${DESTDIR}${includedir}/cln
216         ${INSTALL_DATA} ../include/cln/*.h ${DESTDIR}${includedir}/cln
217
218 installdirs : force
219         ${MKDIR} ${DESTDIR}${libdir}
220         ${MKDIR} ${DESTDIR}${includedir}/cln
221
222 uninstall : force
223         ${LIBTOOL_UNINSTALL} ${RM} ${DESTDIR}${libdir}/libcln.la
224         ${RM} -r ${DESTDIR}${includedir}/cln
225
226 check : all
227
228 mostlyclean : clean
229
230 clean : force
231         ${RM} *.s *.o *.lo *.a *.la *.objectlist core
232         ${RM} -r .libs _libs
233
234 distclean : clean
235         ${RM} config.status config.log config.cache Makefile
236
237 maintainer-clean : distclean
238
239 endif
240
241 force :