1 ## -*- text -*- ####################################################
3 # Makefile for termcap replacement libbrary. #
5 ####################################################################
7 # Here is a rule for making .o files from .c files that doesn't force
8 # the type of the machine (like -sun3) into the flags.
10 $(CC) -c $(CFLAGS) $(LOCAL_INCLUDES) $(CPPFLAGS) $*.c
12 # Destination installation directory. The libraries are copied to DESTDIR
13 # when you do a `make install'.
14 DESTDIR = /usr/local/lib
18 LDFLAGS = $(DEBUG_FLAGS)
19 CFLAGS = $(DEBUG_FLAGS) $(OPTIMIZE_FLAGS)
23 # A good alternative is gcc -traditional.
24 #CC = gcc -traditional
31 CSOURCES = termcap.c tparam.c
35 OBJECTS = termcap.o tparam.o
37 DOCUMENTATION = termcap.texinfo
39 THINGS_TO_TAR = $(SOURCES) $(DOCUMENTATION)
41 ##########################################################################
45 libtermcap.a: $(OBJECTS)
47 $(AR) clq $@ $(OBJECTS)
48 -[ -n "$(RANLIB)" ] && $(RANLIB) $@
50 termcap.tar: $(THINGS_TO_TAR)
51 tar -cf $@ $(THINGS_TO_TAR)
53 termcap.tar.Z: termcap.tar
54 compress -f termcap.tar
56 install: $(DESTDIR)/libtermcap.a
59 rm -f *.o *.a *.log *.cp *.tp *.vr *.fn *.aux *.pg *.toc
61 maintainer-clean realclean mostlyclean distclean: clean
64 $(DESTDIR)/libtermcap.a: libtermcap.a
65 -mv $(DESTDIR)/libtermcap.a $(DESTDIR)/libtermcap.old
67 -[ -n "$(RANLIB) ] && $(RANLIB) -t $@