?? makefile
字號:
# echo -e 'all: busybox.sh Config.h\n\t@ $$(SHELL) $$^ $$(BB_SRC_DIR)' >slist.mk; \# make -f slist.mk VPATH=$(VPATH) BB_SRC_DIR=$(BB_SRC_DIR) \#)# And option 4:-include applet_source_listOBJECTS = $(APPLET_SOURCES:.c=.o) busybox.o usage.o applets.oCFLAGS += $(CROSS_CFLAGS)CFLAGS += -DBB_VER='"$(VERSION)"'CFLAGS += -DBB_BT='"$(BUILDTIME)"'ifdef BB_INIT_SCRIPT CFLAGS += -DINIT_SCRIPT='"$(BB_INIT_SCRIPT)"'endififneq ($(strip $(USE_SYSTEM_PWD_GRP)),true) PWD_GRP = pwd_grp PWD_GRP_DIR = $(BB_SRC_DIR:=/)$(PWD_GRP) PWD_LIB = libpwd.a PWD_CSRC=__getpwent.c pwent.c getpwnam.c getpwuid.c putpwent.c getpw.c \ fgetpwent.c __getgrent.c grent.c getgrnam.c getgrgid.c fgetgrent.c \ initgroups.c setgroups.c PWD_OBJS=$(patsubst %.c,$(PWD_GRP)/%.o, $(PWD_CSRC))ifneq ($(strip $(BB_SRC_DIR)),) PWD_CFLAGS = -I- -I.endif PWD_CFLAGS += -I$(PWD_GRP_DIR)else CFLAGS += -DUSE_SYSTEM_PWD_GRPendif LIBBB = libbbLIBBB_LIB = libbb.aLIBBB_CSRC= ask_confirmation.c chomp.c concat_path_file.c copy_file.c \copy_file_chunk.c libc5.c device_open.c error_msg.c inode_hash.c \error_msg_and_die.c fgets_str.c find_mount_point.c find_pid_by_name.c \find_root_device.c full_read.c full_write.c get_console.c \get_last_path_component.c get_line_from_file.c gz_open.c human_readable.c \isdirectory.c kernel_version.c loop.c mode_string.c module_syscalls.c mtab.c \mtab_file.c my_getgrnam.c my_getgrgid.c my_getpwnam.c my_getpwnamegid.c \my_getpwuid.c parse_mode.c parse_number.c perror_msg.c perror_msg_and_die.c \print_file.c process_escape_sequence.c read_package_field.c recursive_action.c \safe_read.c safe_strncpy.c syscalls.c syslog_msg_with_name.c time_string.c \trim.c unzip.c vdprintf.c verror_msg.c vperror_msg.c wfopen.c xfuncs.c \xgetcwd.c xreadlink.c xregcomp.c interface.c remove_file.c last_char_is.c \copyfd.c vherror_msg.c herror_msg.c herror_msg_and_die.c xgethostbyname.c \dirname.c make_directory.c create_icmp_socket.c u_signal_names.c arith.c \simplify_path.cLIBBB_OBJS=$(patsubst %.c,$(LIBBB)/%.o, $(LIBBB_CSRC))ifeq ($(strip $(BB_SRC_DIR)),) LIBBB_CFLAGS += -I$(LIBBB)else LIBBB_CFLAGS = -I- -I. -I./$(LIBBB) -I$(BB_SRC_DIR)/$(LIBBB) -I$(BB_SRC_DIR)endifLIBBB_MSRC=libbb/messages.cLIBBB_MESSAGES= full_version name_too_long omitting_directory not_a_directory \memory_exhausted invalid_date invalid_option io_error dash_dash_help \write_error too_few_args name_longer_than_foo unknown can_not_create_raw_socketLIBBB_MOBJ=$(patsubst %,$(LIBBB)/%.o, $(LIBBB_MESSAGES))LIBBB_ARCSRC=libbb/unarchive.cLIBBB_ARCOBJ= archive_offset seek_sub_file extract_archive unarchive \get_header_ar get_header_cpio get_header_tar deb_extractLIBBB_AROBJS=$(patsubst %,$(LIBBB)/%.o, $(LIBBB_ARCOBJ))# Put user-supplied flags at the end, where they# have a chance of winning.CFLAGS += $(CFLAGS_EXTRA).EXPORT_ALL_VARIABLES:all: applet_source_list busybox busybox.links docapplet_source_list: busybox.sh Config.h (echo -n "APPLET_SOURCES := "; CC="$(CC)" BB_SRC_DIR="$(BB_SRC_DIR)" $(SHELL) $^) > $@doc: olddoc# Old Docs...olddoc: docs/busybox.pod docs/BusyBox.txt docs/BusyBox.1 docs/BusyBox.htmldocs/busybox.pod : docs/busybox_header.pod usage.h docs/busybox_footer.pod - ( cat docs/busybox_header.pod; \ docs/autodocifier.pl usage.h; \ cat docs/busybox_footer.pod ) > docs/busybox.poddocs/BusyBox.txt: docs/busybox.pod @echo @echo BusyBox Documentation @echo -mkdir -p docs -pod2text $< > $@docs/BusyBox.1: docs/busybox.pod - mkdir -p docs - pod2man --center=BusyBox --release="version $(VERSION)" \ $< > $@docs/BusyBox.html: docs/busybox.pod -@ mkdir -p docs - pod2html --noindex $< > docs/BusyBox.html -@ rm -f pod2htm*# New docs based on DOCBOOK SGMLnewdoc: docs/busybox.txt docs/busybox.pdf docs/busybox/busyboxdocumentation.htmldocs/busybox.txt: docs/busybox.sgml @echo @echo BusyBox Documentation @echo - mkdir -p docs (cd docs; sgmltools -b txt busybox.sgml)docs/busybox.dvi: docs/busybox.sgml - mkdir -p docs (cd docs; sgmltools -b dvi busybox.sgml)docs/busybox.ps: docs/busybox.sgml - mkdir -p docs (cd docs; sgmltools -b ps busybox.sgml)docs/busybox.pdf: docs/busybox.ps - mkdir -p docs (cd docs; ps2pdf busybox.ps)docs/busybox/busyboxdocumentation.html: docs/busybox.sgml - mkdir -p docs (cd docs; sgmltools -b html ../busybox.sgml)busybox: $(PWD_LIB) $(LIBBB_LIB) $(OBJECTS) $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBBB_LIB) $(PWD_LIB) $(LIBRARIES) $(STRIPCMD) $(PROG)# Without VPATH, rule expands to "/bin/sh busybox.mkll Config.h applets.h"# but with VPATH, some or all of those file names are resolved to the# directories in which they live.busybox.links: busybox.mkll Config.h applets.h - $(SHELL) $^ >$@nfsmount.o cmdedit.o: %.o: %.hash.o hush.o lash.o msh.o: cmdedit.h$(OBJECTS): %.o: %.c Config.h busybox.h applets.h Makefileifeq ($(strip $(BB_SRC_DIR)),) $(CC) $(CFLAGS) -I. $(patsubst %,-I%,$(subst :, ,$(BB_SRC_DIR))) -c $< -o $*.oelse $(CC) $(CFLAGS) -I- -I. $(patsubst %,-I%,$(subst :, ,$(BB_SRC_DIR))) -c $< -o $*.oendif$(PWD_OBJS): %.o: %.c Config.h busybox.h applets.h Makefileifneq ($(strip $(BB_SRC_DIR)),) -mkdir -p $(PWD_GRP)endif $(CC) $(CFLAGS) $(PWD_CFLAGS) -c $< -o $*.o$(LIBBB_OBJS): %.o: %.c Config.h busybox.h applets.h Makefile libbb/libbb.hifneq ($(strip $(BB_SRC_DIR)),) -mkdir -p $(LIBBB)endif $(CC) $(CFLAGS) $(LIBBB_CFLAGS) -c $< -o $*.o$(LIBBB_MOBJ): $(LIBBB_MSRC)ifneq ($(strip $(BB_SRC_DIR)),) -mkdir -p $(LIBBB)endif $(CC) $(CFLAGS) $(LIBBB_CFLAGS) -DL_$(patsubst libbb/%,%,$*) -c $< -o $*.o$(LIBBB_AROBJS): $(LIBBB_ARCSRC)ifneq ($(strip $(BB_SRC_DIR)),) -mkdir -p $(LIBBB)endif $(CC) $(CFLAGS) $(LIBBB_CFLAGS) -DL_$(patsubst libbb/%,%,$*) -c $< -o $*.olibpwd.a: $(PWD_OBJS) $(AR) $(ARFLAGS) $@ $^libbb.a: $(LIBBB_MOBJ) $(LIBBB_AROBJS) $(LIBBB_OBJS) $(AR) $(ARFLAGS) $@ $^usage.o: usage.hlibbb/loop.o: libbb/loop.hlibbb/loop.h: mk_loop_h.sh @ $(SHELL) $< > $@test tests: # old way of doing it #cd tests && $(MAKE) all # new way of doing it cd tests && ./tester.shclean: - cd tests && $(MAKE) clean - rm -f docs/BusyBox.txt docs/BusyBox.1 docs/BusyBox.html docs/BusyBox.html - rm -f docs/busybox.txt docs/busybox.dvi docs/busybox.ps \ docs/busybox.pdf docs/busybox.html docs/busybox.pod - rm -f multibuild.log Config.h.orig *.gdb *.elf - rm -rf docs/busybox _install libpwd.a libbb.a pod2htm* - rm -f busybox busybox.links libbb/loop.h *~ slist.mk core applet_source_list - find . -name \*.o -exec rm -f {} \;distclean: clean - cd tests && $(MAKE) distclean - rm -f busybox applet_source_listinstall: install.sh busybox busybox.links $(SHELL) $< $(PREFIX)uninstall: busybox busybox.links for i in `cat busybox.links` ; do rm -f $$PREFIX$$i; doneinstall-hardlinks: install.sh busybox busybox.links $(SHELL) $< $(PREFIX) --hardlinksdebug_pristine: @ echo VPATH=\"$(VPATH)\" @ echo OBJECTS=\"$(OBJECTS)\"dist release: distclean doc cd ..; \ rm -rf busybox-$(VERSION); \ cp -a busybox busybox-$(VERSION); \ \ find busybox-$(VERSION)/ -type d \ -name CVS \ -print \ -exec rm -rf {} \; ; \ \ find busybox-$(VERSION)/ -type f \ -name .\#* \ -print \ -exec rm -f {} \; ; \ \ tar -cvzf busybox-$(VERSION).tar.gz busybox-$(VERSION)/;.PHONY: tagstags: ctags -R .
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -