2004-05-18 15:01:39 +00:00
|
|
|
# __________ __ ___.
|
|
|
|
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
# \/ \/ \/ \/ \/
|
|
|
|
# $Id$
|
|
|
|
#
|
|
|
|
|
|
|
|
# ../.. for the plugin.h in the apps dir
|
|
|
|
# .. for stuff in the plugins dir
|
|
|
|
# . for stuff in the pluginlib dir
|
2004-09-22 08:58:50 +00:00
|
|
|
INCLUDES=-I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
|
2005-05-07 22:41:17 +00:00
|
|
|
-I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR)
|
2004-05-18 15:01:39 +00:00
|
|
|
|
2004-09-22 08:58:50 +00:00
|
|
|
ifdef APPEXTRA
|
2005-10-27 14:39:00 +00:00
|
|
|
INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
|
2004-07-08 13:12:16 +00:00
|
|
|
endif
|
|
|
|
|
2004-10-04 13:03:33 +00:00
|
|
|
CFLAGS = $(GCCOPTS) \
|
2005-02-18 13:47:17 +00:00
|
|
|
$(INCLUDES) $(TARGET) $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} -DPLUGIN
|
2004-05-18 15:01:39 +00:00
|
|
|
|
2005-06-29 21:04:22 +00:00
|
|
|
# Sectioned compilation for target
|
|
|
|
ifndef SIMVER
|
|
|
|
CFLAGS += -ffunction-sections -fdata-sections
|
|
|
|
endif
|
|
|
|
|
2005-03-06 15:40:03 +00:00
|
|
|
# This sets up 'SRC' based on the files mentioned in SOURCES
|
|
|
|
include $(TOOLSDIR)/makesrc.inc
|
|
|
|
|
2004-09-22 08:58:50 +00:00
|
|
|
SOURCES = $(SRC)
|
2004-05-18 15:01:39 +00:00
|
|
|
OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
|
2004-09-22 08:58:50 +00:00
|
|
|
DEPFILE = $(OBJDIR)/dep-pluginlib
|
|
|
|
DIRS = .
|
2004-05-18 15:01:39 +00:00
|
|
|
|
2005-05-07 22:41:17 +00:00
|
|
|
OUTPUT = $(BUILDDIR)/libplugin.a
|
2004-05-18 15:01:39 +00:00
|
|
|
|
|
|
|
all: $(OUTPUT)
|
|
|
|
|
|
|
|
$(OUTPUT): $(OBJS)
|
2005-02-18 13:47:17 +00:00
|
|
|
@echo "AR+RANLIB $@"
|
2004-09-22 08:58:50 +00:00
|
|
|
@$(AR) ruv $@ $+ >/dev/null 2>&1
|
2005-02-18 13:47:17 +00:00
|
|
|
@$(RANLIB) $@
|
2004-05-18 15:01:39 +00:00
|
|
|
|
2004-09-22 08:58:50 +00:00
|
|
|
include $(TOOLSDIR)/make.inc
|
2004-05-18 15:01:39 +00:00
|
|
|
|
|
|
|
clean:
|
2004-09-06 07:05:12 +00:00
|
|
|
@echo "cleaning lib"
|
2004-09-22 08:58:50 +00:00
|
|
|
@rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
|
2004-05-18 15:01:39 +00:00
|
|
|
|
2004-09-22 08:58:50 +00:00
|
|
|
-include $(DEPFILE)
|