2008-02-11 18:15:52 +01:00
|
|
|
############################################################################
|
2008-02-11 20:16:45 +01:00
|
|
|
# configs/z8encore000zco/Makefile
|
2008-02-11 18:15:52 +01:00
|
|
|
#
|
2012-11-11 16:42:12 +01:00
|
|
|
# Copyright (C) 2008, 2012 Gregory Nutt. All rights reserved.
|
2012-09-13 20:32:24 +02:00
|
|
|
# Author: Gregory Nutt <gnutt@nuttx.org>
|
2008-02-11 18:15:52 +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.
|
|
|
|
# 3. Neither the name NuttX nor the names of its contributors may be
|
|
|
|
# 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.
|
|
|
|
#
|
|
|
|
############################################################################
|
|
|
|
|
|
|
|
-include $(TOPDIR)/Make.defs
|
|
|
|
|
2012-11-21 18:44:14 +01:00
|
|
|
SCHEDSRCDIR = $(TOPDIR)$(DELIM)sched
|
|
|
|
ARCHSRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src
|
2008-02-11 18:15:52 +01:00
|
|
|
|
2012-11-21 18:44:14 +01:00
|
|
|
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
2012-11-29 16:24:27 +01:00
|
|
|
USRINCLUDES = -usrinc:".;$(SCHEDSRCDIR);$(ARCHSRCDIR);$(ARCHSRCDIR)\common"
|
2012-11-21 18:44:14 +01:00
|
|
|
else
|
|
|
|
WSCHEDSRCDIR = ${shell cygpath -w $(SCHEDSRCDIR)}
|
|
|
|
WARCHSRCDIR = ${shell cygpath -w $(ARCHSRCDIR)}
|
|
|
|
USRINCLUDES = -usrinc:'.;$(WSCHEDSRCDIR);$(WARCHSRCDIR);$(WARCHSRCDIR)\common'
|
|
|
|
endif
|
2008-02-11 18:15:52 +01:00
|
|
|
|
2012-11-21 18:44:14 +01:00
|
|
|
INCLUDES = $(ARCHSTDINCLUDES) $(USRINCLUDES)
|
|
|
|
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(INCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
2008-02-11 18:15:52 +01:00
|
|
|
|
2012-11-21 18:44:14 +01:00
|
|
|
ASRCS =
|
|
|
|
AOBJS = $(ASRCS:.S=$(OBJEXT))
|
|
|
|
CSRCS = z8_lowinit.c z8_leds.c
|
|
|
|
COBJS = $(CSRCS:.c=$(OBJEXT))
|
|
|
|
|
|
|
|
SRCS = $(ASRCS) $(CSRCS)
|
|
|
|
OBJS = $(AOBJS) $(COBJS)
|
2008-02-11 18:15:52 +01:00
|
|
|
|
|
|
|
all: libboard$(LIBEXT)
|
|
|
|
|
|
|
|
$(ASRCS) $(HEAD_ASRC): %$(ASMEXT): %.S
|
2012-11-17 21:44:02 +01:00
|
|
|
$(Q) $(CPP) $(CPPFLAGS) `cygpath -w $<` -o $@.tmp
|
|
|
|
$(Q) cat $@.tmp | sed -e "s/^#/;/g" > $@
|
|
|
|
$(Q) rm $@.tmp
|
2008-02-11 18:15:52 +01:00
|
|
|
|
|
|
|
$(AOBJS): %$(OBJEXT): %$(ASMEXT)
|
|
|
|
$(call ASSEMBLE, $<, $@)
|
|
|
|
|
|
|
|
$(COBJS) $(LINKOBJS): %$(OBJEXT): %.c
|
2008-12-08 22:21:46 +01:00
|
|
|
$(call COMPILE, $<, $@)
|
2008-02-11 18:15:52 +01:00
|
|
|
|
|
|
|
libboard$(LIBEXT): $(OBJS)
|
2012-11-15 18:43:29 +01:00
|
|
|
$(call ARCHIVE, $@, $(OBJS))
|
2008-02-11 18:15:52 +01:00
|
|
|
|
|
|
|
.depend: Makefile $(SRCS)
|
2012-11-17 21:44:02 +01:00
|
|
|
$(Q) $(MKDEP) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
|
|
|
|
$(Q) touch $@
|
2008-02-11 18:15:52 +01:00
|
|
|
|
|
|
|
depend: .depend
|
|
|
|
|
|
|
|
clean:
|
2012-11-20 16:47:41 +01:00
|
|
|
$(call DELFILE, libboard$(LIBEXT))
|
2008-02-11 18:15:52 +01:00
|
|
|
$(call CLEAN)
|
|
|
|
|
|
|
|
distclean: clean
|
2012-11-20 16:47:41 +01:00
|
|
|
$(call DELFILE, Make.dep)
|
|
|
|
$(call DELFILE, .depend)
|
2008-02-11 18:15:52 +01:00
|
|
|
|
|
|
|
-include Make.dep
|