# $Id: Makefile 485 2012-07-01 20:49:37Z elkner $
#MAKEFILESUFFIX = .solaris
PROG = k10addon-info
VERS = .1
LIBRARY = libgkrellm_k10.a
default: all
SRCS = k10.c
LIB_SRCS = k10.c
include ../config.mk
include ../Makefile.master
C99MODE = $(C99_ENABLE)
GKRELLM_INCLUDES=$(ROOT4BUILD)/usr/include/gkrellm2
# Comment out the following block to disable DTRACE support
PROBES.ENABLED = -DENABLE_DTRACE
PROBES.d = $(GKRELLM_INCLUDES)/probes.d
PROBES.h = probes.h
PROBES.pics = pics/probes.o
PROBES.objs = probes.o
PROBES.deps = $(SRCS)
CPPFLAGS += -I. $(GLIB_INCLUDES) -I$(GKRELLM_INCLUDES) $(PROBES.ENABLED)
LDFLAGS += $(GLIB_LIBS) -lkstat
$(DYNLIB) := LDFLAGS += -lc
probes.h: $(PROBES.d)
$(DTRACE) $(DTRACEFLAGS$(BT:32=)) -h -s $(PROBES.d) -o $@
pics/probes.o: $(PROBES.deps:%.c=pics/%.o)
$(COMPILE$(BT:32=).d) -s $(PROBES.d) $(PROBES.deps:%.c=pics/%.o) -o $@
probes.o: $(PROBES.deps:%.c=%.o)
$(COMPILE$(BT:32=).d) -s $(PROBES.d) $(PROBES.deps:%.c=%.o) -o $@
$(PICS) $(OBJS): $(PROBES.h)
CLEANFILES += probes.h
PICS += $(PROBES.pics)
OBJS += $(PROBES.objs)
$(DYNLIB): $(PROBES.pics)
$(PROG): $(PROBES.objs)
GKRELLMLIBDIR = $(ROOTUSRLIB)/gkrellm
GKRELLMPLUGDIR = $(GKRELLMLIBDIR)/plugins
GKRELLMPLUGINS = $(DYNLIB:%=$(GKRELLMPLUGDIR)/%)
GKRELLMPLUGINS := FILEMODE = 0755
install: $(GKRELLMPLUGINS)
$(GKRELLMLIBDIR): $(ROOTUSRLIB)
$(INS.dir)
$(GKRELLMPLUGDIR): $(GKRELLMLIBDIR)
$(INS.dir)
$(GKRELLMPLUGDIR)/%: $(GKRELLMPLUGDIR) %
$(INS.file)
lib: $(DYNLIB)
prog: $(PROG)
progs: prog
all: lib prog
CLOBBERDIRS += pics
.KEEP_STATE:
.PARALLEL: