1 ## -*- text -*- ####################################################
3 # Makefile for the GNU Tilde Library. #
5 ####################################################################
7 # Copyright (C) 1996-2009 Free Software Foundation, Inc.
9 # This program is free software: you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation, either version 3 of the License, or
12 # (at your option) any later version.
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with this program. If not, see <http://www.gnu.org/licenses/>.
25 BUILD_DIR
= /mnt
/hgfs
/workspace
/tmp
/srcpkg
/bush
27 INSTALL
= /usr
/bin
/install -c
28 INSTALL_PROGRAM
= ${INSTALL}
29 INSTALL_DATA
= ${INSTALL} -m
644
43 CFLAGS
= -g
-O2
-Wno-parentheses
-Wno-format-security
48 DEFS
= -DHAVE_CONFIG_H
51 BUSHINCDIR
= ${topdir}/include
53 INCLUDES
= -I.
-I..
/..
-I
$(topdir
) -I
$(topdir
)/src
-I
${BUSHINCDIR} -I
$(topdir
)/lib
55 CCFLAGS
= ${ASAN_CFLAGS} $(PROFILE_FLAGS
) $(DEFS
) $(LOCAL_DEFS
) $(CPPFLAGS
) \
56 ${INCLUDES} $(LOCAL_CFLAGS
) $(CFLAGS
)
59 $(CC
) -c
$(CCFLAGS
) $<
61 # The name of the library target.
62 LIBRARY_NAME
= libtilde.a
64 # The C code source files for this library.
65 CSOURCES
= $(srcdir)/tilde.c
67 # The header files for this library.
68 HSOURCES
= $(srcdir)/tilde.h
72 # The texinfo files which document this library.
73 DOCSOURCE
= doc
/tilde.texi
74 DOCOBJECT
= doc
/tilde.
dvi
75 DOCSUPPORT
= doc
/Makefile
76 DOCUMENTATION
= $(DOCSOURCE
) $(DOCOBJECT
) $(DOCSUPPORT
)
78 SUPPORT
= Makefile ChangeLog
$(DOCSUPPORT
)
80 SOURCES
= $(CSOURCES
) $(HSOURCES
) $(DOCSOURCE
)
82 THINGS_TO_TAR
= $(SOURCES
) $(SUPPORT
)
84 ######################################################################
88 $(LIBRARY_NAME
): $(OBJECTS
)
90 $(AR
) $(ARFLAGS
) $@
$(OBJECTS
)
91 -test -n
"$(RANLIB)" && $(RANLIB
) $@
94 -(cd doc
; $(MAKE
) $(MFLAGS
))
98 # The rule for 'includes' is written funny so that the if statement
99 # always returns TRUE unless there really was an error installing the
102 $(INSTALL_DATA
) -c
-m
644 $(LIBRARY_NAME
) $(libdir)/$(LIBRARY_NAME
)
103 -test -n
"$(RANLIB)" && $(RANLIB
) -t
$(libdir)/$(LIBRARY_NAME
)
106 $(RM
) -f
$(OBJECTS
) $(LIBRARY_NAME
)
107 -( cd doc
&& $(MAKE
) $(MFLAGS
) $@
)
109 realclean distclean maintainer-clean
: clean
110 -( cd doc
&& $(MAKE
) $(MFLAGS
) $@
)
114 -( cd doc
&& $(MAKE
) $(MFLAGS
) $@
)
116 ######################################################################
118 # Dependencies for the object files which make up this library. #
120 ######################################################################
122 tilde.o
: tilde.h
$(BUSHINCDIR
)/ansi_stdlib.h
123 tilde.o
: $(BUILD_DIR
)/config.h
125 # Rules for deficient makes, like SunOS and Solaris