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
|
2006-07-27 13:27:31 +00:00
|
|
|
INCLUDES=-I$(APPSDIR) -I.. -I. $(TARGET_INC) -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
|
|
|
|
|
2006-02-24 13:48:52 +00:00
|
|
|
CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) \
|
2006-02-23 20:46:33 +00:00
|
|
|
-DTARGET_ID=$(TARGET_ID) -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)
|
2006-10-23 22:33:39 +00:00
|
|
|
@echo "AR+RANLIB $(notdir $@)"
|
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)
|