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 11NAME = str 12VPATH = @srcdir@ 13SRCDIR = @srcdir@ 14 15HEADERS = str.h strparse.h 16SOURCES = strutil.c strprint.c strparse.c 17OBJECTS = strutil.o strprint.o strparse.o 18 19MANFILES = $(SRCDIR)/strparse.3 $(SRCDIR)/strprint.3 \ 20 $(SRCDIR)/strutil.3 21INCLUDEFILES = $(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 28LIBDIR = ../../lib 29MANDIR = ../../man 30INCLUDEDIR = ../../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# 42DEBUG = -g # -g or -O 43 44CPP_DEFS = 45 46# 47# The following variables shouldn't need to be changed 48# 49CPP_FLAGS = $(CPP_DEFS) -I$(INCLUDEDIR) 50CC_FLAGS = $(DEBUG) 51CFLAGS = @CFLAGS@ $(CPP_FLAGS) $(CC_FLAGS) 52 53INSTALL = @INSTALL@ 54FMODE = -m 640 # used by install 55RANLIB = @RANLIB@ 56 57LIBNAME = lib$(NAME).a 58 59lib: $(LIBNAME) 60 61libopt: clean 62 make DEBUG=-O "DEFS=$(DEFS)" lib 63 $(INSTALL) $(FMODE) $(LIBNAME) $(LIBDIR)-O 64 65$(LIBNAME): $(OBJECTS) 66 ar r $@ $? 67 $(RANLIB) $@ 68 69LINT_IGNORE=possible pointer alignment|RCSid unused 70 71install: $(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 85uninstall: 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 93clean: 94 rm -f $(OBJECTS) $(LIBNAME) core 95 rm -f *.swp 96 rm -f *.?~ 97 98spotless: clean uninstall 99 100distclean: clean 101 rm -f Makefile 102 103# 104# PUT HERE THE RULES TO MAKE THE OBJECT FILES 105# 106strparse.o: strparse.h str.h 107strprint.o: str.h 108strutil.o: str.h 109 110