1############################################################################### 2# 3# FILE: Makefile.in 4# DESCRIPTION: Makefile template for sxml 5# DATE: Tue, Sep 14 2004 6# UPDATED: Fri, Mar 26 2010 7# AUTHOR: Kouichi ABE (WALL) 8# E-MAIL: kouichi@MysticWALL.COM 9# URL: http://www.MysticWALL.COM/ 10# COPYRIGHT: (c) 2004-2010 Kouichi ABE (WALL), All rights reserved. 11# $Id: Makefile.in,v 1.12 2010/03/26 07:56:17 kouichi Exp $ 12# 13############################################################################### 14 15prefix=@prefix@ 16exec_prefix=@exec_prefix@ 17bindir=@bindir@ 18libdir=@libdir@ 19includedir=@includedir@ 20 21CC=@CC@ 22MAKE=@MAKE@ 23RM=@RM@ 24LD=@LD@ 25AR=@AR@ 26LN_S=@LN_S@ 27RANLIB=@RANLIB@ 28MKDIR=@MKDIR@ 29CTAGS=@CTAGS@ 30EDITOR=@EDITOR@ 31 32INSTALL=@INSTALL@ 33INSTALL_PROGRAM=@INSTALL_PROGRAM@ 34INSTALL_DATA=@INSTALL_DATA@ 35 36DEFS= @DEFS@ 37OPTS= -fstrength-reduce -funroll-loops -finline-functions 38CPPFLAGS= -I@srcdir@ 39CFLAGS= ${DEFS} ${CPPFLAGS} ${OPTS} @CFLAGS@ 40 41DYEXT=@DYEXT@ 42 43############################################################################### 44 45SXML_HDR=sxml.h 46SXML_SRC=sxml.c 47SXML_POBJ=${SXML_SRC:.c=.o} 48SXML_PLIB=libsxml.a 49SXML_SOBJ=${SXML_SRC:.c=.lo} 50SXML_SLIB=libsxml.so.1 51SXML_DLIB=libsxml.1.dylib 52SXML_DYLIB=libsxml.`cat VERSION`.dylib 53SXML_LIB=libsxml.${DYEXT} 54 55############################################################################### 56 57SXMLRPC_HDR=sxmlrpc.h 58SXMLRPC_SRC=sxmlrpc.c 59SXMLRPC_POBJ=${SXMLRPC_SRC:.c=.o} 60SXMLRPC_PLIB=libsxmlrpc.a 61SXMLRPC_SOBJ=${SXMLRPC_SRC:.c=.lo} 62SXMLRPC_SLIB=libsxmlrpc.so.1 63SXMLRPC_DLIB=libsxmlrpc.1.dylib 64SXMLRPC_DYLIB=libsxmlrpc.`cat VERSION`.dylib 65SXMLRPC_LIB=libsxmlrpc.${DYEXT} 66 67############################################################################### 68 69all: ${SXML_PLIB} ${SXML_LIB} ${SXMLRPC_PLIB} ${SXMLRPC_LIB} 70 71############################################################################### 72 73.SUFFIXES: .o .c .lo 74 75.c.o: 76 ${CC} @P_CCOPT@ ${CFLAGS} ${CPPFLAGS} -c $< -o $@ 77 78.c.lo: 79 ${CC} @S_CCOPT@ ${CFLAGS} ${CPPFLAGS} -c $< -o $@ 80 81############################################################################### 82 83sxml.o: sxml.c ${SXML_HDR} 84${SXML_PLIB}: ${SXML_POBJ} 85 -${RM} -f $@ 86 ${AR} rc $@ ${SXML_POBJ} 87 ${RANLIB} $@ 88 89sxml.lo: sxml.c ${SXML_HDR} 90libsxml.so: ${SXML_SOBJ} 91 -${RM} -f $@ 92 ${CC} -shared -Wl,-soname,${SXML_SLIB} -o ${SXML_SLIB} ${SXML_SOBJ} 93 ${LN_S} ${SXML_SLIB} $@ 94 95libsxml.dylib: ${SXML_SOBJ} 96 -${RM} -f $@ 97 ${CC} -dynamiclib -undefined error -o ${SXML_DYLIB} ${SXML_SOBJ} -install_name ${libdir}/${SXML_DLIB} -compatibility_version `cat VERSION` -current_version `cat VERSION` 98 ${LN_S} ${SXML_DYLIB} $@ 99 100############################################################################### 101 102sxmlrpc.o: sxmlrpc.c ${SXMLRPC_HDR} 103${SXMLRPC_PLIB}: ${SXMLRPC_POBJ} 104 -${RM} -f $@ 105 ${AR} rc $@ ${SXMLRPC_POBJ} ${SXML_POBJ} 106 ${RANLIB} $@ 107 108sxmlrpc.lo: sxmlrpc.c ${SXMLRPC_HDR} 109libsxmlrpc.so: ${SXMLRPC_SOBJ} 110 -${RM} -f $@ 111 ${CC} -shared -Wl,-soname,${SXMLRPC_SLIB} -o ${SXMLRPC_SLIB} ${SXMLRPC_SOBJ} ${SXML_POBJ} 112 ${LN_S} ${SXMLRPC_SLIB} $@ 113 114libsxmlrpc.dylib: ${SXMLRPC_SOBJ} 115 -${RM} -f $@ 116 ${CC} -dynamiclib -undefined error -o ${SXMLRPC_DYLIB} ${SXMLRPC_SOBJ} ${SXML_POBJ} -install_name ${libdir}/${SXMLRPC_DLIB} -compatibility_version `cat VERSION` -current_version `cat VERSION` 117 ${LN_S} ${SXMLRPC_DYLIB} $@ 118 119############################################################################# 120 121install:: check-dirs install-libsxml install-libsxmlrpc 122 123install-libsxml:: 124 -${RM} ${DESTDIR}${libdir}/${SXML_PLIB} 125 ${INSTALL_DATA} ${SXML_PLIB} ${DESTDIR}${libdir} 126 ${RANLIB} -t ${DESTDIR}${libdir}/${SXML_PLIB} 127 -${RM} ${DESTDIR}${libdir}/${SXML_SLIB} 128 -${RM} ${DESTDIR}${libdir}/${SXML_DLIB} 129 -${RM} ${DESTDIR}${libdir}/${SXML_LIB} 130 if [ -f ${SXML_SLIB} ]; then \ 131 ${INSTALL_PROGRAM} ${SXML_SLIB} ${DESTDIR}${libdir}; \ 132 (cd ${DESTDIR}${libdir}; ${LN_S} ${SXML_SLIB} ${SXML_LIB}); \ 133 fi 134 if [ -f ${SXML_DYLIB} ]; then \ 135 ${INSTALL} ${SXML_DYLIB} ${DESTDIR}${libdir}; \ 136 (cd ${DESTDIR}${libdir}; ${LN_S} ${SXML_DYLIB} ${SXML_DLIB}); \ 137 fi 138 ${INSTALL_DATA} ${SXML_HDR} ${DESTDIR}${includedir} 139 140install-libsxmlrpc:: 141 -${RM} ${DESTDIR}${libdir}/${SXMLRPC_PLIB} 142 ${INSTALL_DATA} ${SXMLRPC_PLIB} ${DESTDIR}${libdir} 143 ${RANLIB} -t ${DESTDIR}${libdir}/${SXMLRPC_PLIB} 144 -${RM} ${DESTDIR}${libdir}/${SXMLRPC_SLIB} 145 -${RM} ${DESTDIR}${libdir}/${SXMLRPC_DLIB} 146 -${RM} ${DESTDIR}${libdir}/${SXMLRPC_LIB} 147 if [ -f ${SXMLRPC_SLIB} ]; then \ 148 ${INSTALL_PROGRAM} ${SXMLRPC_SLIB} ${DESTDIR}${libdir}; \ 149 (cd ${DESTDIR}${libdir}; ${LN_S} ${SXMLRPC_SLIB} ${SXMLRPC_LIB}); \ 150 fi 151 if [ -f ${SXMLRPC_DYLIB} ]; then \ 152 ${INSTALL} ${SXMLRPC_DYLIB} ${DESTDIR}${libdir}; \ 153 (cd ${DESTDIR}${libdir}; ${LN_S} ${SXMLRPC_DYLIB} ${SXMLRPC_DLIB}); \ 154 fi 155 ${INSTALL_DATA} ${SXMLRPC_HDR} ${DESTDIR}${includedir} 156 157check-dirs:: 158 @if [ ! -d ${prefix} ]; then ${MKDIR} ${DESTDIR}${prefix}; fi 159 @if [ ! -d ${libdir} ]; then ${MKDIR} ${DESTDIR}${libdir}; fi 160 @if [ ! -d ${includedir} ]; then ${MKDIR} ${DESTDIR}${includedir}; fi 161 162############################################################################### 163 164tags-sxml: ${SXML_SRC} ${SXML_HDR} 165 ${CTAGS} ${SXML_SRC} ${SXML_HDR} 166 167tags-sxmlrpc: ${SXMLRPC_SRC} ${SXMLRPC_HDR} 168 ${CTAGS} ${SXMLRPC_SRC} ${SXMLRPC_HDR} 169 170############################################################################### 171 172clean:: 173 -${RM} -f *~ make.log a.out *.core core *.bak *.o *.lo *.lineno tags 174 175purge:: clean 176 -${RM} -f ${SXML_PLIB} ${SXML_SLIB} ${SXML_DYLIB} ${SXML_LIB} \ 177 ${SXMLRPC_PLIB} ${SXMLRPC_SLIB} ${SXMLRPC_DYLIB} ${SXMLRPC_LIB} \ 178 config.cache config.log config.status config.h Makefile 179