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