2 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
3 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 INCLUDES
=$(TARGET_INC
) -Iinclude
-I
$(FIRMDIR
) -Iexport
-Icommon
-Idrivers
-I
$(BUILDDIR
)
12 CFLAGS
= $(INCLUDES
) $(GCCOPTS
) $(TARGET
) $(BUILDDATE
) $(EXTRA_DEFINES
) \
15 # This sets up 'SRC' based on the files mentioned in SOURCES
16 include $(TOOLSDIR
)/makesrc.inc
19 OBJS2
:= $(patsubst %.c
, $(OBJDIR
)/%.o
, $(SRC
)) $(OBJDIR
)/sysfont.o
20 OBJS
= $(patsubst %.S
, $(OBJDIR
)/%.o
, $(OBJS2
))
21 DIRS
:=. drivers common
22 OUTPUT
= $(BUILDDIR
)/librockbox.a
23 DEPFILE
= $(OBJDIR
)/dep-firmware
25 all: $(OUTPUT
) $(EXTRA_TARGETS
)
27 $(DEPFILE
): $(BUILDDIR
)/sysfont.h
31 $(OUTPUT
): $(OBJS
) $(DEPFILE
)
32 $(call PRINTS
,AR
+RANLIB
$(@F
))$(AR
) ruv
$@
$(OBJS
) >/dev
/null
2>&1
35 include $(TOOLSDIR
)/make.inc
38 $(call PRINTS
,cleaning firmware
)rm -f
$(OBJS
) $(OUTPUT
) $(OBJDIR
)/sysfont.c
$(DEPFILE
)
39 $(SILENT
)rm -rf
$(OBJDIR
)/drivers
$(OBJDIR
)/common
42 $(OBJDIR
)/thread.o
: thread.c
export/thread.h
43 $(call PRINTS
,CC thread.c
)$(CC
) -c
-O
-fomit-frame-pointer
$(CFLAGS
) $< -o
$@
45 $(BUILDDIR
)/sysfont.h
: ..
/fonts
/rockbox_default.bdf
46 $(call PRINTS
,Create sysfont.h
)$(TOOLSDIR
)/convbdf
-h
-o
$@
$<
48 $(OBJDIR
)/sysfont.o
: ..
/fonts
/rockbox_default.bdf
49 $(call PRINTS
,CONVBDF
)$(TOOLSDIR
)/convbdf
-c
-o
$(OBJDIR
)/sysfont.c
$<
50 $(call PRINTS
,CC sysfont.c
)$(CC
) $(CFLAGS
) -c
$(OBJDIR
)/sysfont.c
-o
$@