"Fossies" - the Fresh Open Source Software Archive

Member "mpr-2.8/Makefile" (3 Jan 2004, 1494 Bytes) of package /linux/misc/old/mpr-2.8.tar.gz:


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 SHELL=/bin/sh
    2 SRC=bt.c mprhook.c malloc.c
    3 OBJ=bt.o mprhook.o malloc.o
    4 SO-OBJ=bt.so mprhook.so malloc.so
    5 LIB=libmpr.a libmpr.so
    6 EXE1=mpr mprfilter mprmap mprfl mprchain mprleak mprsize mprhisto mprwhich mprfl-so mprso
    7 EXE2=mprnm
    8 EXE3=mprdem
    9 EXE=$(EXE1) $(EXE2) $(EXE3)
   10 LIBDIR=/usr/local/lib
   11 BINDIR=/usr/local/bin
   12 
   13 all: $(LIB) $(EXE3)
   14 
   15 systype: find-systype
   16 	@(./find-systype >systype; \
   17 	  oper="`cat systype | cut -d: -f1 | cut -d- -f1`"; \
   18 	  chip="`cat systype | cut -d: -f2 | cut -d- -f1`"; \
   19 	  case "$$chip-$$oper" in \
   20 	  i386-linux|i386-freebsd|i386-netbsd|sparc-sunos) \
   21 		ln -s config/bt"$$chip".c bt.c; \
   22 		ln -s config/mprnm."$$oper" mprnm; \
   23 		;; \
   24 	  esac)
   25 
   26 bt.c $(EXE2): systype
   27 	@(if test -f bt.c; then exit 0; fi; \
   28 	  echo "Sorry - unsupported target !!" >&2; \
   29 	  exit 1)
   30 
   31 $(EXE1): ;
   32 
   33 libmpr.a: $(OBJ)
   34 	ar cr libmpr.a $(OBJ)
   35 	-(ranlib libmpr.a; exit 0) >/dev/null 2>&1
   36 
   37 libmpr.so: $(SO-OBJ)
   38 	$(CC) -shared -o $(@) $(SO-OBJ) -lc
   39 
   40 .SUFFIXES: .so
   41 .c.so:
   42 	$(CC) -o $(@) -c $(CFLAGS) -fPIC $(<)
   43 
   44 mprdem:
   45 	cd demangle; $(MAKE)
   46 	ln -s demangle/mprdem mprdem
   47 
   48 install: $(LIB) $(EXE)
   49 	install -c -m 644 libmpr.a $(LIBDIR)
   50 	install -c -m 755 libmpr.so $(LIBDIR)
   51 	for f in $(EXE); do install -c -m 755 $$f $(BINDIR); done
   52 
   53 uninstall:
   54 	for f in $(LIB); do rm -f $(LIBDIR)/$$f; done
   55 	for f in $(EXE); do rm -f $(BINDIR)/$$f; done
   56 
   57 .PHONY: clean distclean
   58 
   59 clean:
   60 	-rm -f *.o *.so core .gdb_history $(EXE3) $(LIB)
   61 	-cd demangle; $(MAKE) clean
   62 
   63 distclean: clean
   64 	-rm -f bt.c $(EXE2) systype