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