lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Makefile for building static library


From: Mason
Subject: [lwip-users] Makefile for building static library
Date: Thu, 16 Feb 2012 14:14:51 +0100
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0.1) Gecko/20120208 Firefox/10.0.1 SeaMonkey/2.7.1

Hello,

Below is the makefile I use for building lwip as a static library.
I like it because it's short and easy to understand. (I used a few
gmake-specific extensions.)

CC = sh4gcc
AR = sh4ar

PORT_DIR = os21_port

CFLAGS += -Wall
CFLAGS += -mruntime=os21
CFLAGS += -I src/include -I src/include/ipv4 -I $(PORT_DIR)

SOURCES := $(wildcard src/core/*.c) $(wildcard src/core/ipv4/*.c) $(wildcard 
src/api/*.c) src/netif/etharp.c
OBJECTS := $(SOURCES:%.c=%.o) $(PORT_DIR)/sys_arch.o $(PORT_DIR)/ethernetif.o

lwip.a: $(OBJECTS)
        $(AR) -r $@ $^

$(PORT_DIR)/ethernetif.o: CFLAGS += -I ${OSPLUSROOT}/include

clean:
        rm -f $(LIB) $(OBJECTS)

-- 
Regards.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]