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 \
|
|
|
|
-I$(FIRMDIR)/common -I$(FIRMDIR)/drivers
|
2004-05-18 15:01:39 +00:00
|
|
|
|
2004-09-22 08:58:50 +00:00
|
|
|
ifdef APPEXTRA
|
|
|
|
INCLUDES += -I$(APPSDIR)/$(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-02-18 13:47:17 +00:00
|
|
|
SRC := $(shell cat SOURCES | gcc -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) $(EXTRA_DEFINES) -E -P -include "config.h" - )
|
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
|
|
|
|
|
|
|
OUTPUT = $(OBJDIR)/libplugin.a
|
|
|
|
|
|
|
|
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)
|