2 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
3 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 # ../.. for the codec.h in the apps dir
11 # .. for stuff in the codecs dir
12 # . for stuff in the codeclib dir
13 INCLUDES
=-I
$(APPSDIR
) -I..
-I.
$(TARGET_INC
) -I
$(FIRMDIR
)/include -I
$(FIRMDIR
)/export \
14 -I
$(FIRMDIR
)/common
-I
$(BUILDDIR
)
17 INCLUDES
+= $(patsubst %,-I
$(APPSDIR
)/%,$(subst :, ,$(APPEXTRA
)))
20 CFLAGS
= $(INCLUDES
) $(GCCOPTS
) \
21 $(TARGET
) $(EXTRA_DEFINES
) -DMEM
=${MEMORYSIZE} -DCODEC
23 # Sectioned compilation for target
25 CFLAGS
+= -ffunction-sections
-fdata-sections
28 # This sets up 'SRC' based on the files mentioned in SOURCES
29 include $(TOOLSDIR
)/makesrc.inc
32 OBJS2
:= $(SRC
:%.c
=$(OBJDIR
)/%.o
)
33 OBJS
= $(patsubst %.S
, $(OBJDIR
)/%.o
, $(OBJS2
))
34 DEPFILE
= $(OBJDIR
)/dep-codeclib
37 OUTPUT
= $(BUILDDIR
)/libcodec.a
42 $(call PRINTS
,AR
+RANLIB
$(@F
))$(AR
) ruv
$@
$+ >/dev
/null
2>&1
45 include $(TOOLSDIR
)/make.inc
48 $(call PRINTS
,cleaning codecs
/lib
)rm -f
$(OBJS
) $(OUTPUT
) $(DEPFILE
)