File: Makefile

package info (click to toggle)
s390-tools 2.3.0-1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 6,176 kB
  • sloc: ansic: 87,755; sh: 8,398; cpp: 8,384; perl: 3,783; makefile: 1,476; asm: 654
file content (43 lines) | stat: -rw-r--r-- 877 bytes parent folder | download
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
37
38
39
40
41
42
43
include ../common.mak
LDLIBS = `net-snmp-config --agent-libs`
# On some Linux systems `net-snmp-config --agent-libs` introduces -pie,
# therefore add -fPIC to prevent link failures.
ALL_CFLAGS += -fPIC
ALL_CFLAGS += `net-snmp-config --cflags`

OBJS = ibmOSAMib.o ibmOSAMibUtil.o osasnmpd.o

ifeq (${HAVE_SNMP},0)

all:
	$(SKIP) HAVE_SNMP=0

install:
	$(SKIP) HAVE_SNMP=0

else

check_dep:
	$(call check_dep, \
		"osasnmpd", \
		"net-snmp/net-snmp-config.h", \
		"net-snmp-devel or libsnmp-dev", \
		"HAVE_SNMP=0")

all: check_dep osasnmpd

osasnmpd: $(OBJS)

install: all
	$(INSTALL) -d -m 755 $(DESTDIR)$(USRSBINDIR) $(DESTDIR)$(MANDIR)/man8
	$(INSTALL) -g $(GROUP) -o $(OWNER) -m 755 osasnmpd \
		$(DESTDIR)$(USRSBINDIR)
	$(INSTALL) -g $(GROUP) -o $(OWNER) -m 644 osasnmpd.8 \
		$(DESTDIR)$(MANDIR)/man8

endif

clean:
	rm -f $(OBJS) osasnmpd core

.PHONY: all install clean