"Fossies" - the Fresh Open Source Software Archive

Member "gkrellm_snmp-1.1/Makefile" (3 Jan 2009, 1261 Bytes) of package /linux/privat/old/gkrellm_snmp-1.1.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 # Makefile for a GKrellM SNMP monitor plugin
    2 
    3 # Linux
    4 GTK_CONFIG ?= pkg-config gtk+-2.0
    5 SNMPLIB = -lnetsnmp
    6 SYSLIB ?= $(SNMPLIB)
    7 # older systems need lib crypto if libsnmp has privacy support.
    8 # SYSLIB += -L/usr/local/ssl/lib -L/usr/ssl/lib -lcrypto
    9 
   10 USER_PLUGIN_DIR ?= $(HOME)/.gkrellm2/plugins
   11 PLUGIN_DIR ?= /usr/lib/gkrellm2/plugins
   12 GKRELLM_INCLUDE ?= -I/usr/X11R6/include
   13 
   14 GTK_INCLUDE = `$(GTK_CONFIG) --cflags`
   15 GTK_LIB = `$(GTK_CONFIG) --libs`
   16 
   17 CFLAGS += -Wall -fPIC $(GTK_INCLUDE) $(GKRELLM_INCLUDE)
   18 LIBS = $(GTK_LIB) $(SYSLIB)
   19 LFLAGS ?= -shared
   20 
   21 INSTALL ?= install -c
   22 STRIP ?= strip -x
   23 
   24 OBJS = gkrellm_snmp.o
   25 
   26 all:	gkrellm_snmp.so
   27 
   28 osx:
   29 	make LFLAGS="-bundle -undefined suppress -flat_namespace"
   30 
   31 freebsd:
   32 	make GTK_CONFIG=gtk12-config SYSLIB=-lsnmp PLUGIN_DIR=/usr/X11R6/libexec/gkrellm/plugins
   33 
   34 ucdsnmp:
   35 	make CFLAGS="-DUCDSNMP" SNMPLIB="-lsnmp"
   36 
   37 gkrellm_snmp.so:	$(OBJS)
   38 	$(CC) $(OBJS) -o gkrellm_snmp.so $(LFLAGS) $(LIBS)
   39 
   40 clean:
   41 	rm -f *.o core *.so* *.bak *~
   42 
   43 install-user:	gkrellm_snmp.so
   44 	make PLUGIN_DIR=$(USER_PLUGIN_DIR) install
   45 
   46 install:	gkrellm_snmp.so
   47 	$(INSTALL) -m 755 -d $(DESTDIR)$(PLUGIN_DIR)
   48 	$(INSTALL) -m 755 gkrellm_snmp.so $(DESTDIR)$(PLUGIN_DIR)
   49 	$(STRIP) $(DESTDIR)$(PLUGIN_DIR)/gkrellm_snmp.so
   50 
   51 gkrellm_snmp.o:	gkrellm_snmp.c
   52