Import upstream 2.3.14
[packages/xinetd.git] / libs / src / str / Makefile.in
1 # (c) Copyright 1992, 1993 by Panagiotis Tsirigotis
2 # All rights reserved.  The file named COPYRIGHT specifies the terms 
3 # and conditions for redistribution.
4
5 #
6 # $Id: Makefile.in,v 1.1.1.1 2003/02/19 17:29:27 bbraun Exp $
7 #
8 # Based on Library makefile template: *Revision: 1.15 *
9 #
10
11 NAME                    = str
12 VPATH                   = @srcdir@
13 SRCDIR                  = @srcdir@
14
15 HEADERS                 = str.h strparse.h
16 SOURCES                 = strutil.c strprint.c strparse.c
17 OBJECTS                 = strutil.o strprint.o strparse.o
18
19 MANFILES                = $(SRCDIR)/strparse.3 $(SRCDIR)/strprint.3 \
20                         $(SRCDIR)/strutil.3
21 INCLUDEFILES            = $(SRCDIR)/str.h
22
23 # The following variables are used by the 'install' entry and
24 # should be customized:
25 #     LIBDIR:     where the library will be placed
26 #     INCUDEDIR:  where the include files will be placed
27 #     MANDIR:     where the man pages will be placed
28 LIBDIR                  = ../../lib
29 MANDIR                  = ../../man
30 INCLUDEDIR              = ../../include
31
32 #
33 # Available flags
34 #       NBIC    : number of bits in a character variable (defaults to 8)
35 #       WIDE_INT : widest integer supported by the CPU/compiler
36 #                         (defaults to 'long')
37 #       WIDE_INT_SIZE  : size of the WIDE_INT type in bits (defaults to 32);
38 #                 effective (and required) only when WIDE_INT is defined
39 #       NO_SIO  : if the SIO library is not available (results in turning
40 #                         all the string printing functions to no-ops)
41 #
42 DEBUG                   = -g            # -g or -O
43
44 CPP_DEFS                = 
45
46 #
47 # The following variables shouldn't need to be changed
48 #
49 CPP_FLAGS               = $(CPP_DEFS) -I$(INCLUDEDIR)
50 CC_FLAGS                = $(DEBUG)
51 CFLAGS                  = @CFLAGS@ $(CPP_FLAGS) $(CC_FLAGS)
52
53 INSTALL                 = @INSTALL@
54 FMODE                   = -m 640                        # used by install
55 RANLIB                  = @RANLIB@
56
57 LIBNAME                 = lib$(NAME).a
58
59 lib: $(LIBNAME)
60
61 libopt: clean
62         make DEBUG=-O "DEFS=$(DEFS)" lib
63         $(INSTALL) $(FMODE) $(LIBNAME) $(LIBDIR)-O
64
65 $(LIBNAME): $(OBJECTS)
66         ar r $@ $?
67         $(RANLIB) $@
68
69 LINT_IGNORE=possible pointer alignment|RCSid unused
70
71 install: $(LIBNAME)
72         @if test "$(LIBDIR)" -a "$(INCLUDEDIR)" -a "$(MANDIR)" ;\
73         then \
74                 $(INSTALL) $(FMODE) $(LIBNAME) $(LIBDIR) ;\
75                 $(RANLIB) $(LIBDIR)/$(LIBNAME) ;\
76                 echo "Installed $(LIBNAME) to $(LIBDIR)" ;\
77                 for i in $(INCLUDEFILES); do $(INSTALL) $(FMODE) $$i $(INCLUDEDIR) ; done ;\
78                 echo Installed $(INCLUDEFILES) to $(INCLUDEDIR) ;\
79                 for i in $(MANFILES) ; do $(INSTALL) $(FMODE) $$i $(MANDIR) ; done ;\
80                 echo Installed $(MANFILES) to $(MANDIR) ;\
81         else \
82                 echo "You forgot to set one of the following variables: LIBDIR,INCLUDEDIR,MANDIR" ;\
83         fi
84
85 uninstall:
86         a=`pwd` ; cd $(INCLUDEDIR) ;\
87         if test $$a != `pwd` ; then rm -f $(INCLUDEFILES) ; fi
88         a=`pwd` ; cd $(LIBDIR) ;\
89         if test $$a != `pwd` ; then rm -f $(LIBNAME) ; fi
90         a=`pwd` ; cd $(MANDIR) ;\
91         if test $$a != `pwd` ; then rm -f $(MANFILES) ; fi
92
93 clean:
94         rm -f $(OBJECTS) $(LIBNAME) core
95         rm -f *.swp
96         rm -f *.?~ 
97
98 spotless: clean uninstall
99
100 distclean: clean
101         rm -f Makefile
102
103 #
104 # PUT HERE THE RULES TO MAKE THE OBJECT FILES
105 #
106 strparse.o:             strparse.h str.h
107 strprint.o:             str.h
108 strutil.o:              str.h
109