makefile
来自「xen虚拟机源代码安装包」· 代码 · 共 87 行
TXT
87 行
ifndef VNET_ROOTexport VNET_ROOT = $(shell cd .. && pwd)include $(VNET_ROOT)/Make.envendifinclude $(XEN_ROOT)/tools/Rules.mkLIB_SRCS :=LIB_SRCS += allocate.cLIB_SRCS += enum.cLIB_SRCS += file_stream.c#LIB_SRCS += gzip_stream.cLIB_SRCS += hash_table.cLIB_SRCS += iostream.cLIB_SRCS += lexis.cLIB_SRCS += mem_stream.cLIB_SRCS += string_stream.cLIB_SRCS += sxpr.cLIB_SRCS += sxpr_parser.cLIB_SRCS += sys_net.cLIB_SRCS += sys_string.cLIB_SRCS += util.cLIB_OBJS := $(LIB_SRCS:.c=.o)PIC_OBJS := $(LIB_SRCS:.c=.opic)CFLAGS += -Werror -fno-strict-aliasing $(call cc-option,$(CC),-fgnu89-inline,)CFLAGS += -O3#CFLAGS += -g# Get gcc to generate the dependencies for us.CFLAGS += -Wp,-MD,.$(@F).dDEPS = .*.dMAJOR := 3.0MINOR := 0LIB := libxutil.so LIB += libxutil.so.$(MAJOR)LIB += libxutil.so.$(MAJOR).$(MINOR)LIB += libxutil.a.PHONY: allall: build.PHONY: buildbuild: #check-for-zlib $(MAKE) $(LIB)gzip_stream.o: check-for-zliblibxutil.so: libxutil.so.$(MAJOR) ln -sf $^ $@libxutil.so.$(MAJOR): libxutil.so.$(MAJOR).$(MINOR) ln -sf $^ $@libxutil.so.$(MAJOR).$(MINOR): $(PIC_OBJS) $(CC) $(CFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxutil.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $^libxutil.a: $(LIB_OBJS) $(AR) rc $@ $^.PHONY: check-for-zlibcheck-for-zlib: @if [ ! -e /usr/include/zlib.h ]; then \ echo "***********************************************************"; \ echo "ERROR: install zlib header files (http://www.gzip.org/zlib)"; \ echo "***********************************************************"; \ false; \ fi.PHONY: installinstall: build $(INSTALL_DIR) $(DESTDIR)$(LIBDIR) $(INSTALL_PROG) libxutil.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR) $(INSTALL_DATA) libxutil.a $(DESTDIR)$(LIBDIR) ln -sf libxutil.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxutil.so.$(MAJOR) ln -sf libxutil.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxutil.so.PHONY: cleanclean: -@$(RM) *.a *.so* *.o *.opic *.rpm -@$(RM) *~ -@$(RM) $(DEPS)-include $(DEPS)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?