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