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