aboutsummaryrefslogtreecommitdiff
path: root/Makefile.hw
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2009-05-19 16:17:58 +0100
committerPaul Brook <paul@codesourcery.com>2009-05-19 16:17:58 +0100
commit1ad2134f914dfd4c8f92307c94c9a5a1e28f0059 (patch)
treefafeb00db8346df20b35434ea3f1eaad1fd67832 /Makefile.hw
parent8a637d444387bbdb60eff803d321244487521c86 (diff)
Hardware convenience library
The only target dependency for most hardware is sizeof(target_phys_addr_t). Build these files into a convenience library, and use that instead of building for every target. Remove and poison various target specific macros to avoid bogus target dependencies creeping back in. Big/Little endian is not handled because devices should not know or care about this to start with. Signed-off-by: Paul Brook <paul@codesourcery.com>
Diffstat (limited to 'Makefile.hw')
-rw-r--r--Makefile.hw36
1 files changed, 36 insertions, 0 deletions
diff --git a/Makefile.hw b/Makefile.hw
new file mode 100644
index 0000000000..a8c71740eb
--- /dev/null
+++ b/Makefile.hw
@@ -0,0 +1,36 @@
+# Makefile for qemu target independent devices.
+
+include config.mak
+include ../config-host.mak
+include $(SRC_PATH)/rules.mak
+
+.PHONY: all
+
+VPATH=$(SRC_PATH):$(SRC_PATH)/hw
+
+CFLAGS += $(OS_CFLAGS) $(ARCH_CFLAGS)
+LDFLAGS += $(OS_LDFLAGS) $(ARCH_LDFLAGS)
+
+CPPFLAGS += -I. -I$(SRC_PATH) -MMD -MP -MT $@
+CPPFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
+CPPFLAGS+=-I$(SRC_PATH)/fpu
+
+OBJS=
+OBJS+= virtio.o virtio-pci.o
+OBJS+= fw_cfg.o
+OBJS+= watchdog.o
+OBJS+= nand.o ecc.o
+
+OBJS+= m48t59.o
+
+OBJS+= dma-helpers.o sysbus.o
+
+all: $(HWLIB)
+
+$(HWLIB): $(OBJS)
+
+clean:
+ rm -f *.o *.d *.a *~
+
+# Include automatically generated dependency files
+-include $(wildcard *.d */*.d)