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