[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Makefile
From: |
Chris Hiszpanski |
Subject: |
[lwip-users] Makefile |
Date: |
Mon, 18 Jul 2005 05:07:24 +0000 |
Hello,
I am building LwIP the following Makefile modeled after
contrib/ports/unix/proj/minimal/Makefile:
# ARM microprocessor
PROC=arm
# Toolsuite object format (changing this setting will not change the object
# format. use objcopy for that purpose. the type is only used in the naming
of
# executables to call, for instance, arm-none-eabi-gcc).
TYPE=none-eabi
# GNU LD linking script
LDSCRIPT=ldscript
# Toolsuite tool executable names
CC=$(PROC)-$(TYPE)-gcc
AS=$(PROC)-$(TYPE)-as
AR=$(PROC)-$(TYPE)-ar
LD=$(PROC)-$(TYPE)-ld
NM=$(PROC)-$(TYPE)-nm
OBJDUMP=$(PROC)-$(TYPE)-objdump
# Directory assignments
SRCDIR=src
OBJDIR=obj
LWIPDIR=$(SRCDIR)/lwip-1.1.0/src
UIDIR=$(SRCDIR)/ui
SYSDIR=$(SRCDIR)/sys
# Compiler options:
# -gdwarf-2 Use DWARF-2 protocol for debugging information.
# -Wall Print all warnings.
# -march=armv4t Select ARM version 4 architecture.
# -fno-builtin Disable floating point operations.
# -mcpu=arm7tdmi Select ARM7TDMI processor.
# -mlittle-endian Select little endian byte order.
# -O0 Disable optimizations.
# -g Enable debugging information.
CFLAGS= -gdwarf-2 -Wall -march=armv4t -fno-builtin -mcpu=arm7tdmi \
-mlittle-endian -O0 -g -c \
-I$(LWIPDIR)/include \
-I$(LWIPDIR)/include/arch \
-I$(LWIPDIR)/include/ipv4 \
-Iinclude \
-I/usr/local/$(PROC)-$(TYPE)/include \
-L/usr/local/$(PROC)-$(TYPE)/lib
# Locate object files in obj directory
vpath %.o obj
# COREFILES, CORE4FILES: The minimum set of files needed for LwIP.
COREFILES=$(LWIPDIR)/core/mem.c $(LWIPDIR)/core/memp.c \
$(LWIPDIR)/core/netif.c $(LWIPDIR)/core/pbuf.c \
$(LWIPDIR)/core/raw.c $(LWIPDIR)/core/stats.c \
$(LWIPDIR)/core/sys.c $(LWIPDIR)/core/tcp.c \
$(LWIPDIR)/core/tcp_in.c $(LWIPDIR)/core/tcp_out.c \
$(LWIPDIR)/core/udp.c $(LWIPDIR)/core/dhcp.c
CORE4FILES=$(LWIPDIR)/core/ipv4/icmp.c $(LWIPDIR)/core/ipv4/ip.c \
$(LWIPDIR)/core/inet.c $(LWIPDIR)/core/ipv4/ip_addr.c \
$(LWIPDIR)/core/ipv4/ip_frag.c
# NETIFFILES: Files implementing various generic network interface
functions.
NETIFFILES=$(LWIPDIR)/netif/etharp.c
LWIPFILES=$(COREFILES) $(CORE4FILES) $(NETIFFILES)
lwip.o: $(LWIPFILES)
$(CC) $(CFLAGS) -o $(OBJDIR)/lwip.o $(LWIPFILES)
To build, I issue a `make lwip.o'. The code seems to build correctly, but I
receive the following error messages from the assembler:
src/lwip-1.1.0/src/netif/etharp.c: In function `etharp_query':
src/lwip-1.1.0/src/netif/etharp.c:687: warning: unused variable `p'
src/lwip-1.1.0/src/netif/etharp.c: At top level:
src/lwip-1.1.0/src/core/ipv4/ip_frag.c:93: warning: 'ip_reass_timer' defined
but not used
/tmp/ccAiUTHD.s: Assembler messages:
/tmp/ccAiUTHD.s:20468: Error: symbol `ip_addr_any' is already defined
/tmp/ccAiUTHD.s:20473: Error: symbol `ip_addr_broadcast' is already defined
...
/tmp/ccAiUTHD.s:20815: Error: symbol `ip_addr_any' is already defined
/tmp/ccAiUTHD.s:20820: Error: symbol `ip_addr_broadcast' is already defined
/tmp/ccAiUTHD.s:20831: Error: symbol `ip_addr_any' is already defined
/tmp/ccAiUTHD.s:20836: Error: symbol `ip_addr_broadcast' is already defined
/tmp/ccAiUTHD.s:20843: Error: symbol `netif_list' is already defined
/tmp/ccAiUTHD.s:20849: Error: symbol `netif_default' is already defined
make: *** [lwip.o] Error 1
I am compiling with gcc v3.4.2 on linux. Can anyone please point out what I
am overlooking?
Cheers,
Chris
Please CC me in response.
_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lwip-users] Makefile,
Chris Hiszpanski <=