"Fossies" - the Fresh Open Source Software Archive

Member "procmeter3-3.6+svn387/gtk2/Makefile" (8 Jan 2012, 1944 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 gtk2 parts.
    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 # Programs
   14 
   15 CC=gcc
   16 LD=gcc
   17 
   18 # Program options
   19 
   20 CFLAGS=-g -O2 -Wall
   21 LDFLAGS=-g
   22 
   23 X_CFLAGS=`pkg-config --cflags gtk+-2.0`
   24 X_LDFLAGS=`pkg-config --libs gtk+-2.0` -lX11
   25 
   26 # Check for GTK2 development libraries and headers
   27 
   28 HAVE_GTK2:=$(shell pkg-config --modversion gtk+-2.0)
   29 
   30 ifdef HAVE_GTK2
   31   ALL=all-gtk2
   32 else
   33   ALL=all-no-gtk2
   34 endif
   35 
   36 # Compilation targets
   37 
   38 SRC=$(wildcard *.c)
   39 OBJ=$(foreach f,$(SRC),$(addsuffix .o,$(basename $f)))
   40 
   41 PSRC=$(wildcard ../*.c)
   42 POBJ=$(foreach f,$(PSRC),$(addsuffix .o,$(basename $f)))
   43 
   44 WSRC=$(wildcard widgets/*.c)
   45 WOBJ=$(foreach f,$(WSRC),$(addsuffix .o,$(basename $f)))
   46 
   47 ########
   48 
   49 all : $(ALL)
   50 
   51 all-no-gtk2 :
   52 	@echo "ProcMeter:"
   53 	@echo "ProcMeter: GTK2 is not installed (pkg-config could not find it)."
   54 	@echo "ProcMeter: Cannot compile procmeter3-gtk2 program."
   55 	@echo "ProcMeter:"
   56 
   57 all-gtk2 : ../procmeter3-gtk2
   58 
   59 ########
   60 
   61 ../procmeter3-gtk2 : $(OBJ) $(WOBJ) $(POBJ)
   62 	$(LD) $(OBJ) $(WOBJ) $(POBJ) -o $@ $(LDFLAGS) $(X_LDFLAGS) -ldl -rdynamic
   63 
   64 ########
   65 
   66 %.o:%.c
   67 	$(CC) -c $(CFLAGS) $< -o $@ $(X_CFLAGS) -I..
   68 
   69 resources.o : resources.c ../procmeterp.h ../procmeter.h window.h
   70 menus.o     : menus.c     ../procmeterp.h ../procmeter.h window.h
   71 window.o    : window.c    ../procmeterp.h ../procmeter.h window.h
   72 run.o       : run.c       ../procmeterp.h ../procmeter.h window.h
   73 
   74 ########
   75 
   76 $(WOBJ) :
   77 	$(MAKE) CFLAGS="$(CFLAGS)" X_CFLAGS="$(X_CFLAGS)" -C widgets
   78 
   79 ########
   80 
   81 $(POBJ) :
   82 	$(MAKE) CFLAGS="$(CFLAGS)" -C .. obj
   83 
   84 ########
   85 
   86 .PHONY : clean
   87 
   88 clean :
   89 	-rm -f *.o *~ core
   90 	$(MAKE) -C widgets clean
   91 
   92 ########
   93 
   94 .PHONY : install
   95 
   96 install :