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@
27 LOCAL_CFLAGS
= @LOCAL_CFLAGS@
29 LDFLAGS
= @LDFLAGS@ @LOCAL_LDFLAGS@
32 LOCAL_DEFS
= @LOCAL_DEFS@
34 INCLUDES
= -I.
-I..
/..
-I
$(topdir
) -I
$(topdir
)/lib
36 CCFLAGS
= $(DEFS
) $(LOCAL_DEFS
) $(CPPFLAGS
) ${INCLUDES} $(LOCAL_CFLAGS
) $(CFLAGS
)
39 $(CC
) -c
$(CCFLAGS
) $<
41 # The name of the library target.
42 LIBRARY_NAME
= libtilde.a
44 # The C code source files for this library.
45 CSOURCES
= $(srcdir)/tilde.c
47 # The header files for this library.
48 HSOURCES
= $(srcdir)/tilde.h
52 # The texinfo files which document this library.
53 DOCSOURCE
= doc
/tilde.texi
54 DOCOBJECT
= doc
/tilde.
dvi
55 DOCSUPPORT
= doc
/Makefile
56 DOCUMENTATION
= $(DOCSOURCE
) $(DOCOBJECT
) $(DOCSUPPORT
)
58 SUPPORT
= Makefile ChangeLog
$(DOCSUPPORT
)
60 SOURCES
= $(CSOURCES
) $(HSOURCES
) $(DOCSOURCE
)
62 THINGS_TO_TAR
= $(SOURCES
) $(SUPPORT
)
64 ######################################################################
68 $(LIBRARY_NAME
): $(OBJECTS
)
70 $(AR
) $(ARFLAGS
) $@
$(OBJECTS
)
71 -test -n
"$(RANLIB)" && $(RANLIB
) $@
74 -(cd doc
; $(MAKE
) $(MFLAGS
))
78 # The rule for 'includes' is written funny so that the if statement
79 # always returns TRUE unless there really was an error installing the
82 $(INSTALL_DATA
) -c
-m
644 $(LIBRARY_NAME
) $(bindir)/$(LIBRARY_NAME
)
83 -test -n
"$(RANLIB)" && $(RANLIB
) -t
$(bindir)/$(LIBRARY_NAME
)
86 $(RM
) -f
$(OBJECTS
) $(LIBRARY_NAME
)
87 -( cd doc
&& $(MAKE
) $(MFLAGS
) $@
)
89 realclean distclean maintainer-clean
: clean
90 -( cd doc
&& $(MAKE
) $(MFLAGS
) $@
)
94 -( cd doc
&& $(MAKE
) $(MFLAGS
) $@
)
96 ######################################################################
98 # Dependencies for the object files which make up this library. #
100 ######################################################################
102 tilde.o
: tilde.h
$(topdir
)/ansi_stdlib.h
103 tilde.o
: $(BUILD_DIR
)/config.h
105 # Rules for deficient makes, like SunOS and Solaris