diff options
Diffstat (limited to 'nuttx/drivers')
-rw-r--r-- | nuttx/drivers/Makefile | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/nuttx/drivers/Makefile b/nuttx/drivers/Makefile index 7a3463b2f..c6ba7f7ad 100644 --- a/nuttx/drivers/Makefile +++ b/nuttx/drivers/Makefile @@ -37,9 +37,17 @@ ifeq ($(CONFIG_NET),y) include net/Make.defs +ROOTDEPPATH = --dep-path . +NETDEPPATH = --dep-path net endif -ASRCS = $(NET_ASRCS) +ifeq ($(CONFIG_USBDEV),y) +include usbdev/Make.defs +ROOTDEPPATH = --dep-path . +NETDEPPATH = --dep-path usbdev +endif + +ASRCS = $(NET_ASRCS) $(USBDEV_ASRCS) AOBJS = $(ASRCS:.S=$(OBJEXT)) CSRCS = @@ -50,7 +58,7 @@ ifneq ($(CONFIG_DISABLE_MOUNTPOINT),y) CSRCS += ramdisk.c endif endif -CSRCS += $(NET_CSRCS) +CSRCS += $(NET_CSRCS) $(USBDEV_CSRCS) COBJS = $(CSRCS:.c=$(OBJEXT)) SRCS = $(ASRCS) $(CSRCS) @@ -58,7 +66,7 @@ OBJS = $(AOBJS) $(COBJS) BIN = libdrivers$(LIBEXT) -VPATH = net +VPATH = net:usbdev all: $(BIN) @@ -74,11 +82,7 @@ $(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 + @$(MKDEP) $(ROOTDEPPATH) $(NETDEPPATH) $(USBDEVDEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep @touch $@ depend: .depend |