Import upstream 2.3.14
[packages/xinetd.git] / libs / src / pset / 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
12 NAME                    = pset
13 VPATH                   = @srcdir@
14 SRCDIR                  = @srcdir@
15
16 HEADERS                 = pset.h
17 SOURCES                 = pset.c ops.c
18 OBJECTS                 = pset.o ops.o
19
20 MANFILES                = $(SRCDIR)/pset.3 $(SRCDIR)/psi.3
21 INCLUDEFILES            = $(SRCDIR)/pset.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 DEBUG                   = -g            # -g or -O
33
34 CPP_DEFS                = 
35
36 #
37 # The following variables shouldn't need to be changed
38 #
39 CPP_FLAGS               = $(CPP_DEFS) -I$(INCLUDEDIR)
40 CC_FLAGS                = $(DEBUG)
41 CFLAGS                  = @CFLAGS@ $(CPP_FLAGS) $(CC_FLAGS)
42
43 INSTALL                 = @INSTALL@
44 FMODE                   = -m 640                        # used by install
45 RANLIB                  = @RANLIB@
46
47 LIBNAME                 = lib$(NAME).a
48
49 lib: $(LIBNAME)
50
51 libopt: clean
52         make DEBUG=-O lib
53         mv $(LIBNAME) $(LIBDIR)/optimized
54
55 $(LIBNAME): $(OBJECTS)
56         ar r $@ $?
57         $(RANLIB) $@
58
59 install: $(LIBNAME)
60         @if test "$(LIBDIR)" -a "$(INCLUDEDIR)" -a "$(MANDIR)" ;\
61         then \
62                 $(INSTALL) $(FMODE) $(LIBNAME) $(LIBDIR) ;\
63                 $(RANLIB) $(LIBDIR)/$(LIBNAME) ;\
64                 echo "Installed $(LIBNAME) to $(LIBDIR)" ;\
65                 for i in $(INCLUDEFILES); do $(INSTALL) $(FMODE) $$i $(INCLUDEDIR) ; done ;\
66                 echo Installed $(INCLUDEFILES) to $(INCLUDEDIR) ;\
67                 for i in $(MANFILES) ; do $(INSTALL) $(FMODE) $$i $(MANDIR) ; done ;\
68                 echo Installed $(MANFILES) to $(MANDIR) ;\
69         else \
70                 echo "You forgot to set one of the following variables: LIBDIR,INCLUDEDIR,MANDIR" ;\
71         fi
72
73 uninstall:
74         a=`pwd` ; cd $(INCLUDEDIR) ;\
75         if test $$a != `pwd` ; then rm -f $(INCLUDEFILES) ; fi
76         a=`pwd` ; cd $(LIBDIR) ;\
77         if test $$a != `pwd` ; then rm -f $(LIBNAME) ; fi
78         a=`pwd` ; cd $(MANDIR) ;\
79         if test $$a != `pwd` ; then rm -f $(MANFILES) ; fi
80
81 clean:
82         rm -f $(OBJECTS) $(LIBNAME) core
83         rm -f *.swp
84         rm -f *.?~ 
85
86 distclean: clean
87         rm -f Makefile
88
89 spotless: clean uninstall
90
91 #
92 # PUT HERE THE RULES TO MAKE THE OBJECT FILES
93 #
94 pset.o: pset.h
95