87 lines
2.5 KiB
Text
87 lines
2.5 KiB
Text
$NetBSD: patch-ab,v 1.1.1.1 2004/02/24 22:06:57 cube Exp $
|
|
|
|
--- src/Makefile.src.orig Mon Jul 1 04:13:04 2002
|
|
+++ src/Makefile.src Sat Feb 15 10:06:54 2003
|
|
@@ -1,30 +1,36 @@
|
|
GTK_CONFIG ?= gtk-config
|
|
+IMLIB_CONFIG ?= imlib-config
|
|
+PREFIX ?= /usr/local
|
|
EXTRAOBJS ?= md5c.o
|
|
BINMODE ?= 755
|
|
-INSTALLDIR ?= /usr/local/bin
|
|
-INCLUDEDIR ?= /usr/local/include
|
|
+BINGRP ?= wheel
|
|
+INSTALLDIR ?= ${PREFIX}/bin
|
|
+INCLUDEDIR ?= ${PREFIX}/include
|
|
INCLUDEMODE ?= 644
|
|
INCLUDEDIRMODE ?= 755
|
|
-MANDIR ?= /usr/local/share/man/man1
|
|
+MANDIR ?= ${PREFIX}/man/man1
|
|
MANMODE ?= 644
|
|
MANDIRMODE ?= 755
|
|
INSTALL ?= install
|
|
-LINK_FLAGS ?= -Wl,-E
|
|
+LINK_FLAGS ?= $(EXPORT_SYMBOLS_LDFLAGS)
|
|
CC ?= gcc
|
|
STRIP ?= -s
|
|
|
|
GKRELLM_INCLUDES = gkrellm.h gkrellm_public_proto.h
|
|
|
|
GTK_INCLUDE = `$(GTK_CONFIG) --cflags gthread`
|
|
-IMLIB_INCLUDE = `imlib-config --cflags-gdk`
|
|
+IMLIB_INCLUDE = `$(IMLIB_CONFIG) --cflags-gdk`
|
|
|
|
GTK_LIB = `$(GTK_CONFIG) --libs gthread`
|
|
-IMLIB_LIB = `imlib-config --libs-gdk`
|
|
+IMLIB_LIB = `$(IMLIB_CONFIG) --libs-gdk`
|
|
|
|
-FLAGS = -O2 -I.. $(GTK_INCLUDE) $(IMLIB_INCLUDE) $(GTOP_INCLUDE)
|
|
+FLAGS = -I.. $(GTK_INCLUDE) $(IMLIB_INCLUDE) $(GTOP_INCLUDE)
|
|
FLAGS+= $(PTHREAD_INC)
|
|
+FLAGS+= -DSYSTEM_PLUGINS_DIR=\"${PREFIX}/lib/gkrellm/plugins\"
|
|
+FLAGS+= -DSYSTEM_THEMES_DIR=\"${PREFIX}/share/gkrellm/themes\"
|
|
+
|
|
+LIBS = $(GTK_LIB) $(IMLIB_LIB) $(GTOP_LIBS) $(SYS_LIBS) $(LINK_FLAGS)
|
|
|
|
-LIBS = $(GTK_LIB) $(IMLIB_LIB) $(GTOP_LIBS) $(SYS_LIBS)
|
|
|
|
ifeq ($(debug),1)
|
|
FLAGS += -g
|
|
@@ -38,7 +44,9 @@
|
|
FLAGS += -DHAVE_GETADDRINFO
|
|
endif
|
|
|
|
-CC += -Wall $(FLAGS)
|
|
+CC ?= gcc
|
|
+CFLAGS ?= -O2
|
|
+CC += -Wall $(FLAGS) $(CFLAGS)
|
|
|
|
OBJS = main.o alerts.o apm.o base64.o clock.o cpu.o disk.o fs.o hostname.o \
|
|
inet.o mail.o meminfo.o net.o proc.o sensors.o uptime.o \
|
|
@@ -68,15 +76,14 @@
|
|
gkrellm
|
|
|
|
netbsd:
|
|
- $(MAKE) PTHREAD_INC=-I/usr/local/include \
|
|
- GTK_CONFIG=gtk-config GTOP_LIBS= EXTRAOBJS= SYS_LIBS="-lkvm" gkrellm
|
|
+ $(MAKE) GTOP_LIBS= EXTRAOBJS= SYS_LIBS="-lkvm" gkrellm
|
|
|
|
solaris:
|
|
$(MAKE) CFLAGS="-Wno-implicit-int" \
|
|
SYS_LIBS="-lkstat -lkvm -ldevinfo" gkrellm
|
|
|
|
install:
|
|
- $(INSTALL) -c $(STRIP) -m $(BINMODE) gkrellm $(INSTALLDIR)/gkrellm
|
|
+ $(INSTALL) -c $(STRIP) -m $(BINMODE) -g $(BINGRP) gkrellm $(INSTALLDIR)/gkrellm
|
|
$(INSTALL) -d -m $(INCLUDEDIRMODE) $(INCLUDEDIR)/gkrellm
|
|
$(INSTALL) -c -m $(INCLUDEMODE) $(GKRELLM_INCLUDES) $(INCLUDEDIR)/gkrellm
|
|
$(INSTALL) -d -m $(MANDIRMODE) $(MANDIR)
|
|
@@ -87,8 +94,6 @@
|
|
|
|
install_netbsd:
|
|
$(MAKE) install
|
|
- chgrp kmem $(INSTALLDIR)/gkrellm
|
|
- chmod g+s $(INSTALLDIR)/gkrellm
|
|
|
|
install_openbsd:
|
|
$(MAKE) install
|