2008-01-08 01:19:24 +01:00
|
|
|
############################################################################
|
|
|
|
# drivers/Makefile
|
2007-02-18 00:21:28 +01:00
|
|
|
#
|
2016-05-10 23:44:06 +02:00
|
|
|
# Copyright (C) 2007-2014, 2016 Gregory Nutt. All rights reserved.
|
2011-12-21 16:50:06 +01:00
|
|
|
# Author: Gregory Nutt <gnutt@nuttx.org>
|
2007-02-18 00:21:28 +01:00
|
|
|
#
|
|
|
|
# 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.
|
2008-01-08 01:19:24 +01:00
|
|
|
# 3. Neither the name NuttX nor the names of its contributors may be
|
2007-02-18 00:21:28 +01:00
|
|
|
# used to endorse or promote products derived from this software
|
|
|
|
# without specific prior written permission.
|
|
|
|
#
|
|
|
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
# "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
|
|
|
|
# COPYRIGHT OWNER OR CONTRIBUTORS 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.
|
|
|
|
#
|
2008-01-08 01:19:24 +01:00
|
|
|
############################################################################
|
2007-02-18 00:21:28 +01:00
|
|
|
|
|
|
|
-include $(TOPDIR)/Make.defs
|
2012-11-29 23:27:22 +01:00
|
|
|
DELIM ?= $(strip /)
|
2007-02-18 00:21:28 +01:00
|
|
|
|
2009-06-24 22:57:34 +02:00
|
|
|
ifeq ($(WINTOOL),y)
|
2011-04-19 20:51:02 +02:00
|
|
|
INCDIROPT = -w
|
2009-06-24 22:57:34 +02:00
|
|
|
endif
|
|
|
|
|
2011-05-16 17:09:39 +02:00
|
|
|
DEPPATH = --dep-path .
|
|
|
|
ASRCS =
|
|
|
|
CSRCS =
|
|
|
|
VPATH = .
|
2011-04-20 15:32:49 +02:00
|
|
|
|
2011-05-16 17:09:39 +02:00
|
|
|
# Include support for various drivers. Each Make.defs file will add its
|
|
|
|
# files to the source file list, add its DEPPATH info, and will add
|
|
|
|
# the appropriate paths to the VPATH variable
|
2009-10-18 15:52:21 +02:00
|
|
|
|
2012-11-25 21:58:39 +01:00
|
|
|
include analog$(DELIM)Make.defs
|
2013-05-19 23:12:28 +02:00
|
|
|
include audio$(DELIM)Make.defs
|
2012-11-25 21:58:39 +01:00
|
|
|
include bch$(DELIM)Make.defs
|
2017-05-12 16:23:16 +02:00
|
|
|
include can$(DELIM)Make.defs
|
2018-08-27 15:14:01 +02:00
|
|
|
include crypto$(DELIM)Make.defs
|
2016-01-26 16:58:18 +01:00
|
|
|
include i2c$(DELIM)Make.defs
|
2012-11-25 21:58:39 +01:00
|
|
|
include input$(DELIM)Make.defs
|
2015-12-15 15:40:34 +01:00
|
|
|
include ioexpander$(DELIM)Make.defs
|
2012-11-25 21:58:39 +01:00
|
|
|
include lcd$(DELIM)Make.defs
|
2015-12-15 15:05:10 +01:00
|
|
|
include leds$(DELIM)Make.defs
|
2015-11-25 23:23:19 +01:00
|
|
|
include loop$(DELIM)Make.defs
|
2012-11-25 21:58:39 +01:00
|
|
|
include mmcsd$(DELIM)Make.defs
|
2016-01-30 14:37:43 +01:00
|
|
|
include modem$(DELIM)Make.defs
|
2012-11-25 21:58:39 +01:00
|
|
|
include mtd$(DELIM)Make.defs
|
2014-11-27 18:08:27 +01:00
|
|
|
include eeprom$(DELIM)Make.defs
|
2012-11-25 21:58:39 +01:00
|
|
|
include net$(DELIM)Make.defs
|
|
|
|
include pipes$(DELIM)Make.defs
|
|
|
|
include power$(DELIM)Make.defs
|
|
|
|
include sensors$(DELIM)Make.defs
|
|
|
|
include serial$(DELIM)Make.defs
|
2013-07-01 20:23:26 +02:00
|
|
|
include spi$(DELIM)Make.defs
|
2012-11-25 21:58:39 +01:00
|
|
|
include syslog$(DELIM)Make.defs
|
2015-02-13 17:30:06 +01:00
|
|
|
include timers$(DELIM)Make.defs
|
2012-11-25 21:58:39 +01:00
|
|
|
include usbdev$(DELIM)Make.defs
|
|
|
|
include usbhost$(DELIM)Make.defs
|
2017-03-31 14:35:36 +02:00
|
|
|
include usbmisc$(DELIM)Make.defs
|
2016-06-30 21:09:22 +02:00
|
|
|
include usbmonitor$(DELIM)Make.defs
|
2013-12-09 17:51:22 +01:00
|
|
|
include video$(DELIM)Make.defs
|
2012-11-25 21:58:39 +01:00
|
|
|
include wireless$(DELIM)Make.defs
|
2016-08-31 13:41:49 +02:00
|
|
|
include contactless$(DELIM)Make.defs
|
2018-04-04 18:57:36 +02:00
|
|
|
include 1wire$(DELIM)Make.defs
|
2007-02-18 00:21:28 +01:00
|
|
|
|
2007-11-20 21:32:33 +01:00
|
|
|
ifneq ($(CONFIG_NFILE_DESCRIPTORS),0)
|
2014-12-08 14:14:31 +01:00
|
|
|
CSRCS += dev_null.c dev_zero.c
|
2011-12-22 16:59:50 +01:00
|
|
|
|
2008-06-01 22:08:20 +02:00
|
|
|
ifneq ($(CONFIG_DISABLE_MOUNTPOINT),y)
|
2015-11-25 23:23:19 +01:00
|
|
|
CSRCS += ramdisk.c
|
2014-09-25 19:02:30 +02:00
|
|
|
ifeq ($(CONFIG_DRVR_WRITEBUFFER),y)
|
2014-07-11 19:20:11 +02:00
|
|
|
CSRCS += rwbuffer.c
|
|
|
|
else
|
2014-09-25 19:02:30 +02:00
|
|
|
ifeq ($(CONFIG_DRVR_READAHEAD),y)
|
2014-07-11 19:20:11 +02:00
|
|
|
CSRCS += rwbuffer.c
|
|
|
|
endif
|
|
|
|
endif
|
2008-06-01 22:08:20 +02:00
|
|
|
endif
|
2011-12-22 16:59:50 +01:00
|
|
|
|
2011-12-16 17:17:34 +01:00
|
|
|
ifeq ($(CONFIG_PWM),y)
|
|
|
|
CSRCS += pwm.c
|
|
|
|
endif
|
2016-07-17 14:42:26 +02:00
|
|
|
|
2016-07-18 15:03:47 +02:00
|
|
|
endif # CONFIG_NFILE_DESCRIPTORS != 0
|
2011-05-16 17:09:39 +02:00
|
|
|
|
2012-11-22 22:21:48 +01:00
|
|
|
AOBJS = $(ASRCS:.S=$(OBJEXT))
|
|
|
|
COBJS = $(CSRCS:.c=$(OBJEXT))
|
2007-02-18 00:21:28 +01:00
|
|
|
|
2012-11-22 22:21:48 +01:00
|
|
|
SRCS = $(ASRCS) $(CSRCS)
|
|
|
|
OBJS = $(AOBJS) $(COBJS)
|
2007-02-18 00:21:28 +01:00
|
|
|
|
2012-11-22 22:21:48 +01:00
|
|
|
BIN = libdrivers$(LIBEXT)
|
2007-02-18 00:21:28 +01:00
|
|
|
|
2012-11-22 22:21:48 +01:00
|
|
|
all: $(BIN)
|
2016-05-10 23:44:06 +02:00
|
|
|
.PHONY: depend clean distclean
|
2007-02-18 00:21:28 +01:00
|
|
|
|
2007-02-28 00:59:20 +01:00
|
|
|
$(AOBJS): %$(OBJEXT): %.S
|
2008-01-08 18:06:21 +01:00
|
|
|
$(call ASSEMBLE, $<, $@)
|
2007-02-18 00:21:28 +01:00
|
|
|
|
2007-02-28 14:42:19 +01:00
|
|
|
$(COBJS): %$(OBJEXT): %.c
|
2008-01-08 18:06:21 +01:00
|
|
|
$(call COMPILE, $<, $@)
|
2007-02-18 00:21:28 +01:00
|
|
|
|
2012-11-22 22:21:48 +01:00
|
|
|
$(BIN): $(OBJS)
|
2012-11-15 18:43:29 +01:00
|
|
|
$(call ARCHIVE, $@, $(OBJS))
|
2007-02-18 00:21:28 +01:00
|
|
|
|
|
|
|
.depend: Makefile $(SRCS)
|
2012-11-12 00:44:31 +01:00
|
|
|
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
|
2012-11-11 19:36:28 +01:00
|
|
|
$(Q) touch $@
|
2007-02-18 00:21:28 +01:00
|
|
|
|
|
|
|
depend: .depend
|
|
|
|
|
|
|
|
clean:
|
2012-11-20 16:47:41 +01:00
|
|
|
$(call DELFILE, $(BIN))
|
2008-01-10 14:38:13 +01:00
|
|
|
$(call CLEAN)
|
2007-02-18 00:21:28 +01:00
|
|
|
|
|
|
|
distclean: clean
|
2012-11-20 16:47:41 +01:00
|
|
|
$(call DELFILE, Make.dep)
|
|
|
|
$(call DELFILE, .depend)
|
2007-02-18 00:21:28 +01:00
|
|
|
|
|
|
|
-include Make.dep
|