-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.in
58 lines (53 loc) · 1.55 KB
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
srcdir = @srcdir@
prefix = @prefix@
exec_prefix = $(prefix)
bindir = $(exec_prefix)/bin
sbindir = $(exec_prefix)/sbin
libexecdir = $(exec_prefix)/libexec
datadir = $(prefix)/share
IP_VERSION = 4
CC = @CC@
CPPFLAGS = @DEFS@ -I. -Ilwip-contrib/ports/unix/port/include \
-Ilwip-contrib/ports/unix/port/include/netif \
-Ilwip/src/include/ipv$(IP_VERSION) -Ilwip/src/include \
-Ilwip-contrib/apps -Ilibrary \
@CPPFLAGS@
CFLAGS = -pthread -Wall @CFLAGS@
LDFLAGS = -pthread @LDFLAGS@
LIBS = @LIBS@
INSTALL = @INSTALL@
LWIPDIR = lwip/src
include lwip/src/Filelists.mk
SOURCES = $(COREFILES) \
$(CORE4FILES) \
$(CORE6FILES) \
$(APIFILES) \
$(LWIPDIR)/netif/ethernet.c
SOURCES += \
lwip-contrib/ports/unix/port/sys_arch.c \
lwip-contrib/ports/unix/port/netif/tapif.c \
lwip-contrib/apps/iperf/iperf.c \
lwip-contrib/apps/tcpecho/tcpecho.c \
lwip-contrib/apps/ping/ping.c \
lwip-lowpower.c
OBJS := $(foreach f,$(SOURCES),$(f:.c=.o))
all: lwip-lowpower
%.d: %.c lwipopts.h
$(CC) -MM $(CFLAGS) $(CPPFLAGS) $< > $@.$$$$; \
sed 's,\($(notdir $*)\)\.o[ :]*,$(dir $*)\1.o $@ : ,g' < $@.$$$$ > $@; \
$(RM) -f $@.$$$$
%.o: %.c lwipopts.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
lwip-lowpower: $(OBJS)
$(CC) $(LDFLAGS) $(LIBS) -o $@ $(OBJS)
check-syntax:
$(CC) $(CFLAGS) $(CPPFLAGS) -fsyntax-only $(CHK_SOURCES)
clean:
rm -f config.cache config.log
rm -f lwip-lowpower $(OBJS) *~
find . -name "*.d" | xargs rm
distclean: clean
rm -f Makefile config.h config.status
rm -rf autom4te.cache
.PHONY: all check-syntax clean distclean
-include ${patsubst %.o,%.d,$(OBJS)}