forked from NETWAYS/check_cisco_health
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (27 loc) · 913 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#
# 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=check_cisco_health.o
TARGETS=check_cisco_health
NETSNMP_CONFIG_CFLAGS != net-snmp-config --cflags
CFLAGS += -I. $(NETSNMP_CONFIG_CFLAGS) -Wall -Wextra
BUILDLIBS != net-snmp-config --libs
BUILDAGENTLIBS != net-snmp-config --agent-libs
# shared library flags (assumes gcc)
DLFLAGS=-fPIC -shared
.PHONY: debug clean all
all: build
build: $(TARGETS)
check_cisco_health: check_cisco_health.o
$(CC) -o check_cisco_health $(OBJS1) $(BUILDLIBS)
debug: CFLAGS += -DDEBUG
debug: CFLAGS += -O0
debug: clean all
clean:
rm -f $(OBJS1) $(TARGETS)