improve of cmpl.
[bush.git] / lib / tilde / Makefile
blob12ab07fbf9a474b8637e9cc6bfd56d485dc12e47
1 ## -*- text -*- ####################################################
2 # #
3 # Makefile for the GNU Tilde Library. #
4 # #
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/>.
22 srcdir = .
24 topdir = ../..
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
31 CC = gcc
32 RANLIB = ranlib
33 AR = ar
34 ARFLAGS = cr
35 RM = rm
36 CP = cp
37 MV = mv
39 SHELL = /bin/sh
41 PROFILE_FLAGS =
43 CFLAGS = -g -O2 -Wno-parentheses -Wno-format-security
44 LOCAL_CFLAGS =
45 CPPFLAGS =
46 LDFLAGS = -rdynamic
48 DEFS = -DHAVE_CONFIG_H
49 LOCAL_DEFS = -DSHELL
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)
58 .c.o:
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
70 OBJECTS = tilde.o
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 ######################################################################
86 all: $(LIBRARY_NAME)
88 $(LIBRARY_NAME): $(OBJECTS)
89 $(RM) -f $@
90 $(AR) $(ARFLAGS) $@ $(OBJECTS)
91 -test -n "$(RANLIB)" && $(RANLIB) $@
93 documentation: force
94 -(cd doc; $(MAKE) $(MFLAGS))
96 force:
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
100 # include files.
101 install:
102 $(INSTALL_DATA) -c -m 644 $(LIBRARY_NAME) $(libdir)/$(LIBRARY_NAME)
103 -test -n "$(RANLIB)" && $(RANLIB) -t $(libdir)/$(LIBRARY_NAME)
105 clean:
106 $(RM) -f $(OBJECTS) $(LIBRARY_NAME)
107 -( cd doc && $(MAKE) $(MFLAGS) $@ )
109 realclean distclean maintainer-clean: clean
110 -( cd doc && $(MAKE) $(MFLAGS) $@ )
111 $(RM) -f Makefile
113 mostlyclean: clean
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
126 tilde.o: tilde.c