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@
23 CFLAGS = @CFLAGS@ @LOCAL_CFLAGS@
25 LDFLAGS = @LDFLAGS@ @LOCAL_LDFLAGS@
29 INCLUDES = -I. -I../.. -I$(topdir) -I$(topdir)/lib
31 CCFLAGS = $(CFLAGS) $(DEFS) $(CPPFLAGS) ${INCLUDES}
34 $(CC) -c $(CCFLAGS) $<
36 # The name of the library target.
37 LIBRARY_NAME = libtilde.a
39 # The C code source files for this library.
40 CSOURCES = $(srcdir)/tilde.c
42 # The header files for this library.
43 HSOURCES = $(srcdir)/tilde.h
47 # The texinfo files which document this library.
48 DOCSOURCE = doc/tilde.texi
49 DOCOBJECT = doc/tilde.dvi
50 DOCSUPPORT = doc/Makefile
51 DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT)
53 SUPPORT = Makefile ChangeLog $(DOCSUPPORT)
55 SOURCES = $(CSOURCES) $(HSOURCES) $(DOCSOURCE)
57 THINGS_TO_TAR = $(SOURCES) $(SUPPORT)
59 ######################################################################
63 $(LIBRARY_NAME): $(OBJECTS)
65 $(AR) cr $@ $(OBJECTS)
66 -test -n "$(RANLIB)" && $(RANLIB) $@
69 -(cd doc; $(MAKE) $(MFLAGS))
73 # The rule for 'includes' is written funny so that the if statement
74 # always returns TRUE unless there really was an error installing the
77 $(INSTALL_DATA) -c -m 644 $(LIBRARY_NAME) $(bindir)/$(LIBRARY_NAME)
78 -test -n "$(RANLIB)" && $(RANLIB) -t $(bindir)/$(LIBRARY_NAME)
81 $(RM) -f $(OBJECTS) $(LIBRARY_NAME)
82 -( cd doc && $(MAKE) $(MFLAGS) $@ )
84 realclean distclean maintainer-clean: clean
85 -( cd doc && $(MAKE) $(MFLAGS) $@ )
89 -( cd doc && $(MAKE) $(MFLAGS) $@ )
91 ######################################################################
93 # Dependencies for the object files which make up this library. #
95 ######################################################################
97 tilde.o: tilde.h tilde.c
98 tilde.o: $(BUILD_DIR)/config.h