-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (32 loc) · 795 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
37
38
39
40
41
# This software is distributed under the following license:
# http://host-sflow.sourceforge.net/license.html
PROG=hsflowd
VERSION=0.94
RPM_SOURCES_DIR=/usr/src/redhat/SOURCES
MY_SOURCES_DIR=$(RPM_SOURCES_DIR)/hsflowd-$(VERSION)
ifeq ($(BINDIR),)
BINDIR=/usr/local/sbin
endif
ifeq ($(INITDIR),)
INITDIR=/etc/init.d
endif
ifeq ($(CONFDIR),)
CONFDIR=/etc
endif
PLATFORM=$(shell uname)
all: hsflowd
hsflowd:
cd src/sflow; $(MAKE)
cd src/$(PLATFORM); $(MAKE)
clean:
cd src/sflow; $(MAKE) clean
cd src/$(PLATFORM); $(MAKE) clean
install:
cd src/$(PLATFORM); $(MAKE) install
schedule:
cd src/$(PLATFORM); $(MAKE) schedule
rpm:
rm -rf $(MY_SOURCES_DIR)
cp -r . $(MY_SOURCES_DIR)
tar cz -C $(RPM_SOURCES_DIR) -f $(MY_SOURCES_DIR).tar.gz hsflowd-$(VERSION)
rpmbuild -ba hsflowd.spec