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 INCLUDES
= -I
$(ROOTDIR
)/apps
/gui \
27 -I
$(ROOTDIR
)/firmware
/export \
28 -I
$(ROOTDIR
)/firmware
/include \
30 -I
$(ROOTDIR
)/apps
/recorder \
34 SIMINCLUDES
+= -I
$(FIRMDIR
)/target
/hosted
/sdl
-I
$(FIRMDIR
)/target
/hosted \
35 -I
$(ROOTDIR
)/uisimulator
/common
-I
$(FIRMDIR
)/export -I
$(BUILDDIR
) -I
$(APPSDIR
)
37 # Makes mkdepfile happy
38 GCCOPTS
+=`$(SDLCONFIG) --cflags`
39 OLDGCCOPTS
:=$(GCCOPTS
)
40 GCCOPTS
+=-D__PCTOOL__
-fno-builtin
$(INCLUDES
) $(SIMINCLUDES
)
42 LIBS
=`$(SDLCONFIG) --libs` -lc
43 ifneq ($(findstring MINGW
,$(shell uname
)),MINGW
)
47 .SECONDEXPANSION
: # $$(OBJ) is not populated until after this
49 SIMFLAGS
+= $(SIMINCLUDES
) $(DBDEFINES
) -DHAVE_CONFIG_H
$(OLDGCCOPTS
) $(INCLUDES
)
51 $(BUILDDIR
)/$(BINARY
): $$(OBJ
)
53 $(SILENT
)$(HOSTCC
) $(SIMFLAGS
) $(LIBS
) -o
$@
$+
55 $(BUILDDIR
)/tools
/database
/..
/..
/uisimulator
/%.o
: $(ROOTDIR
)/uisimulator
/%.c
56 $(SILENT
)mkdir
-p
$(dir $@
)
57 $(call PRINTS
,CC
$(subst $(ROOTDIR
)/,,$<))$(CC
) $(SIMFLAGS
) -c
$< -o
$@
59 $(BUILDDIR
)/tools
/database
/database.o
: $(APPSDIR
)/database.c
60 $(SILENT
)mkdir
-p
$(dir $@
)
61 $(call PRINTS
,CC
$(subst $(ROOTDIR
)/,,$<))$(CC
) $(SIMFLAGS
) -c
$< -o
$@