]> www.ginac.de Git - cln.git/blob - src/Makefile.in
a91e401b116d67745a355d7b3fca693379fca14b
[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
107 # Rule 'all' must be the first in the file.
108 all : _all_
109
110
111 # Recurse into subdirectories
112
113 SUBDIRS_DIRDEP := $(patsubst %,%.dirdep,${SUBDIRS})
114
115 ${SUBDIRS_DIRDEP} : %.dirdep :
116
117
118 # Target 'all' creates all necessary files for $(SUBDIR) and its subdirectories.
119
120 SUBDIRS_TARGET_ALL := $(patsubst %,%.target_all,${SUBDIRS})
121
122 ${SUBDIRS_TARGET_ALL} : %.target_all : %.dirdep
123         ${MAKE} SUBDIR=$* all
124
125 ifeq (${SUBDIR},.)
126 ALLFILES_CC := $(notdir $(wildcard ${srcdir}/*.cc) $(foreach subdir,${SUBDIRS}, $(wildcard ${srcdir}/${subdir}/*.cc) $(wildcard ${srcdir}/${subdir}/*/*.cc) $(wildcard ${srcdir}/${subdir}/*/*/*.cc)))
127 ALLFILES_CC := $(filter-out %.i.cc, ${ALLFILES_CC})
128 ALLASMFILES_CC := $(patsubst cl_asm_@host_cpu@_%.cc,cl_asm_%.cc, $(filter cl_asm_@host_cpu@_%.cc, ${ALLFILES_CC}))
129 ALLFILES_CC := $(filter-out cl_asm_%.cc, ${ALLFILES_CC})
130 ALLFILES_LO := $(patsubst %.cc,%.lo,${ALLFILES_CC})
131 ALLASMFILES_LO := $(patsubst %.cc,%.lo,${ALLASMFILES_CC})
132 ALLOBJECTS_LO = ${ALLFILES_LO} ${ALLASMFILES_LO}
133
134 _all_ : allo-local ${SUBDIRS_TARGET_ALL} libcln.la
135 else
136 _all_ : allo-local ${SUBDIRS_TARGET_ALL}
137 endif
138
139
140 # Target 'alls' creates all .s files for $(SUBDIR) and its subdirectories.
141
142 SUBDIRS_TARGET_ALLS := $(patsubst %,%.target_alls,${SUBDIRS})
143
144 ${SUBDIRS_TARGET_ALLS} : %.target_alls : %.dirdep
145         ${MAKE} SUBDIR=$* alls
146
147 alls : alls-local ${SUBDIRS_TARGET_ALLS}
148
149 alls-local : ${FILES_S} ${ASMFILES_S}
150
151
152 # Target 'allo' creates all .lo files for $(SUBDIR) and its subdirectories.
153 SUBDIRS_TARGET_ALLO := $(patsubst %,%.target_allo,${SUBDIRS})
154
155 ${SUBDIRS_TARGET_ALLO} : %.target_allo : %.dirdep
156         ${MAKE} SUBDIR=$* allo
157
158 allo : allo-local ${SUBDIRS_TARGET_ALLO}
159
160 allo-local : ${FILES_LO} ${ASMFILES_LO}
161
162
163 ASMFLAGS := @ASMFLAGS@
164 ifeq (@AS_UNDERSCORE@,true)
165 ASMFLAGS += -DUNDERSCORE
166 endif
167
168 # Rules for normal compilation.
169
170 %.lo : %.c
171         ${LIBTOOL_COMPILE} ${CC} ${CFLAGS} ${CPPFLAGS} ${TARGET_ARCH} -c $<
172
173 %.lo : %.cc
174         ${LIBTOOL_COMPILE} ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${TARGET_ARCH} -c $<
175
176 # Rules for normal compilation, only needed for debugging.
177
178 %.s : %.c
179         ${CC} ${CFLAGS} ${CPPFLAGS} ${TARGET_ARCH} -S $< -o $@
180
181 %.s : %.cc
182         ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${TARGET_ARCH} -S $< -o $@
183
184 # Rules for preprocessing.
185
186 %.i : %.c
187         ${CPP} ${CFLAGS} ${CPPFLAGS} ${TARGET_ARCH} $< > $@
188
189 %.i.cc : %.cc
190         ${CXXCPP} ${CXXFLAGS} ${CPPFLAGS} ${TARGET_ARCH} $< > $@
191
192 # Rules for assembly language files,
193
194 ifneq (${ASMFILES_LO},)
195
196 ifneq ($(filter @host_cpu@,sparc sparc64),)
197 ${ASMFILES_S} : %.s : %.cc
198         ${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' > $@
199 else
200 ifeq (@host_cpu@,m68k)
201 ${ASMFILES_S} : %.s : %.cc
202 ifeq (@AS_UNDERSCORE@,true)
203         ${CXXCPP} ${CXXFLAGS} ${CPPFLAGS} ${TARGET_ARCH} -P ${ASMFLAGS} $< | sed -e 's/\\#/#/g' -e 's/\$$//g' > $@
204 else
205         ${CXXCPP} ${CXXFLAGS} ${CPPFLAGS} ${TARGET_ARCH} -P ${ASMFLAGS} $< | sed -e 's/\\#/#/g' -e 's/\$$/%/g' > $@
206 endif
207 else
208 ifeq (@host_cpu@,hppa)
209 ${ASMFILES_S} : %.s : %.cc
210         -${CXXCPP} ${CXXFLAGS} ${CPPFLAGS} ${TARGET_ARCH} -P ${ASMFLAGS} $< > $@
211 else
212 ${ASMFILES_S} : %.s : %.cc
213         ${CXXCPP} ${CXXFLAGS} ${CPPFLAGS} ${TARGET_ARCH} -P ${ASMFLAGS} $< > $@
214 endif
215 endif
216 endif
217
218 ifeq (@host_cpu@,hppa)
219 # Only the native as groks the .SHORTDATA statements
220 ${ASMFILES_LO} : %.lo : %.s
221         ${LIBTOOL_COMPILE} ${CC} ${CFLAGS} ${TARGET_ARCH} -c $< \
222         || COMPILER_PATH=/usr/ccs/bin ${LIBTOOL_COMPILE} ${CC} ${CFLAGS} ${TARGET_ARCH} -c $< \
223         || COMPILER_PATH=/bin ${LIBTOOL_COMPILE} ${CC} ${CFLAGS} ${TARGET_ARCH} -c $<
224 else
225 ${ASMFILES_LO} : %.lo : %.s
226         ${LIBTOOL_COMPILE} ${CC} ${CFLAGS} ${ASMFLAGS} ${TARGET_ARCH} -c $<
227 endif
228
229 endif
230
231
232 ifeq (${SUBDIR},.)
233
234 ${ALLOBJECTS_LO} : ${SUBDIRS_TARGET_ALL}
235
236 libcln.la : ${LIBTOOL} ${ALLOBJECTS_LO}
237         echo ${ALLOBJECTS_LO} | tr ' ' '\n' > libcln.objectlist
238         ${LIBTOOL_LINK} ${CXX} -o libcln.la -rpath ${libdir} -version-info ${CL_CURRENT}:${CL_REVISION}:${CL_AGE} ${LDFLAGS} ${LIBS} -objectlist libcln.objectlist
239
240 install : all force
241         ${MKDIR} ${DESTDIR}${libdir}
242         ${LIBTOOL_INSTALL} ${INSTALL_PROGRAM} libcln.la ${DESTDIR}${libdir}/libcln.la
243         ${MKDIR} ${DESTDIR}${includedir}/cln
244         ${INSTALL_DATA} ${top_srcdir}/include/cln/*.h ${DESTDIR}${includedir}/cln
245         ${INSTALL_DATA} ../include/cln/*.h ${DESTDIR}${includedir}/cln
246
247 installdirs : force
248         ${MKDIR} ${DESTDIR}${libdir}
249         ${MKDIR} ${DESTDIR}${includedir}/cln
250
251 uninstall : force
252         ${LIBTOOL_UNINSTALL} ${RM} ${DESTDIR}${libdir}/libcln.la
253         ${RM} -r ${DESTDIR}${includedir}/cln
254
255 check : all
256
257 mostlyclean : clean
258
259 clean : force
260         ${RM} *.s *.o *.lo *.a *.la *.objectlist core
261         ${RM} -r .libs _libs
262
263 distclean : clean
264         ${RM} config.status config.log config.cache Makefile
265
266 maintainer-clean : distclean
267
268 endif
269
270 force :