"Fossies" - the Fresh Open Source Software Archive

Member "xc/makefile" (11 Aug 1995, 4197 Bytes) of package /linux/privat/old/laspack.tgz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 #
    2 # set appropriate the following variables in your environment:
    3 #
    4 # CC		for the C compiler
    5 # CFLAGS	for options of CC
    6 # LDFLAGS	for linker options of CC
    7 #
    8 
    9 #
   10 # ARCH_EXT can be used in order to install libraries in different directories
   11 # depending on the computer architecture,
   12 # e.g. $(HOME)/lib/sunos for ARCH_EXT = '/sunos'
   13 #
   14 #ARCH_EXT	=
   15 
   16 #
   17 # set the path for the root of the include directories here,
   18 # e.g. /usr/local/include
   19 #
   20 INCROOT		= ..
   21 #
   22 # set the destination directories for the library and include files
   23 #
   24 LIBDEST		= $(HOME)/lib$(ARCH_EXT)
   25 INCDEST		= $(HOME)/include
   26 
   27 #
   28 # the following text was created automaticaly. You should change it carefully.
   29 #
   30 
   31 SHELL		= /bin/sh
   32 
   33 LIBNAME		= xc
   34 
   35 LIBRARY		= lib$(LIBNAME).a
   36 
   37 HDRS		= getopts.h \
   38 		version.h \
   39 		xstring.h \
   40 		xtypes.h
   41 
   42 EXTHDRS		=
   43 
   44 SRCS		= getopts.c \
   45 		xstring.c
   46 
   47 OBJS		= getopts.o \
   48 		xstring.o
   49 
   50 LIBS		=
   51 
   52 COMPFLAGS	=  
   53 
   54 # compiler options passed throuth enviroment variables
   55 #CFLAGS		=
   56 #PFLAGS		=
   57 #FFLAGS		=
   58 #CXXFLAGS	=
   59 
   60 LIBLOCAL	= /usr/local/lib
   61 INCLOCAL	= /usr/local/include
   62 
   63 INSTALL		= mv
   64 
   65 ARFLAGS		= cru
   66 
   67 LINTLIBS	=
   68 
   69 LINTFLAGS	= -u -I$(INCROOT) $(CFLAGS)
   70 
   71 MAKEFILE	= makefile
   72 
   73 PRINT		= pr
   74 
   75 PRINTFLAGS	=
   76 
   77 LP		= lp
   78 
   79 LPFLAGS		= 
   80 
   81 all:		$(LIBRARY)
   82 
   83 clean:;		@rm -rf $(OBJS) core
   84 
   85 clobber:;	@rm -f $(OBJS) $(LIBRARY) core tags
   86 		@if [ -f compllist ]; then rm -f compllist; fi
   87 		@if [ -f cleanlist ]; then rm -f cleanlist; fi
   88 		@find . -type f -print > compllist
   89 		@sed -n \
   90 			-e "/~/ w cleanlist" \
   91 			-e '/%/ w cleanlist' \
   92 			-e '/.bak/ w cleanlist' \
   93 			-e '/.obj/ w cleanlist' \
   94 			-e '/.exe/ w cleanlist' \
   95 			-e '/.aux/ w cleanlist' \
   96 			-e '/.blg/ w cleanlist' \
   97 			-e '/.dvi/ w cleanlist' \
   98 			-e '/.glo/ w cleanlist' \
   99 			-e '/.idx/ w cleanlist' \
  100 			-e '/.ilg/ w cleanlist' \
  101 			-e '/.ind/ w cleanlist' \
  102 			-e '/.lof/ w cleanlist' \
  103 			-e '/.log/ w cleanlist' \
  104 			-e '/.lot/ w cleanlist' \
  105 			-e '/.toc/ w cleanlist' \
  106 			compllist
  107 		@rm -f `cat cleanlist`
  108 		@rm -f compllist
  109 		@rm -f cleanlist
  110 
  111 depend:;	@mkmf -f $(MAKEFILE)
  112 
  113 echo:;		@echo $(HDRS) $(SRCS)
  114 
  115 index:;		@ctags -wx $(HDRS) $(SRCS)
  116 
  117 install:	$(LIBRARY)
  118 		@echo Installing $(LIBRARY) in $(LIBDEST)
  119 		@if [ $(LIBDEST) != . ]; then rm -f $(LIBDEST)/$(LIBRARY); fi
  120 		@if [ $(LIBDEST) != . ]; then $(INSTALL) -f $(LIBRARY) $(LIBDEST); fi
  121 		@echo Installing header files in $(INCDEST)/$(LIBNAME)
  122 		@rm -rf $(INCDEST)/$(LIBNAME).old
  123 		@if [ -d $(INCDEST)/$(LIBNAME) ]; then \
  124 			mv $(INCDEST)/$(LIBNAME) $(INCDEST)/$(LIBNAME).old; \
  125 		fi
  126 		@mkdir $(INCDEST)/$(LIBNAME)
  127 		@chmod 755 $(INCDEST)/$(LIBNAME)
  128 		@cp *.h $(INCDEST)/$(LIBNAME)
  129 		@chmod 644 $(INCDEST)/$(LIBNAME)/*
  130 
  131 install-local:	$(LIBRARY)
  132 		@echo Installing $(LIBRARY) in $(LIBLOCAL)
  133 		@rm -f $(LIBLOCAL)/$(LIBRARY).old
  134 		@if [ -f $(LIBLOCAL)/$(LIBRARY) ]; then \
  135 			mv $(LIBLOCAL)/$(LIBRARY) $(LIBLOCAL)/$(LIBRARY).old; \
  136 		fi
  137 		@$(INSTALL) $(LIBRARY) $(LIBLOCAL)
  138 		@chmod 755 $(LIBLOCAL)/$(LIBRARY)
  139 		@echo Installing header files in $(INCLOCAL)/$(LIBNAME)
  140 		@rm -rf $(INCLOCAL)/$(LIBNAME).old
  141 		@if [ -d $(INCLOCAL)/$(LIBNAME) ]; then \
  142 			mv $(INCLOCAL)/$(LIBNAME) $(INCLOCAL)/$(LIBNAME).old; \
  143 		fi
  144 		@mkdir $(INCLOCAL)/$(LIBNAME)
  145 		@chmod 755 $(INCLOCAL)/$(LIBNAME)
  146 		@cp *.h $(INCLOCAL)/$(LIBNAME)
  147 		@chmod 755 $(INCLOCAL)/$(LIBNAME)/*
  148 
  149 lint:		$(LINTLIBS) $(HDRS) $(EXTHDRS) $(SRCS)
  150 		@$(LINT) $(LINTFLAGS) $(LINTLIBS) $(SRCS)
  151 
  152 print:;		@$(PRINT) $(PRINTFLAGS) $(HDRS) $(SRCS) | $(LP) $(LPFLAGS)
  153 
  154 tags:           $(HDRS) $(SRCS) 
  155 		@ctags $(HDRS) $(SRCS)
  156 
  157 touch:;		@touch $(HDRS) $(SRCS) $(MAKEFILE)
  158 
  159 update:		$(LIBDEST)/$(LIBRARY)
  160 
  161 d2u:;		@d2u $(HDRS) $(SRCS)
  162 
  163 c:;		@$(MAKE) -f $(MAKEFILE) clean
  164 cl:;		@$(MAKE) -f $(MAKEFILE) clobber
  165 i:;             @$(MAKE) -f $(MAKEFILE) install
  166 il:;		@$(MAKE) -f $(MAKEFILE) install-local
  167 l:;		@$(MAKE) -f $(MAKEFILE) lint
  168 t:;		@$(MAKE) -f $(MAKEFILE) touch
  169 u:;		@$(MAKE) -f $(MAKEFILE) update 
  170 
  171 $(LIBRARY):     $(OBJS) $(MAKEFILE)
  172 		@echo "Loading $(LIBRARY) ..."
  173 		@ar $(ARFLAGS) $(LIBRARY) $(OBJS)
  174 		@ranlib $(LIBRARY)
  175 
  176 $(LIBDEST)/$(LIBRARY):  $(HDRS) $(EXTHDRS) $(SRCS) $(LIBS) 
  177 		@$(MAKE) -f $(MAKEFILE) install
  178 
  179 .c.o:;		$(CC) -I$(INCROOT) $(CFLAGS) $(COMPFLAGS) -c $<
  180 .p.o:;		pc $(PFLAGS) $(COMPFLAGS) -c $<
  181 .f.o:;		f77 $(FFLAGS) $(COMPFLAGS) -c $<