1 ## -*- text -*- ####################################################
3 # Makefile for the GNU Tilde Library. #
5 ####################################################################
10 BUILD_DIR = @BUILD_DIR@
13 INSTALL_PROGRAM = @INSTALL_PROGRAM@
14 INSTALL_DATA = @INSTALL_DATA@
24 LOCAL_CFLAGS = @LOCAL_CFLAGS@
26 LDFLAGS = @LDFLAGS@ @LOCAL_LDFLAGS@
29 LOCAL_DEFS = @LOCAL_DEFS@
31 INCLUDES = -I. -I../.. -I$(topdir) -I$(topdir)/lib
33 CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(CPPFLAGS) ${INCLUDES} $(LOCAL_CFLAGS) $(CFLAGS)
36 $(CC) -c $(CCFLAGS) $<
38 # The name of the library target.
39 LIBRARY_NAME = libtilde.a
41 # The C code source files for this library.
42 CSOURCES = $(srcdir)/tilde.c
44 # The header files for this library.
45 HSOURCES = $(srcdir)/tilde.h
49 # The texinfo files which document this library.
50 DOCSOURCE = doc/tilde.texi
51 DOCOBJECT = doc/tilde.dvi
52 DOCSUPPORT = doc/Makefile
53 DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT)
55 SUPPORT = Makefile ChangeLog $(DOCSUPPORT)
57 SOURCES = $(CSOURCES) $(HSOURCES) $(DOCSOURCE)
59 THINGS_TO_TAR = $(SOURCES) $(SUPPORT)
61 ######################################################################
65 $(LIBRARY_NAME): $(OBJECTS)
67 $(AR) cr $@ $(OBJECTS)
68 -test -n "$(RANLIB)" && $(RANLIB) $@
71 -(cd doc; $(MAKE) $(MFLAGS))
75 # The rule for 'includes' is written funny so that the if statement
76 # always returns TRUE unless there really was an error installing the
79 $(INSTALL_DATA) -c -m 644 $(LIBRARY_NAME) $(bindir)/$(LIBRARY_NAME)
80 -test -n "$(RANLIB)" && $(RANLIB) -t $(bindir)/$(LIBRARY_NAME)
83 $(RM) -f $(OBJECTS) $(LIBRARY_NAME)
84 -( cd doc && $(MAKE) $(MFLAGS) $@ )
86 realclean distclean maintainer-clean: clean
87 -( cd doc && $(MAKE) $(MFLAGS) $@ )
91 -( cd doc && $(MAKE) $(MFLAGS) $@ )
93 ######################################################################
95 # Dependencies for the object files which make up this library. #
97 ######################################################################
99 tilde.o: tilde.h $(topdir)/ansi_stdlib.h
100 tilde.o: $(BUILD_DIR)/config.h
102 # Rules for deficient makes, like SunOS and Solaris