"Fossies" - the Fresh Open Source Software Archive

Member "procmeter3-3.6+svn387/modules/Makefile" (8 Jan 2012, 1574 Bytes) of package /linux/misc/procmeter3-3.6+svn387.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 # ProcMeter - A system monitoring program for Linux - Version 3.6.
    2 #
    3 # Makefile for the modules.
    4 #
    5 # Written by Andrew M. Bishop
    6 #
    7 # This file Copyright 1994-2012 Andrew M. Bishop
    8 # It may be distributed under the GNU Public License, version 2, or
    9 # any higher version.  See section COPYING of the GNU Public license
   10 # for conditions under which this file may be redistributed.
   11 #
   12 
   13 # Paths (overridden by main Makefile)
   14 
   15 INSTDIR=/usr/local
   16 LIB_PATH=$(INSTDIR)/lib/ProcMeter3
   17 MOD_PATH=$(LIB_PATH)/modules
   18 
   19 # Programs
   20 
   21 CC=gcc
   22 LD=gcc
   23 
   24 # Program options (overridden by main Makefile)
   25 
   26 CFLAGS=-g -O2 -Wall
   27 LDFLAGS=-g
   28 
   29 # Compilation targets
   30 
   31 SRC=$(wildcard *.c)
   32 OBJ=$(foreach f,$(SRC),$(addsuffix .o,$(basename $f)))
   33 LIB=$(foreach f,$(SRC),$(addsuffix .so,$(basename $f)))
   34 
   35 ########
   36 
   37 all : $(OBJ) $(LIB)
   38 
   39 ########
   40 
   41 libsensors-%.o:libsensors-%.c
   42 	./check-no-libsensors.sh '$(CC)' '$(CFLAGS)' || $(CC) -c $(CFLAGS) $< -o $@ -I.. -fPIC
   43 
   44 libsensors-%.so:libsensors-%.o
   45 	[ ! -f $< ] || $(LD) $(LDFLAGS) $< -lsensors -o $@ -shared
   46 
   47 %.o:%.c ../procmeter.h
   48 	$(CC) -c $(CFLAGS) $< -o $@ -I.. -fPIC
   49 
   50 %.so:%.o
   51 	$(LD) $(LDFLAGS) $< -o $@ -shared
   52 
   53 ########
   54 
   55 .PHONY : clean distclean
   56 
   57 clean :
   58 	-rm -f *.o *~ core
   59 
   60 distclean : clean
   61 	-rm -f *.so
   62 
   63 ########
   64 
   65 .PHONY : install
   66 
   67 install :
   68 	install -d $(DESTDIR)$(MOD_PATH)
   69 	install -d $(DESTDIR)$(LIB_PATH)/example
   70 	for module in *.so ; do \
   71 	   [ $$module = template.so ] || install $(STRIP) -m 755 $$module $(DESTDIR)$(MOD_PATH) ;\
   72 	done
   73 	install -m 644 README $(DESTDIR)$(LIB_PATH)/example
   74 	install -m 644 template.c $(DESTDIR)$(LIB_PATH)/example