?? makefile
字號:
## ipvsadm - IP Virtual Server ADMinistration program# for IPVS NetFilter Module in kernel 2.4## Version: $Id: Makefile,v 1.33 2005/12/10 16:00:07 wensong Exp $## Authors: Wensong Zhang <wensong@linux-vs.org># Peter Kese <peter.kese@ijs.si>## This file:## ChangeLog## Wensong : Modified the Makefile and the spec files so# : that rpms can be created with ipvsadm alone# P.Copeland : Modified the Makefile and the spec files so# : that it is possible to create rpms on the fly# : using 'make rpms'# : Also added NAME, VERSION and RELEASE numbers to# : the Makefile# Horms : Updated to add config_stream.c dynamic_array.c# : Added autodetection of libpot# : Added BUILD_ROOT support# Wensong : Changed the OBJS according to detection# Ratz : Fixed to use the correct CFLAGS on sparc64#NAME = ipvsadmVERSION = $(shell cat VERSION)RELEASE = 6SCHEDULERS = "$(shell cat SCHEDULERS)"PROGROOT = $(shell basename `pwd`)ARCH = $(shell uname -m)RPMSOURCEDIR = $(shell rpm --eval '%_sourcedir')RPMSPECDIR = $(shell rpm --eval '%_specdir')CC = gccINCLUDE = -I/usr/src/linux/include -I.. -I.SBIN = $(BUILD_ROOT)/sbinMANDIR = usr/manMAN = $(BUILD_ROOT)/$(MANDIR)/man8INIT = $(BUILD_ROOT)/etc/rc.d/init.dMKDIR = mkdirINSTALL = installSTATIC_LIBS = libipvs/libipvs.aifeq "${ARCH}" "sparc64" CFLAGS = -Wall -Wunused -Wstrict-prototypes -g -O2 -m64 -pipe -mcpu=ultrasparc -mcmodel=medlowelse CFLAGS = -Wall -Wunused -Wstrict-prototypes -g -O2endif###################################### No servicable parts below this lineRPMBUILD = $(shell \ if [ -x /usr/bin/rpmbuild ]; then \ echo "/usr/bin/rpmbuild"; \ else \ echo "/bin/rpm"; \ fi )ifeq (,$(FORCE_GETOPT))LIB_SEARCH = /lib /usr/lib /usr/local/libPOPT_LIB = $(shell for i in $(LIB_SEARCH); do \ if [ -f $$i/libpopt.a ]; then \ if nm $$i/libpopt.a | fgrep -q poptGetContext; then \ echo "-L$$i -lpopt"; \ fi; \ fi; \done)endififneq (,$(POPT_LIB))POPT_DEFINE = -DHAVE_POPTendifOBJS = ipvsadm.o config_stream.o dynamic_array.oLIBS = $(POPT_LIB)DEFINES = -DVERSION=\"$(VERSION)\" -DSCHEDULERS=\"$(SCHEDULERS)\" \ $(POPT_DEFINE)DEFINES += $(shell if [ ! -f ../ip_vs.h ]; then \ echo "-DHAVE_NET_IP_VS_H"; fi;).PHONY = all clean install dist distclean rpm rpmsall: libs ipvsadmlibs: make -C libipvsipvsadm: $(OBJS) $(STATIC_LIBS) $(CC) $(CFLAGS) -o $@ $^ $(LIBS)install: all if [ ! -d $(SBIN) ]; then $(MKDIR) -p $(SBIN); fi $(INSTALL) -m 0755 -s ipvsadm $(SBIN) $(INSTALL) -m 0755 ipvsadm-save $(SBIN) $(INSTALL) -m 0755 ipvsadm-restore $(SBIN) [ -d $(MAN) ] || $(MKDIR) -p $(MAN) $(INSTALL) -m 0644 ipvsadm.8 $(MAN) $(INSTALL) -m 0644 ipvsadm-save.8 $(MAN) $(INSTALL) -m 0644 ipvsadm-restore.8 $(MAN) if [ -d $(INIT) ]; then \ $(INSTALL) -m 0755 ipvsadm.sh $(INIT)/ipvsadm; \ ficlean: rm -f ipvsadm $(NAME).spec $(NAME)-$(VERSION).tar.gz rm -rf debian/tmp find . -name '*.[ao]' -o -name "*~" -o -name "*.orig" \ -o -name "*.rej" -o -name core | xargs rm -f make -C libipvs cleandistclean: cleandist: distclean sed -e "s/@@VERSION@@/$(VERSION)/g" \ -e "s/@@RELEASE@@/$(RELEASE)/g" \ < ipvsadm.spec.in > ipvsadm.spec rm -f $(NAME)-$(VERSION) ln -s . $(NAME)-$(VERSION) tar czvf $(NAME)-$(VERSION).tar.gz \ --exclude CVS \ --exclude $(NAME)-$(VERSION)/$(NAME)-$(VERSION) \ --exclude $(NAME)-$(VERSION).tar.gz \ $(NAME)-$(VERSION)/* rm -f $(NAME)-$(VERSION)rpms: dist cp $(NAME)-$(VERSION).tar.gz $(RPMSOURCEDIR)/ cp $(NAME).spec $(RPMSPECDIR)/ $(RPMBUILD) -ba $(RPMSPECDIR)/$(NAME).specsrpm: dist cp $(NAME)-$(VERSION).tar.gz $(RPMSOURCEDIR)/ cp $(NAME).spec $(RPMSPECDIR)/ $(RPMBUILD) -bs $(RPMSPECDIR)/$(NAME).specdeb: debsdebs: dpkg-buildpackage%.o: %.c $(CC) $(CFLAGS) $(INCLUDE) $(DEFINES) -c -o $@ $<
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -