1
# *****************************************************************************
2
# * Copyright (c) 2011 IBM Corporation
3
# * All rights reserved.
4
# * This program and the accompanying materials
5
# * are made available under the terms of the BSD License
6
# * which accompanies this distribution, and is available at
7
# * http://www.opensource.org/licenses/bsd-license.php
10
# * IBM Corporation - initial implementation
11
# ****************************************************************************/
14
TOP = $(shell while ! test -e make.rules; do cd .. ; done; pwd)
17
include $(TOP)/make.rules
19
CPPFLAGS = -I./ -I$(TOP)/clients/net-snk/include/ -I$(TOP)/lib/libc/include/ \
20
-I$(TOP)/lib/libhvcall -I$(TOP)/lib/libvirtio -I$(INCLCMNDIR) \
21
-I$(INCLCMNDIR)/$(CPUARCH)
23
LIBS = $(TOP)/lib/libc.a $(TOP)/lib/libhvcall.a $(TOP)/lib/libvirtio.a
25
SRCS = module_entry.c virtio-net.c vn-pci.c
27
OBJS = $(SRCS:%.c=%.o)
31
net_virtio.elf: $(OBJS) $(LIBS)
32
$(LD) $(LDFLAGS) $^ -o $@ -T virtio-net.lds -N -q
33
$(STRIP) --strip-unneeded $@
36
$(RM) -f *.o *.a *.i *.elf
42
# Rules for creating the dependency file:
48
$(CC) -M $(CFLAGS) $(CPPFLAGS) $(SRCS) > Makefile.dep
50
# Include dependency file if available: