2 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
3 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 # $Id: checkwps.make 22680 2009-09-11 17:58:17Z gevaerts $
10 DBDEFINES
=-g
-DDEBUG
-D__PCTOOL__
-DSIMULATOR
13 createsrc
= $(shell cat
$(1) > $(3); echo
"\#if CONFIG_CODEC == SWCODEC" >> $(3); \
14 echo
$(2) | sed
's/ /\n/g' >> $(3); \
15 echo
"\#endif" >> $(3); \
18 METADATAS
:= $(subst $(ROOTDIR
), ..
/..
, $(wildcard $(ROOTDIR
)/apps
/metadata
/*.c
))
20 SRCFILE
:= $(call createsrc
, $(TOOLSDIR
)/database
/SOURCES
, \
22 $(TOOLSDIR
)/database
/SOURCES.build
)
24 SRC
= $(call preprocess
, $(SRCFILE
))
26 FIRMINC
= -I
$(ROOTDIR
)/firmware
/include -fno-builtin
28 INCLUDES
= -I
$(ROOTDIR
)/apps
/gui \
29 -I
$(ROOTDIR
)/firmware
/export \
31 -I
$(ROOTDIR
)/apps
/recorder \
35 SIMINCLUDES
+= -I
$(ROOTDIR
)/uisimulator
/sdl
-I
$(ROOTDIR
)/uisimulator
/common \
36 -I
$(FIRMDIR
)/export $(TARGET_INC
) -I
$(BUILDDIR
) -I
$(APPSDIR
)
38 # Makes mkdepfile happy
39 GCCOPTS
+=`$(SDLCONFIG) --cflags`
40 OLDGCCOPTS
:=$(GCCOPTS
)
41 GCCOPTS
+=-D__PCTOOL__
$(FIRMINC
) $(SIMINCLUDES
)
43 LIBS
=`$(SDLCONFIG) --libs` -lc
44 ifneq ($(findstring MINGW
,$(shell uname
)),MINGW
)
48 .SECONDEXPANSION
: # $$(OBJ) is not populated until after this
50 SIMFLAGS
+= $(SIMINCLUDES
) $(DBDEFINES
) -DHAVE_CONFIG_H
$(OLDGCCOPTS
) $(INCLUDES
)
52 $(BUILDDIR
)/$(BINARY
): $$(OBJ
)
54 $(SILENT
)$(HOSTCC
) $(SIMFLAGS
) $(LIBS
) -o
$@
$+
56 $(BUILDDIR
)/tools
/database
/..
/..
/uisimulator
/%.o
: $(ROOTDIR
)/uisimulator
/%.c
57 $(SILENT
)mkdir
-p
$(dir $@
)
58 $(call PRINTS
,CC
$(subst $(ROOTDIR
)/,,$<))$(CC
) $(SIMFLAGS
) -c
$< -o
$@
60 $(BUILDDIR
)/tools
/database
/database.o
: $(APPSDIR
)/database.c
61 $(SILENT
)mkdir
-p
$(dir $@
)
62 $(call PRINTS
,CC
$(subst $(ROOTDIR
)/,,$<))$(CC
) $(SIMFLAGS
) -c
$< -o
$@