pdbox: disable strict aliasing optimizations since pdbox breaks the strict aliasing...
[kugel-rb.git] / apps / plugins / pdbox / pdbox.make
blob0e40232321a0385345bc4a785b6cb7158c912a2a
1 # __________ __ ___.
2 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
3 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6 # \/ \/ \/ \/ \/
7 # $Id$
10 PDBOXSRCDIR := $(APPSDIR)/plugins/pdbox
11 PDBOXBUILDDIR := $(BUILDDIR)/apps/plugins/pdbox
13 ROCKS += $(PDBOXBUILDDIR)/pdbox.rock
15 PDBOX_SRC := $(call preprocess, $(PDBOXSRCDIR)/SOURCES)
16 PDBOX_OBJ := $(call c2obj, $(PDBOX_SRC))
18 # add source files to OTHERSRC to get automatic dependencies
19 OTHER_SRC += $(PDBOX_SRC)
21 $(PDBOXBUILDDIR)/pdbox.rock: $(PDBOX_OBJ) $(MPEG_OBJ) $(CODECDIR)/libtlsf.a
23 PDBOXFLAGS = $(PLUGINFLAGS) -fno-strict-aliasing
24 PDBOXLDFLAGS = $(PLUGINLDFLAGS)
25 ifdef APP_TYPE
26 PDBOXLDFLAGS += -lm
27 endif
29 # Compile PDBox with extra flags (adapted from ZXBox)
30 $(PDBOXBUILDDIR)/%.o: $(PDBOXSRCDIR)/%.c $(PDBOXSRCDIR)/pdbox.make
31 $(SILENT)mkdir -p $(dir $@)
32 $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) -I$(dir $<) $(PDBOXFLAGS) -c $< -o $@
34 $(PDBOXBUILDDIR)/pdbox.rock:
35 $(call PRINTS,LD $(@F))$(CC) $(PLUGINFLAGS) -o $*.elf \
36 $(filter %.o, $^) \
37 $(filter %.a, $+) \
38 -lgcc $(PDBOXLDFLAGS)
39 ifdef APP_TYPE
40 $(SILENT)cp $*.elf $@
41 else
42 $(SILENT)$(OC) -O binary $*.elf $@
43 endif