1 # (c) Copyright 1992 by Panagiotis Tsirigotis
2 # All rights reserved. The file named COPYRIGHT specifies the terms
3 # and conditions for redistribution.
6 # $Id: Makefile.in,v 1.1.1.1 2003/02/19 17:29:27 bbraun Exp $
8 # Based on Library makefile template: *Revision: 1.15 *
15 HEADERS = $(SRCDIR)/misc.h $(SRCDIR)/m_env.h
16 SOURCES = misc.c m_env.c
17 OBJECTS = misc.o m_env.o
19 MANFILES = $(SRCDIR)/misc.3 $(SRCDIR)/m_env.3
20 INCLUDEFILES = $(HEADERS)
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
28 #LIBDIR = $(HOME)/.links/libraries/$(ARCH)
29 #MANDIR = $(HOME)/.links/manpages/man3
30 #INCLUDEDIR = $(HOME)/.links/includes
33 INCLUDEDIR = ../../include
37 # -DOLD_DIR : must include <sys/dir.h> instead of <dirent.h>
45 # The following variables shouldn't need to be changed
47 CPP_FLAGS = $(CPP_DEFS)
49 CFLAGS = @CFLAGS@ $(CPP_FLAGS) $(CC_FLAGS) -I$(INCLUDEDIR)
52 FMODE = -m 640 # used by install
55 LIBNAME = lib$(NAME).a
61 mv $(LIBNAME) $(LIBDIR)/optimized
64 $(LIBNAME): $(OBJECTS)
69 @if test "$(LIBDIR)" -a "$(INCLUDEDIR)" -a "$(MANDIR)" ;\
71 $(INSTALL) $(FMODE) $(LIBNAME) $(LIBDIR) ;\
72 ${RANLIB} $(LIBDIR)/$(LIBNAME) ;\
73 echo "Installed $(LIBNAME) to $(LIBDIR)" ;\
74 for i in $(INCLUDEFILES); do $(INSTALL) $(FMODE) $$i $(INCLUDEDIR) ; done ;\
75 echo Installed $(INCLUDEFILES) to $(INCLUDEDIR) ;\
76 for i in $(MANFILES) ; do $(INSTALL) $(FMODE) $$i $(MANDIR) ; done ;\
77 echo Installed $(MANFILES) to $(MANDIR) ;\
79 echo "You forgot to set one of the following variables: LIBDIR,INCLUDEDIR,MANDIR" ;\
83 a=`pwd` ; cd $(INCLUDEDIR) ;\
84 if test $$a != `pwd` ; then rm -f $(INCLUDEFILES) ; fi
85 a=`pwd` ; cd $(LIBDIR) ;\
86 if test $$a != `pwd` ; then rm -f $(LIBNAME) ; fi
87 a=`pwd` ; cd $(MANDIR) ;\
88 if test $$a != `pwd` ; then rm -f $(MANFILES) ; fi
91 rm -f $(OBJECTS) $(LIBNAME) core
95 spotless: clean uninstall
101 # PUT HERE THE RULES TO MAKE THE OBJECT FILES
104 m_env.o: m_env.h misc.h