linux-user: handle POWERPC_EXCP_STCX
[qemu/aliguori-queue.git] / rules.mak
blobf9d0ca09e38935226bb1424c6641b022ca3b1d62
2 %.o: %.c
3 $(call quiet-command,$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<," CC $(TARGET_DIR)$@")
5 %.o: %.S
6 $(call quiet-command,$(CC) $(CPPFLAGS) -c -o $@ $<," AS $(TARGET_DIR)$@")
8 %.o: %.m
9 $(call quiet-command,$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<," OBJC $(TARGET_DIR)$@")
11 LINK = $(call quiet-command,$(CC) $(LDFLAGS) -o $@ $(1) $(ARLIBS_BEGIN) $(ARLIBS) $(ARLIBS_END) $(LIBS)," LINK $(TARGET_DIR)$@")
13 %$(EXESUF): %.o
14 $(call LINK,$^)
16 %.a:
17 $(call quiet-command,rm -f $@ && $(AR) rcs $@ $^," AR $(TARGET_DIR)$@")
19 quiet-command = $(if $(V),$1,$(if $(2),@echo $2 && $1, @$1))
21 # cc-option
22 # Usage: CFLAGS+=$(call cc-option, $(CFLAGS), -falign-functions=0, -malign-functions=0)
24 cc-option = $(shell if $(CC) $(1) $(2) -S -o /dev/null -xc /dev/null \
25 > /dev/null 2>&1; then echo "$(2)"; else echo "$(3)"; fi ;)