# # Warning: you may need more libraries than are included here on the # build line. The agent frequently needs various libraries in order # to compile pieces of it, but is OS dependent and we can't list all # the combinations here. Instead, look at the libraries that were # used when linking the snmpd master agent and copy those to this # file. # CC=gcc OBJS1=snmpdemoapp.o OBJS2=example-demon.o nstAgentSubagentObject.o OBJS3=asyncapp.o OBJS4=myapp.o OBJS5=apcsnmp.o main.o # TARGETS=example-demon snmpdemoapp asyncapp TARGETS=snmpdemoapp myapp apcsnmp CFLAGS=-I. `net-snmp-config --cflags` -Wall BUILDLIBS=`net-snmp-config --libs` BUILDAGENTLIBS=`net-snmp-config --agent-libs` HA_DIR=/home/fil/work/heartbeat/heartbeat-2.1.2 # shared library flags (assumes gcc) DLFLAGS=-fPIC -shared all: $(TARGETS) apcsnmp.c: apcsnmp.h main.c: apcsnmp.h snmpdemoapp: $(OBJS1) $(CC) -o snmpdemoapp $(OBJS1) $(BUILDLIBS) apcsnmp: $(OBJS5) $(CC) -o apcsnmp $(OBJS5) $(BUILDLIBS) myapp: $(OBJS4) $(CC) -o myapp $(OBJS4) $(BUILDLIBS) asyncapp: $(OBJS3) $(CC) -o asyncapp $(OBJS3) $(BUILDLIBS) example-demon: $(OBJS2) $(CC) -o example-demon $(OBJS2) $(BUILDAGENTLIBS) clean: rm $(OBJS1) $(OBJS2) $(OBJS3) $(TARGETS) $(OBJS4) nstAgentPluginObject.so: nstAgentPluginObject.c Makefile $(CC) $(CFLAGS) $(DLFLAGS) -c -o nstAgentPluginObject.o nstAgentPluginObject.c $(CC) $(CFLAGS) $(DLFLAGS) -o nstAgentPluginObject.so nstAgentPluginObject.o plugin.o: plugin.c apcsnmp.h $(HA_DIR)/libtool --tag=CC --mode=compile --tag=CC \ gcc -DHAVE_CONFIG_H -I. -I. -I$(HA_DIR)/include -I$(HA_DIR)/include \ -I$(HA_DIR)/include -I$(HA_DIR)/include -I$(HA_DIR)/linux-ha \ -I$(HA_DIR)/linux-ha -I$(HA_DIR)/libltdl -I$(HA_DIR)/libltdl \ -I$(HA_DIR)/lib/plugins/stonith \ -D_BSD_SOURCE -D__BSD_SOURCE -D__FAVOR_BSD \ -DHAVE_NET_ETHERNET_H -I/usr/include/glib-2.0 \ -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 \ -g -O2 -Wall -Wmissing-prototypes -Wmissing-declarations \ -Wbad-function-cast -Winline -Wmissing-format-attribute \ -Werror \ -Wformat=2 -Wformat-security -Wformat-nonliteral \ -Wno-long-long -Wno-strict-aliasing \ -Wpointer-arith -Wwrite-strings -Wcast-qual -Wcast-align \ -Wstrict-prototypes -Wdeclaration-after-statement \ -DST_TEXTDOMAIN='"stonith"' -DSTONITH_MODULES='""' \ -DLOCALEDIR='"/usr/share/locale"' \ -ggdb3 -funsigned-char \ -MT plugin.o -MD -MP -c -o plugin.o plugin.c