diff options
Diffstat (limited to 'nuttx/drivers')
-rw-r--r-- | nuttx/drivers/Makefile | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/nuttx/drivers/Makefile b/nuttx/drivers/Makefile index f992f5837..0ebf08d5c 100644 --- a/nuttx/drivers/Makefile +++ b/nuttx/drivers/Makefile @@ -37,10 +37,14 @@ MKDEP = $(TOPDIR)/tools/mkdeps.sh -ASRCS = +ifeq ($(CONFIG_NET),y) +include net/Make.defs +endif + +ASRCS = $(NET_ASRCS) AOBJS = $(ASRCS:.S=$(OBJEXT)) -CSRCS = dev_null.c serial.c +CSRCS = dev_null.c serial.c $(NET_CSRCS) COBJS = $(CSRCS:.c=$(OBJEXT)) SRCS = $(ASRCS) $(CSRCS) @@ -48,6 +52,8 @@ OBJS = $(AOBJS) $(COBJS) BIN = libdrivers$(LIBEXT) +VPATH = net + all: $(BIN) $(AOBJS): %$(OBJEXT): %.S @@ -63,7 +69,11 @@ $(BIN): $(OBJS) done ; ) .depend: Makefile $(SRCS) +ifeq ($(CONFIG_NET),y) + $(MKDEP) --dep-path . --dep-path net $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep +else $(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep +endif touch $@ depend: .depend |