aboutsummaryrefslogtreecommitdiff
path: root/Makefile.target
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-21 18:12:44 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-21 18:12:44 +0000
commit807544e27d868c5b9ac7f4a0f0a325bc8ceb77f3 (patch)
treeb7dc64dbd703e3b493bedcb19466faac006850b8 /Makefile.target
parentc7328801d8c6c845c115b3f8099dba80038a3ea3 (diff)
Consolidate compiler invocations (Avi Kivity)
Instead of specifying the compilation command over and over, use a single rule and adjust it as necessary using target specific target overrides. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6377 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'Makefile.target')
-rw-r--r--Makefile.target18
1 files changed, 5 insertions, 13 deletions
diff --git a/Makefile.target b/Makefile.target
index 7d9fe7b01f..5f41a3d621 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -219,16 +219,11 @@ translate-all.o: translate-all.c cpu.h
tcg/tcg.o: cpu.h
-machine.o: machine.c
- $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
-
# HELPER_CFLAGS is used for all the code compiled with static register
# variables
-op_helper.o: op_helper.c
- $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(CFLAGS) $(I386_CFLAGS) -c -o $@ $<
+op_helper.o: CFLAGS += $(HELPER_CFLAGS) $(I386_CFLAGS)
-cpu-exec.o: cpu-exec.c
- $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
+cpu-exec.o: CFLAGS += $(HELPER_CFLAGS)
#########################################################
# Linux user emulator target
@@ -356,8 +351,7 @@ OBJS+= libqemu.a
# Note: this is a workaround. The real fix is to avoid compiling
# cpu_signal_handler() in cpu-exec.c.
-signal.o: signal.c
- $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
+signal.o: CFLAGS += $(HELPER_CFLAGS)
$(QEMU_PROG): $(OBJS) ../libqemu_user.a
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
@@ -392,8 +386,7 @@ endif
# Note: this is a workaround. The real fix is to avoid compiling
# cpu_signal_handler() in cpu-exec.c.
-signal.o: signal.c
- $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
+signal.o: CFLAGS += $(HELPER_CFLAGS)
$(QEMU_PROG): $(OBJS)
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
@@ -497,8 +490,7 @@ endif
# Note: this is a workaround. The real fix is to avoid compiling
# cpu_signal_handler() in cpu-exec.c.
-signal.o: signal.c
- $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
+signal.o: CFLAGS += $(HELPER_CFLAGS)
$(QEMU_PROG): $(OBJS) ../libqemu_user.a
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)