Annotation of qemu/rules.mak, revision 1.1.1.5

1.1       root        1: 
1.1.1.3   root        2: # Don't use implicit rules or variables
                      3: # we have explicit rules for everything
                      4: MAKEFLAGS += -rR
                      5: 
                      6: # Files with this suffixes are final, don't try to generate them
                      7: # using implicit rules
                      8: %.d:
                      9: %.h:
                     10: %.c:
                     11: %.m:
                     12: %.mak:
                     13: 
                     14: # Flags for dependency generation
1.1.1.4   root       15: QEMU_DGFLAGS += -MMD -MP -MT $@ -MF $(*D)/$(*F).d
1.1.1.3   root       16: 
1.1.1.4   root       17: %.o: %.c
1.1.1.5 ! root       18:        $(call quiet-command,$(CC) $(QEMU_CFLAGS) $(QEMU_INCLUDES) $(QEMU_DGFLAGS) $(CFLAGS) -c -o $@ $<,"  CC    $(TARGET_DIR)$@")
1.1       root       19: 
                     20: %.o: %.S
1.1.1.5 ! root       21:        $(call quiet-command,$(CC) $(QEMU_CFLAGS) $(QEMU_INCLUDES) $(QEMU_DGFLAGS) $(CFLAGS) -c -o $@ $<,"  AS    $(TARGET_DIR)$@")
1.1       root       22: 
                     23: %.o: %.m
1.1.1.5 ! root       24:        $(call quiet-command,$(CC) $(QEMU_CFLAGS) $(QEMU_INCLUDES) $(QEMU_DGFLAGS) $(CFLAGS) -c -o $@ $<,"  OBJC  $(TARGET_DIR)$@")
1.1       root       25: 
1.1.1.4   root       26: LINK = $(call quiet-command,$(CC) $(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $(1) $(LIBS),"  LINK  $(TARGET_DIR)$@")
1.1       root       27: 
                     28: %$(EXESUF): %.o
1.1.1.2   root       29:        $(call LINK,$^)
1.1       root       30: 
                     31: %.a:
                     32:        $(call quiet-command,rm -f $@ && $(AR) rcs $@ $^,"  AR    $(TARGET_DIR)$@")
                     33: 
                     34: quiet-command = $(if $(V),$1,$(if $(2),@echo $2 && $1, @$1))
1.1.1.3   root       35: 
                     36: # cc-option
                     37: # Usage: CFLAGS+=$(call cc-option, -falign-functions=0, -malign-functions=0)
                     38: 
                     39: cc-option = $(if $(shell $(CC) $1 $2 -S -o /dev/null -xc /dev/null \
                     40:               >/dev/null 2>&1 && echo OK), $2, $3)
                     41: 
1.1.1.4   root       42: VPATH_SUFFIXES = %.c %.h %.S %.m %.mak %.texi
                     43: set-vpath = $(if $1,$(foreach PATTERN,$(VPATH_SUFFIXES),$(eval vpath $(PATTERN) $1)))
                     44: 
1.1.1.5 ! root       45: # find-in-path
        !            46: # Usage: $(call find-in-path, prog)
        !            47: # Looks in the PATH if the argument contains no slash, else only considers one
        !            48: # specific directory.  Returns an # empty string if the program doesn't exist
        !            49: # there.
        !            50: find-in-path = $(if $(find-string /, $1), \
        !            51:         $(wildcard $1), \
        !            52:         $(wildcard $(patsubst %, %/$1, $(subst :, ,$(PATH)))))
        !            53: 
1.1.1.3   root       54: # Generate timestamp files for .h include files
                     55: 
                     56: %.h: %.h-timestamp
                     57:        @test -f $@ || cp $< $@
                     58: 
                     59: %.h-timestamp: %.mak
1.1.1.5 ! root       60:        $(call quiet-command, sh $(SRC_PATH)/scripts/create_config < $< > $@, "  GEN   $*.h")
1.1.1.3   root       61:        @cmp $@ $*.h >/dev/null 2>&1 || cp $@ $*.h
                     62: 
                     63: # will delete the target of a rule if commands exit with a nonzero exit status
                     64: .DELETE_ON_ERROR:

unix.superglobalmegacorp.com