3 #### Start of system configuration section. ####
5 # Directories used by "make":
7 top_srcdir = @top_srcdir@
9 # Directories used by "make install":
11 local_prefix = /usr/local
12 exec_prefix = @exec_prefix@
13 datarootdir = @datarootdir@
16 includedir = @includedir@
20 # Programs used by "make":
30 INCLUDES = -I../include -I${top_srcdir}/include
31 override CPPFLAGS += ${INCLUDES}
35 LIBTOOL_COMPILE = ${LIBTOOL} --mode=compile
36 LIBTOOL_LINK = ${LIBTOOL} --mode=link
37 LIBTOOL_INSTALL = ${LIBTOOL} --mode=install
38 LIBTOOL_UNINSTALL = ${LIBTOOL} --mode=uninstall
47 # Libtool's library interface versions:
48 CL_CURRENT = @CL_CURRENT@
49 CL_REVISION = @CL_REVISION@
52 # Programs used by "make install":
54 INSTALL_PROGRAM = @INSTALL_PROGRAM@
55 INSTALL_DATA = @INSTALL_DATA@
57 #### End of system configuration section. ####
61 # Needed by ${LIBTOOL}.
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=.
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...
73 VPATH = ${aux_srcdir}/${SUBDIR}
75 # Add subdirectory specific flags.
76 include ${srcdir}/${SUBDIR}/Makeflags
77 override CPPFLAGS += ${SUBDIR_INCLUDES}
79 # Need to know the system name.
80 SYSTEM := $(shell uname -s)
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})
87 FILES_I_CC := $(patsubst %.cc,%.i.cc,${FILES_CC})
89 FILES_S := $(patsubst %.cc,%.s,${FILES_CC})
91 FILES_LO := $(patsubst %.cc,%.lo,${FILES_CC})
93 ASMFILES_S := $(patsubst %.cc,%.s,${ASMFILES_CC})
95 ASMFILES_LO := $(patsubst %.cc,%.lo,${ASMFILES_CC})
97 OBJECTS_LO = ${FILES_LO} ${ASMFILES_LO}
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})
106 SUBDIRS_TARGET := $(patsubst %,%.target,${SUBDIRS})
107 SUBDIRS_DIRDEP := $(patsubst %,%.dirdep,${SUBDIRS})
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}
118 all : ${OBJECTS_LO} ${SUBDIRS_TARGET} libcln.la
120 all : ${OBJECTS_LO} ${SUBDIRS_TARGET}
123 alls : ${FILES_S} ${ASMFILES_S}
125 allo : ${FILES_LO} ${ASMFILES_LO}
127 ASMFLAGS := @ASMFLAGS@
128 ifeq (@AS_UNDERSCORE@,true)
129 ASMFLAGS += -DUNDERSCORE
132 # Rules for normal compilation.
135 ${LIBTOOL_COMPILE} ${CC} ${CFLAGS} ${CPPFLAGS} ${TARGET_ARCH} -c $<
138 ${LIBTOOL_COMPILE} ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${TARGET_ARCH} -c $<
140 # Rules for normal compilation, only needed for debugging.
143 ${CC} ${CFLAGS} ${CPPFLAGS} ${TARGET_ARCH} -S $< -o $@
146 ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${TARGET_ARCH} -S $< -o $@
148 # Rules for preprocessing.
151 ${CPP} ${CFLAGS} ${CPPFLAGS} ${TARGET_ARCH} $< > $@
154 ${CXXCPP} ${CXXFLAGS} ${CPPFLAGS} ${TARGET_ARCH} $< > $@
156 # Rules for assembly language files,
158 ifneq (${ASMFILES_LO},)
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' > $@
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' > $@
169 ${CXXCPP} ${CXXFLAGS} ${CPPFLAGS} ${TARGET_ARCH} -P ${ASMFLAGS} $< | sed -e 's/\\#/#/g' -e 's/\$$/%/g' > $@
172 ifeq (@host_cpu@,hppa)
173 ${ASMFILES_S} : %.s : %.cc
174 -${CXXCPP} ${CXXFLAGS} ${CPPFLAGS} ${TARGET_ARCH} -P ${ASMFLAGS} $< > $@
176 ${ASMFILES_S} : %.s : %.cc
177 ${CXXCPP} ${CXXFLAGS} ${CPPFLAGS} ${TARGET_ARCH} -P ${ASMFLAGS} $< > $@
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 $<
189 ${ASMFILES_LO} : %.lo : %.s
190 ${LIBTOOL_COMPILE} ${CC} ${CFLAGS} ${ASMFLAGS} ${TARGET_ARCH} -c $<
196 # Recurse into subdirectories
197 ${SUBDIRS_TARGET} : %.target : %.dirdep
200 ${SUBDIRS_DIRDEP} : %.dirdep :
205 ${ALLOBJECTS_LO} : ${SUBDIRS_TARGET}
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
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
219 ${MKDIR} ${DESTDIR}${libdir}
220 ${MKDIR} ${DESTDIR}${includedir}/cln
223 ${LIBTOOL_UNINSTALL} ${RM} ${DESTDIR}${libdir}/libcln.la
224 ${RM} -r ${DESTDIR}${includedir}/cln
231 ${RM} *.s *.o *.lo *.a *.la *.objectlist core
235 ${RM} config.status config.log config.cache Makefile
237 maintainer-clean : distclean