1 # -*- makefile -*- : Force emacs to use Makefile mode
3 # This file contains various boring housekeeping functions that would
4 # otherwise seriously clutter up the main Makefile.
6 # Objects to be removed by "make clean"
8 CLEANUP := $(BIN)/*.* # *.* to avoid catching the "CVS" directory
10 # Version number calculations
16 MM_VERSION = $(VERSION_MAJOR).$(VERSION_MINOR)
17 VERSION = $(MM_VERSION).$(VERSION_PATCH)$(EXTRAVERSION)
18 CFLAGS += -DVERSION_MAJOR=$(VERSION_MAJOR) \
19 -DVERSION_MINOR=$(VERSION_MINOR) \
20 -DVERSION=\"$(VERSION)\"
21 IDENT = '$(@F) $(VERSION) (GPL) etherboot.org'
25 # Check for tools that can cause failed builds
27 .toolcheck : Makefile Config
28 @if $(CC) -v 2>&1 | grep -is 'gcc version 2\.96' > /dev/null; then \
29 $(ECHO) 'gcc 2.96 is unsuitable for compiling Etherboot'; \
30 $(ECHO) 'Use gcc 2.95 or gcc 3.x instead'; \
33 @if [ `perl -e 'use bytes; print chr(255)' | wc -c` = 2 ]; then \
34 $(ECHO) 'Your Perl version has a Unicode handling bug'; \
35 $(ECHO) 'Execute this command before compiling Etherboot:'; \
36 $(ECHO) 'export LANG=$${LANG%.UTF-8}'; \
40 VERYCLEANUP += .toolcheck
42 # Find a usable "echo -e" substitute.
44 TAB := $(shell $(PRINTF) '\t')
45 ECHO_E_ECHO := $(ECHO)
46 ECHO_E_ECHO_E := $(ECHO) -e
47 ECHO_E_BIN_ECHO := /bin/echo
48 ECHO_E_BIN_ECHO_E := /bin/echo -e
49 ECHO_E_ECHO_TAB := $(shell $(ECHO_E_ECHO) '\t' | cat)
50 ECHO_E_ECHO_E_TAB := $(shell $(ECHO_E_ECHO_E) '\t' | cat)
51 ECHO_E_BIN_ECHO_TAB := $(shell $(ECHO_E_BIN_ECHO) '\t')
52 ECHO_E_BIN_ECHO_E_TAB := $(shell $(ECHO_E_BIN_ECHO_E) '\t')
54 ifeq ($(ECHO_E_ECHO_TAB),$(TAB))
55 ECHO_E ?= $(ECHO_E_ECHO)
57 ifeq ($(ECHO_E_ECHO_E_TAB),$(TAB))
58 ECHO_E ?= $(ECHO_E_ECHO_E)
60 ifeq ($(ECHO_E_BIN_ECHO_TAB),$(TAB))
61 ECHO_E ?= $(ECHO_E_BIN_ECHO)
63 ifeq ($(ECHO_E_BIN_ECHO_E_TAB),$(TAB))
64 ECHO_E ?= $(ECHO_E_BIN_ECHO_E)
71 @$(PRINTF) '%24s : x%sx\n' 'tab' '$(TAB)'
72 @$(PRINTF) '%24s : x%sx\n' '"$(ECHO_E_ECHO) \t"' \
74 @$(PRINTF) '%24s : x%sx\n' '"$(ECHO_E_ECHO_E) \t"' \
75 '$(ECHO_E_ECHO_E_TAB)'
76 @$(PRINTF) '%24s : x%sx\n' '"$(ECHO_E_BIN_ECHO) \t"' \
77 '$(ECHO_E_BIN_ECHO_TAB)'
78 @$(PRINTF) '%24s : x%sx\n' '"$(ECHO_E_BIN_ECHO_E) \t"' \
79 '$(ECHO_E_BIN_ECHO_E_TAB)'
80 @$(ECHO) "No usable \"echo -e\" substitute found"
83 VERYCLEANUP += .echocheck
86 @$(ECHO) "Using \"$(ECHO_E)\" for \"echo -e\""
98 # Check for an old version of gas (binutils 2.9.1)
100 OLDGAS := $(shell $(AS) --version | grep -q '2\.9\.1' && $(ECHO) -DGAS291)
105 # Some widespread patched versions of gcc include -fstack-protector by
106 # default, even when -ffreestanding is specified. We therefore need
107 # to disable -fstack-protector if the compiler supports it.
109 SP_TEST = $(CC) -fno-stack-protector -x c -E - < /dev/null >/dev/null 2>&1
110 SP_FLAGS := $(shell $(SP_TEST) && $(ECHO) '-fno-stack-protector')
111 CFLAGS += $(SP_FLAGS)
113 # compiler.h is needed for our linking and debugging system
115 CFLAGS += -include compiler.h
117 # config/%.h files are generated from config.h using mkconfig.pl
118 config/%.h : config.h
120 CLEANUP += config/*.h
122 # SRCDIRS lists all directories containing source files.
126 # SRCS lists all .c or .S files found in any SRCDIR
128 SRCS += $(wildcard $(patsubst %,%/*.c,$(SRCDIRS)))
129 SRCS += $(wildcard $(patsubst %,%/*.S,$(SRCDIRS)))
133 # AUTO_SRCS lists all files in SRCS that are not mentioned in
134 # NON_AUTO_SRCS. Files should be added to NON_AUTO_SRCS if they
135 # cannot be built using the standard build template.
137 AUTO_SRCS = $(filter-out $(NON_AUTO_SRCS),$(SRCS))
139 @$(ECHO) $(AUTO_SRCS)
141 # We automatically generate rules for any file mentioned in AUTO_SRCS
142 # using the following set of templates. It would be cleaner to use
143 # $(eval ...), but this function exists only in GNU make >= 3.80.
145 # src_template : generate Makefile rules for a given source file
147 # $(1) is the full path to the source file (e.g. "drivers/net/rtl8139.c")
148 # $(2) is the full path to the .d file (e.g. "bin/deps/drivers/net/rtl8139.d")
149 # $(3) is the source type (e.g. "c")
150 # $(4) is the source base name (e.g. "rtl8139")
154 @$(ECHO) "Generating Makefile rules for $(1)"
155 @$(MKDIR) -p $(dir $(2))
158 $(foreach OBJ,$(if $(OBJS_$(4)),$(OBJS_$(4)),$(4)), \
159 $(call obj_template,$(1),$(2),$(3),$(OBJ)))
160 @$(PARSEROM) $(1) >> $(2)
164 # obj_template : generate Makefile rules for a given resultant object
165 # of a particular source file. (We can have multiple objects per
166 # source file via the OBJS_xxx list.)
168 # $(1) is the full path to the source file (e.g. "drivers/net/rtl8139.c")
169 # $(2) is the full path to the .d file (e.g. "bin/deps/drivers/net/rtl8139.d")
170 # $(3) is the source type (e.g. "c")
171 # $(4) is the object name (e.g. "rtl8139")
175 @$(CPP) $(CFLAGS) $(CFLAGS_$(3)) $(CFLAGS_$(4)) -DOBJECT=$(4) \
176 -Wno-error -M $(1) -MT "$(4)_DEPS" -MG -MP | \
177 sed 's/_DEPS\s*:/_DEPS =/' >> $(2)
178 @$(ECHO_E) '\n$$(BIN)/$(4).o : $(1) $$(MAKEDEPS) $$($(4)_DEPS)' \
179 '\n\t$$(QM)$(ECHO) " [BUILD] $$@"\n' \
180 '\n\t$$(RULE_$(3))\n' \
181 '\nBOBJS += $$(BIN)/$(4).o\n' \
182 $(foreach TGT,$(DEBUG_TARGETS), \
183 $(if $(RULE_$(3)_to_$(TGT)), \
184 '\n$$(BIN)/$(4).$(TGT) : $(1) $$(MAKEDEPS) $$($(4)_DEPS)' \
185 '\n\t$$(QM)$(ECHO) " [BUILD] $$@"\n' \
186 '\n\t$$(RULE_$(3)_to_$(TGT))\n' \
187 '\n$(TGT)_OBJS += $$(BIN)/$(4).$(TGT)\n' ) ) \
188 '\n$(2) : $$($(4)_DEPS)\n' \
189 '\nTAGS : $$($(4)_DEPS)\n' \
194 # Rule to generate the Makefile rules files to be included
196 $(BIN)/deps/%.d : % $(MAKEDEPS) $(PARSEROM)
197 $(if $(filter $(AUTO_SRCS),$<),$(call src_template,$<,$@,$(subst .,,$(suffix $<)),$(basename $(notdir $<))),@$(ECHO) 'ERROR: $< is not an AUTO_SRC' ; exit 1)
199 # Calculate and include the list of Makefile rules files
201 AUTO_DEPS = $(patsubst %,$(BIN)/deps/%.d,$(AUTO_SRCS))
204 @$(ECHO) $(AUTO_DEPS)
205 VERYCLEANUP += $(BIN)/deps
207 # The following variables are created by the Makefile rules files
218 $(BIN)/embedimg.bin: $(EMBEDDED_IMAGE)
219 $(QM)$(ECHO) " [COPY] $@"
220 $(Q)$(CP) -f $(EMBEDDED_IMAGE) $@
222 $(BIN)/embed.o: $(BIN)/embedimg.bin
223 CFLAGS_embed = -DEMBEDIMG=\"$(BIN)/embedimg.bin\"
225 # Generate the NIC file from the parsed source files. The NIC file is
226 # only for rom-o-matic.
228 $(BIN)/NIC : $(AUTO_DEPS)
229 @$(ECHO) '# This is an automatically generated file, do not edit' > $@
230 @$(ECHO) '# It does not affect anything in the build, ' \
231 'it is only for rom-o-matic' >> $@
233 @perl -ne 'chomp; print "$$1\n" if /\# NIC\t(.*)$$/' $^ >> $@
234 CLEANUP += $(BIN)/NIC
236 # Analyse a target name (e.g. "bin/dfe538--prism2_pci.zrom.tmp") and
237 # derive the variables:
239 # TGT_ELEMENTS : the elements of the target (e.g. "dfe538 prism2_pci")
240 # TGT_PREFIX : the prefix type (e.g. "zrom")
241 # TGT_DRIVERS : the driver for each element (e.g. "rtl8139 prism2_pci")
242 # TGT_ROM_NAME : the ROM name (e.g. "dfe538")
243 # TGT_MEDIA : the media type (e.g. "rom")
245 DRIVERS_gpxe = $(DRIVERS)
246 CARD_DRIVER = $(firstword $(DRIVER_$(1)) $(1))
247 TGT_ELEMENTS = $(subst --, ,$(firstword $(subst ., ,$(notdir $@))))
248 TGT_PREFIX = $(word 2,$(subst ., ,$(notdir $@)))
249 TGT_ROM_NAME = $(firstword $(TGT_ELEMENTS))
250 TGT_DRIVERS = $(strip $(if $(DRIVERS_$(TGT_ROM_NAME)), \
251 $(DRIVERS_$(TGT_ROM_NAME)), \
252 $(foreach TGT_ELEMENT,$(TGT_ELEMENTS), \
253 $(call CARD_DRIVER,$(TGT_ELEMENT))) ))
254 TGT_MEDIA = $(subst z,,$(TGT_PREFIX))
256 # Look up ROM IDs for the current target
257 # (e.g. "bin/dfe538--prism2_pci.zrom.tmp") and derive the variables:
259 # TGT_PCI_VENDOR : the PCI vendor ID (e.g. "0x1186")
260 # TGT_PCI_DEVICE : the PCI device ID (e.g. "0x1300")
262 TGT_PCI_VENDOR = $(PCI_VENDOR_$(TGT_ROM_NAME))
263 TGT_PCI_DEVICE = $(PCI_DEVICE_$(TGT_ROM_NAME))
265 # Calculate link-time options for the current target
266 # (e.g. "bin/dfe538--prism2_pci.zrom.tmp") and derive the variables:
268 # TGT_LD_DRIVERS : symbols to require in order to drag in the relevant drivers
269 # (e.g. "obj_rtl8139 obj_prism2_pci")
270 # TGT_LD_IDS : symbols to define in order to fill in ID structures in the
271 # ROM header (e.g."pci_vendor_id=0x1186 pci_device_id=0x1300")
273 TGT_LD_DRIVERS = $(subst -,_,$(patsubst %,obj_%,$(TGT_DRIVERS)))
274 TGT_LD_PREFIX = obj_$(TGT_PREFIX)prefix
275 TGT_LD_IDS = $(if $(TGT_PCI_VENDOR),pci_vendor_id=$(TGT_PCI_VENDOR)) \
276 $(if $(TGT_PCI_DEVICE),pci_device_id=$(TGT_PCI_DEVICE))
278 # Calculate linker flags based on link-time options for the current
279 # target type (e.g. "bin/dfe538--prism2_pci.zrom.tmp") and derive the
282 # TGT_LD_FLAGS : target-specific flags to pass to linker (e.g.
283 # "-u obj_zpciprefix -u obj_rtl8139 -u obj_prism2_pci
284 # --defsym pci_vendor=0x1186 --defsym pci_device=0x1300")
286 TGT_LD_FLAGS = $(foreach SYM,$(TGT_LD_PREFIX) $(TGT_LD_DRIVERS) obj_config,\
287 -u $(SYM) --defsym check_$(SYM)=$(SYM) ) \
288 $(patsubst %,--defsym %,$(TGT_LD_IDS))
290 # Calculate makerom flags for the specific target
291 # (e.g. "bin/dfe538--prism2_pci.zrom.tmp") and derive the variables:
293 # TGT_MAKEROM_FLAGS : target-specific flags for makerom (e.g.
294 # "-p 0x1186,0x1300")
296 TGT_MAKEROM_FLAGS = $(strip $(MAKEROM_FLAGS_$(TGT_ROM_NAME)) \
297 $(if $(TGT_PCI_VENDOR),$(strip -p $(TGT_PCI_VENDOR),$(TGT_PCI_DEVICE))))
299 # Calculate list of debugging versions of objects to be included in
303 DEBUG_LIST = $(subst $(COMMA), ,$(DEBUG))
304 DEBUG_OBJ_LEVEL = $(firstword $(word 2,$(subst :, ,$(1))) 1)
305 DEBUG_OBJ_BASE = $(word 1,$(subst :, ,$(1))).dbg$(call DEBUG_OBJ_LEVEL,$(1))
306 DEBUG_OBJ = $(BIN)/$(call DEBUG_OBJ_BASE,$(1)).o
307 DEBUG_ORIG_OBJ = $(BIN)/$(word 1,$(subst :, ,$(1))).o
308 DEBUG_OBJS = $(foreach D,$(DEBUG_LIST),$(call DEBUG_OBJ,$(D)))
309 DEBUG_ORIG_OBJS = $(foreach D,$(DEBUG_LIST),$(call DEBUG_ORIG_OBJ,$(D)))
310 BLIB_OBJS = $(DEBUG_OBJS) $(filter-out $(DEBUG_ORIG_OBJS),$(BOBJS))
312 # Print out all derived information for a given target.
315 @$(ECHO) 'Elements : $(TGT_ELEMENTS)'
316 @$(ECHO) 'Prefix : $(TGT_PREFIX)'
317 @$(ECHO) 'Drivers : $(TGT_DRIVERS)'
318 @$(ECHO) 'ROM name : $(TGT_ROM_NAME)'
319 @$(ECHO) 'Media : $(TGT_MEDIA)'
321 @$(ECHO) 'PCI vendor : $(TGT_PCI_VENDOR)'
322 @$(ECHO) 'PCI device : $(TGT_PCI_DEVICE)'
324 @$(ECHO) 'LD driver symbols : $(TGT_LD_DRIVERS)'
325 @$(ECHO) 'LD prefix symbols : $(TGT_LD_PREFIX)'
326 @$(ECHO) 'LD ID symbols : $(TGT_LD_IDS)'
328 @$(ECHO) 'LD target flags : $(TGT_LD_FLAGS)'
330 @$(ECHO) 'makerom target flags : $(TGT_MAKEROM_FLAGS)'
332 @$(ECHO) 'Debugging objects : $(DEBUG_OBJS)'
333 @$(ECHO) 'Replaced objects : $(DEBUG_ORIG_OBJS)'
335 # List of objects included in the last build of blib. This is needed
336 # in order to correctly rebuild blib whenever the list of objects
339 BLIB_LIST = $(BIN)/.blib.list
340 ifneq ($(shell cat $(BLIB_LIST)),$(BLIB_OBJS))
341 $(shell $(ECHO) "$(BLIB_OBJS)" > $(BLIB_LIST))
346 VERYCLEANUP += $(BLIB_LIST)
348 # Library of all objects
351 $(BLIB) : $(BLIB_OBJS) $(BLIB_LIST) $(MAKEDEPS)
353 $(QM)$(ECHO) " [AR] $@"
354 $(Q)$(AR) r $@ $(BLIB_OBJS)
358 # Build an intermediate object file from the objects required for the
361 $(BIN)/%.tmp : $(BLIB) $(MAKEDEPS) $(LDSCRIPT)
362 $(QM)$(ECHO) " [LD] $@"
363 $(Q)$(LD) $(LDFLAGS) -T $(LDSCRIPT) $(TGT_LD_FLAGS) $(BLIB) -o $@ \
364 -Map $(BIN)/$*.tmp.map
365 $(Q)$(OBJDUMP) -ht $@ | $(SORTOBJDUMP) >> $(BIN)/$*.tmp.map
367 # Keep intermediate object file (useful for debugging)
368 .SECONDARY : $(BIN)/%.tmp
370 # Show a linker map for the specified target
372 $(BIN)/%.map : $(BIN)/%.tmp
373 @less $(BIN)/$*.tmp.map
375 # Extract compression information from intermediate object file
377 $(BIN)/%.zinfo : $(BIN)/%.tmp
378 $(QM)$(ECHO) " [ZINFO] $@"
379 $(Q)$(OBJCOPY) -O binary -j .zinfo $< $@
381 # Build raw binary file from intermediate object file
383 $(BIN)/%.bin : $(BIN)/%.tmp
384 $(QM)$(ECHO) " [BIN] $@"
385 $(Q)$(OBJCOPY) -O binary -R .zinfo $< $@
387 # Compress raw binary file
389 $(BIN)/%.zbin : $(BIN)/%.bin $(BIN)/%.zinfo $(ZBIN)
390 $(QM)$(ECHO) " [ZBIN] $@"
391 $(Q)$(ZBIN) $(BIN)/$*.bin $(BIN)/$*.zinfo > $@
393 # Build bochs symbol table
394 $(BIN)/%.bxs : $(BIN)/%.tmp
395 $(NM) $< | cut -d" " -f1,3 > $@
397 # Rules for each media format. These are generated and placed in an
398 # external Makefile fragment. We could do this via $(eval ...), but
399 # that would require make >= 3.80.
401 # Note that there's an alternative way to generate most .rom images:
402 # they can be copied from their 'master' ROM image using cp and
403 # reprocessed with makerom to add the PCI IDs and ident string. The
404 # relevant rule would look something like:
406 # $(BIN)/dfe538%rom : $(BIN)/rtl8139%rom
410 # You can derive the ROM/driver relationships using the variables
411 # DRIVER_<rom> and/or ROMS_<driver>.
413 # We don't currently do this, because (a) it would require generating
414 # yet more Makefile fragments (since you need a rule for each ROM in
415 # ROMS), and (b) the linker is so fast that it probably wouldn't make
416 # much difference to the overall build time.
421 AUTO_MEDIA = $(filter-out $(NON_AUTO_MEDIA),$(MEDIA))
423 @$(ECHO) $(AUTO_MEDIA)
425 # media_template : create Makefile rules for specified media
427 # $(1) is the media name (e.g. "rom")
428 # $(2) is the full path to the .d file (e.g. "bin/deps/rom.media.d")
430 define media_template
432 @$(ECHO) "Generating Makefile rules for $(1) media"
433 @$(MKDIR) -p $(dir $(2))
436 @$(ECHO_E) '$$(BIN)/%.$(1) : $$(BIN)/%.$(1).zbin' \
437 '\n\t$$(QM)$(ECHO) " [FINISH] $$@"' \
438 '\n\t$$(Q)$$(CP) $$< $$@' \
439 '\n\t$$(Q)$$(FINALISE_$(1))' \
444 # Rule to generate the Makefile rules to be included
446 $(BIN)/deps/%.media.d : $(MAKEDEPS)
447 $(if $(filter $(AUTO_MEDIA),$*), \
448 $(call media_template,$*,$@), \
449 @$(ECHO) 'ERROR: $* is not an AUTO_MEDIA' ; exit 1)
451 # Calculate and include the list of Makefile rules files
453 MEDIA_DEPS = $(patsubst %,$(BIN)/deps/%.media.d,$(AUTO_MEDIA))
455 @$(ECHO) $(MEDIA_DEPS)
456 include $(MEDIA_DEPS)
458 # The "allXXXs" targets for each suffix
460 allall: allroms allzroms allpxes allisos alldsks
461 allroms allzroms : all%s : $(foreach ROM,$(ROMS),$(BIN)/$(ROM).%)
462 allpxes allisos alldsks : all%s : $(foreach DRIVER,$(DRIVERS),$(BIN)/$(DRIVER).%)
466 $(BIN)/etherboot.% : $(BIN)/gpxe.%
467 ln -sf $(notdir $<) $@
469 # Wrap up binary blobs
471 $(BIN)/%.o : payload/%.img
472 $(QM)echo " [WRAP] $@"
473 $(Q)$(LD) -b binary -r -o $@ $< --undefined obj_payload \
476 BOBJS += $(patsubst payload/%.img,$(BIN)/%.o,$(wildcard payload/*.img))
478 # The compression utilities
480 $(NRV2B) : util/nrv2b.c $(MAKEDEPS)
481 $(QM)$(ECHO) " [HOSTCC] $@"
482 $(Q)$(HOST_CC) -O2 -DENCODE -DDECODE -DMAIN -DVERBOSE -DNDEBUG \
483 -DBITSIZE=32 -DENDIAN=0 -o $@ $<
486 $(ZBIN) : util/zbin.c util/nrv2b.c $(MAKEDEPS)
487 $(QM)$(ECHO) " [HOSTCC] $@"
488 $(Q)$(HOST_CC) -O2 -o $@ $<
491 # Auto-incrementing build serial number. Append "bs" to your list of
492 # build targets to get a serial number printed at the end of the
493 # build. Enable -DBUILD_SERIAL in order to see it when the code runs.
495 BUILDSERIAL_H = config/.buildserial.h
496 BUILDSERIAL_NOW = config/.buildserial.now
497 BUILDSERIAL_NEXT = config/.buildserial.next
499 $(BUILDSERIAL_NOW) $(BUILDSERIAL_NEXT) :
502 $(BUILDSERIAL_H) : $(BUILDSERIAL_NOW) $(BUILDSERIAL_NEXT)
503 $(ECHO) '#define BUILD_SERIAL_NUM $(shell cat $<)' > $@
505 ifeq ($(filter bs,$(MAKECMDGOALS)),bs)
506 $(shell diff -q $(BUILDSERIAL_NOW) $(BUILDSERIAL_NEXT) > /dev/null || \
507 cp -f $(BUILDSERIAL_NEXT) $(BUILDSERIAL_NOW))
510 bs : $(BUILDSERIAL_NOW)
511 @$(ECHO) $$(( $(shell cat $<) + 1 )) > $(BUILDSERIAL_NEXT)
512 @$(ECHO) "Build serial number is $(shell cat $<)"
514 # List of available architectures
516 ARCHS = $(filter-out CVS,$(patsubst arch/%,%,$(wildcard arch/*)))
520 OTHER_ARCHS = $(filter-out $(ARCH),$(ARCHS))
522 @$(ECHO) $(OTHER_ARCHS)
524 # Build the TAGS file for emacs
529 ctags -e -R -f $@ --exclude=bin \
530 $(foreach ARCH,$(OTHER_ARCHS),--exclude=arch/$(ARCH))
533 # Symbol table checks
535 SYMTAB = $(BIN)/symtab
537 $(OBJDUMP) -w -t $< > $@
539 CLEANUP += $(BIN)/symtab
544 # Force rebuild for any given target
548 $(MAKE) $(MAKEFLAGS) $(BIN)/$*
552 $(BIN)/doxygen.cfg : doxygen.cfg $(MAKEDEPS)
553 $(PERL) -pe 's{\@SRCDIRS\@}{$(SRCDIRS)}; ' \
554 -e 's{\@BIN\@}{$(BIN)}; ' \
555 -e 's{\@ARCH\@}{$(ARCH)}; ' \
558 $(BIN)/doc : $(BIN)/doxygen.cfg
563 VERYCLEANUP += $(BIN)/doc
568 @[ -f $(BIN)/doc/html/index.html ] || $(MAKE) $(BIN)/doc
569 @if [ -n "$$BROWSER" ] ; then \
570 ( $$BROWSER $(BIN)/doc/html/index.html & ) ; \
572 $(ECHO) "Documentation index in $(BIN)/doc/html/index.html" ; \
581 $(RM) -r $(VERYCLEANUP)
583 # Make clean tarballs for release
585 gpxe-tarball : ../VERSION
586 ($(ECHO) -n $(VERSION) ''; date -u +'%Y-%m-%d') > ../VERSION
587 $(RM) -r /tmp/gpxe/gpxe-$(VERSION)
588 mkdir -p /tmp/gpxe/gpxe-$(VERSION)
589 cp -rP .. /tmp/gpxe/gpxe-$(VERSION)
590 $(RM) -r /tmp/gpxe/CVS
591 ( cd /tmp/gpxe/gpxe-$(VERSION)/src ; $(RM) -r bin/deps ; $(MAKE) clean ; $(MAKE) veryclean )
592 ( cd /tmp/gpxe; tar cf /tmp/gpxe/gpxe-$(VERSION).tar --exclude CVS --exclude "#*" \
593 --exclude "*~" gpxe-$(VERSION) )
594 bzip2 -9 < /tmp/gpxe/gpxe-$(VERSION).tar > /tmp/gpxe/gpxe-$(VERSION).tar.bz2
595 gzip -9 < /tmp/gpxe/gpxe-$(VERSION).tar > /tmp/gpxe/gpxe-$(VERSION).tar.gz
596 $(RM) -r /tmp/gpxe/gpxe-$(VERSION)
597 $(RM) /tmp/gpxe/gpxe-$(VERSION).tar
598 ( cd /tmp/gpxe ; tar -zxf /tmp/gpxe/gpxe-$(VERSION).tar.gz )