Created
November 21, 2013 07:45
-
-
Save negima1976/7577478 to your computer and use it in GitHub Desktop.
net-snmp-config-module install for 64bit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NAME = net-snmp-lvs-module | |
VERSION=$(shell cat VERSION) | |
VERSDIR := $(NAME)-$(VERSION) | |
TARFILE := $(NAME)-$(VERSION).tar.gz | |
CC := gcc | |
CFLAGS := -fPIC `net-snmp-config --cflags` -Ilibipvs -I/usr/local/src/linux-2.6.32.27/include -Wall -g | |
DEFINES := -DHAVE_NET_IP_VS_H | |
DLFLAGS := -fPIC -shared -g | |
LIBS := `net-snmp-config --netsnmp-libs` | |
LIBIPVS := libipvs/libipvs.a | |
DLFLAGS := -fPIC -shared | |
all: libipvs/libipvs.a lvs.so | |
$(LIBIPVS): | |
make -C libipvs | |
%.o: %.c | |
$(CC) $(CFLAGS) $(DEFINES) -c -o $@ $< | |
%.so: %.o $(LIBIPVS) | |
$(LD) $(DLFLAGS) $(LIBS) -o $@ $< $(LIBIPVS) | |
clean: | |
make -C libipvs clean | |
rm -f lvs.o lvs.so | |
tar: clean | |
cd ..; \ | |
ln -s $(NAME) $(VERSDIR); \ | |
tar czf $(TARFILE) --exclude CVS --dereference $(VERSDIR); \ | |
rm $(VERSDIR) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment