Skip to content

Instantly share code, notes, and snippets.

@negima1976
Created November 21, 2013 07:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save negima1976/7577478 to your computer and use it in GitHub Desktop.
Save negima1976/7577478 to your computer and use it in GitHub Desktop.
net-snmp-config-module install for 64bit
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