diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-01-13 12:07:42 +1100 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-01-19 17:17:50 +1100 |
commit | ca610c931e2b0004c44f748cb813580b09c60489 (patch) | |
tree | cf17ebaa02078827068b534bb95d4540bd848678 /lib/libvirtio/Makefile | |
parent | adde61dfebe5ba4c519b120e8b33f1f8a3c93151 (diff) | |
download | SLOF-ca610c931e2b0004c44f748cb813580b09c60489.zip SLOF-ca610c931e2b0004c44f748cb813580b09c60489.tar.gz SLOF-ca610c931e2b0004c44f748cb813580b09c60489.tar.bz2 |
Move virtio to a separate library
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'lib/libvirtio/Makefile')
-rw-r--r-- | lib/libvirtio/Makefile | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/lib/libvirtio/Makefile b/lib/libvirtio/Makefile new file mode 100644 index 0000000..e4fb34e --- /dev/null +++ b/lib/libvirtio/Makefile @@ -0,0 +1,53 @@ +# ***************************************************************************** +# * Copyright (c) 2004, 2008 IBM Corporation +# * All rights reserved. +# * This program and the accompanying materials +# * are made available under the terms of the BSD License +# * which accompanies this distribution, and is available at +# * http://www.opensource.org/licenses/bsd-license.php +# * +# * Contributors: +# * IBM Corporation - initial implementation +# ****************************************************************************/ + +TOPCMNDIR ?= ../.. + +ASFLAGS = $(FLAG) $(RELEASE) $(CPUARCHDEF) -Wa,-mregnames +CPPFLAGS = -I../libc/include $(CPUARCHDEF) -I$(INCLBRDDIR) \ + -I$(INCLCMNDIR) -I$(INCLCMNDIR)/$(CPUARCH) +LDFLAGS = -nostdlib + +TARGET = ../libvirtio.a + + +all: $(TARGET) + +SRCS = virtio.c virtio-blk.c + +OBJS = $(SRCS:%.c=%.o) + +$(TARGET): $(OBJS) + $(AR) -rc $@ $(OBJS) + $(RANLIB) $@ + +%.o: %.S + $(CC) $(CPPFLAGS) $(ASFLAGS) -c $< -o $@ + +clean: + $(RM) $(TARGET) $(OBJS) + +distclean: clean + $(RM) Makefile.dep + + +# Rules for creating the dependency file: +depend: + $(RM) Makefile.dep + $(MAKE) Makefile.dep + +Makefile.dep: Makefile + $(CC) -M $(CPPFLAGS) $(CFLAGS) $(SRCS) $(SRCSS) > Makefile.dep + +# Include dependency file if available: +-include Makefile.dep + |