1 # *****************************************************************************
2 # * Copyright (c) 2004, 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 CFLAGS = -O2 -I. -I../common -I$(TOP)/clients/net-snk/include -I$(TOP)/lib/libc/include -fno-builtin -ffreestanding -msoft-float -Wall -nostdinc
23 COMMONOBJS = ../common/module_entry.o
25 OBJS += $(COMMONOBJS) $(SRCS:.c=.o)
28 all: Makefile.dep net_bcm57xx.elf
30 net_bcm57xx.elf: $(OBJS)
31 $(LD) $(LDFLAGS) $^ -o $@ -T ../common/module.lds -N -q
32 $(STRIP) --strip-unneeded $@
34 # A rule for making the object files in the common directory:
35 ../common/%.o: ../common/%.c
36 $(MAKE) -C ../common all
40 $(RM) *.o *.a *.i *.elf
46 # Rules for creating the dependency file:
48 $(CC) -MM $(CFLAGS) $(SRCS) > Makefile.dep
52 # Include dependency file if available:
53 ifneq (,$(wildcard Makefile.dep))