diff --git a/lwip/src/Makefile b/lwip/src/Makefile index df040b06..76be2a21 100644 --- a/lwip/src/Makefile +++ b/lwip/src/Makefile @@ -1,4 +1,4 @@ -SUBDIRS = api core #netif +SUBDIRS = api core netif default: $(MAKE) all diff --git a/lwip/src/core/Makefile b/lwip/src/core/Makefile index a6d046e6..3111abfc 100644 --- a/lwip/src/core/Makefile +++ b/lwip/src/core/Makefile @@ -1,4 +1,5 @@ -C_source = init.c mem.c memp.c netif.c pbuf.c stats.c udp.c tcp.c +C_source = dhcp.c raw.c init.c mem.c memp.c netif.c pbuf.c stats.c udp.c tcp.c tcp_in.c tcp_out.c +SUBDIRS = ipv4 OBJS += $(patsubst %.c, %.o, $(filter %.c, $(C_source))) @@ -7,18 +8,22 @@ OBJS += $(patsubst %.c, %.o, $(filter %.c, $(C_source))) $(CC) -c $(CFLAGS) -o $@ $< default: + for i in $(SUBDIRS); do $(MAKE) -C $$i default; done $(MAKE) all all: + for i in $(SUBDIRS); do $(MAKE) -C $$i all; done $(MAKE) $(LIBLWIP) $(LIBLWIP): $(OBJS) $(AR) $(ARFLAGS) $(LIBLWIP) $(OBJS) clean: + for i in $(SUBDIRS); do $(MAKE) -C $$i clean; done $(RM) *.o *~ depend: + for i in $(SUBDIRS); do $(MAKE) -C $$i depend; done $(CC) -MM $(CFLAGS) $(C_source) $(CPP_source) > Makefile.dep -include Makefile.dep diff --git a/lwip/src/core/ipv4/Makefile b/lwip/src/core/ipv4/Makefile new file mode 100644 index 00000000..de3fb439 --- /dev/null +++ b/lwip/src/core/ipv4/Makefile @@ -0,0 +1,25 @@ +C_source = autoip.c inet.c inet_chksum.c ip.c ip_frag.c icmp.c igmp.c ip_addr.c + +OBJS += $(patsubst %.c, %.o, $(filter %.c, $(C_source))) + +# other implicit rules +%.o : %.c + $(CC) -c $(CFLAGS) -o $@ $< + +default: + $(MAKE) all + +all: + $(MAKE) $(LIBLWIP) + +$(LIBLWIP): $(OBJS) + $(AR) $(ARFLAGS) $(LIBLWIP) $(OBJS) + +clean: + $(RM) *.o *~ + +depend: + $(CC) -MM $(CFLAGS) $(C_source) $(CPP_source) > Makefile.dep + +-include Makefile.dep +# DO NOT DELETE diff --git a/lwip/src/include/arch/sys_arch.h b/lwip/src/include/arch/sys_arch.h index 6dca368b..ccb0e567 100644 --- a/lwip/src/include/arch/sys_arch.h +++ b/lwip/src/include/arch/sys_arch.h @@ -1,33 +1,6 @@ /* - * Copyright (c) 2001-2003 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * + * Copyright (c) 2010 Stefan Lankes, Chair for Operating Systems, RWTH Aachen University, Germany + * All rights reserved */ #ifndef __ARCH_SYS_ARCH_H__ #define __ARCH_SYS_ARCH_H__ @@ -43,23 +16,5 @@ typedef sem_t* sys_sem_t; typedef mailbox_t* sys_mbox_t; typedef tid_t* sys_thread_t; -/* -#include - -#define SYS_MBOX_NULL NULL -#define SYS_SEM_NULL NULL - -typedef u32_t sys_prot_t; - -struct sys_sem; -typedef struct sys_sem * sys_sem_t; - - -struct sys_mbox; -typedef struct sys_mbox *sys_mbox_t; - -struct sys_thread; -typedef struct sys_thread * sys_thread_t;*/ - #endif /* __ARCH_SYS_ARCH_H__ */