2009-10-07 16:54:15 +00:00
|
|
|
# __________ __ ___.
|
|
|
|
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
# \/ \/ \/ \/ \/
|
|
|
|
# $Id: checkwps.make 22680 2009-09-11 17:58:17Z gevaerts $
|
|
|
|
#
|
|
|
|
|
|
|
|
DBDEFINES=-g -DDEBUG -D__PCTOOL__ -DSIMULATOR
|
|
|
|
CFLAGS+=$(DBDEFINES)
|
|
|
|
|
2010-02-25 12:28:30 +00:00
|
|
|
createsrc = $(shell cat $(1) > $(3); echo "\#if CONFIG_CODEC == SWCODEC" >> $(3); \
|
|
|
|
echo $(2) | sed 's/ /\n/g' >> $(3); \
|
|
|
|
echo "\#endif" >> $(3); \
|
|
|
|
echo $(3))
|
|
|
|
|
|
|
|
METADATAS := $(subst $(ROOTDIR), ../.., $(wildcard $(ROOTDIR)/apps/metadata/*.c))
|
|
|
|
|
|
|
|
SRCFILE := $(call createsrc, $(TOOLSDIR)/database/SOURCES, \
|
|
|
|
$(METADATAS), \
|
|
|
|
$(TOOLSDIR)/database/SOURCES.build)
|
|
|
|
|
|
|
|
SRC= $(call preprocess, $(SRCFILE))
|
2009-10-07 16:54:15 +00:00
|
|
|
|
|
|
|
FIRMINC = -I$(ROOTDIR)/firmware/include -fno-builtin
|
|
|
|
|
|
|
|
INCLUDES = -I$(ROOTDIR)/apps/gui \
|
|
|
|
-I$(ROOTDIR)/firmware/export \
|
|
|
|
-I$(ROOTDIR)/apps \
|
2009-10-16 20:34:54 +00:00
|
|
|
-I$(ROOTDIR)/apps/recorder \
|
2009-10-07 16:54:15 +00:00
|
|
|
-I$(APPSDIR) \
|
|
|
|
-I$(BUILDDIR) \
|
|
|
|
|
2010-05-15 22:25:06 +00:00
|
|
|
SIMINCLUDES += -I$(FIRMDIR)/target/hosted/sdl -I$(FIRMDIR)/target/hosted \
|
|
|
|
-I$(ROOTDIR)/uisimulator/common -I$(FIRMDIR)/export -I$(BUILDDIR) -I$(APPSDIR)
|
2009-10-07 16:54:15 +00:00
|
|
|
|
|
|
|
# Makes mkdepfile happy
|
2010-02-25 12:28:30 +00:00
|
|
|
GCCOPTS+=`$(SDLCONFIG) --cflags`
|
2009-10-07 16:54:15 +00:00
|
|
|
OLDGCCOPTS:=$(GCCOPTS)
|
|
|
|
GCCOPTS+=-D__PCTOOL__ $(FIRMINC) $(SIMINCLUDES)
|
|
|
|
|
2010-05-06 22:17:34 +00:00
|
|
|
LIBS=`$(SDLCONFIG) --libs` -lc
|
2010-02-25 12:28:30 +00:00
|
|
|
ifneq ($(findstring MINGW,$(shell uname)),MINGW)
|
|
|
|
LIBS += -ldl
|
|
|
|
endif
|
|
|
|
|
2009-10-07 16:54:15 +00:00
|
|
|
.SECONDEXPANSION: # $$(OBJ) is not populated until after this
|
|
|
|
|
2010-02-25 12:28:30 +00:00
|
|
|
SIMFLAGS += $(SIMINCLUDES) $(DBDEFINES) -DHAVE_CONFIG_H $(OLDGCCOPTS) $(INCLUDES)
|
|
|
|
|
2009-10-07 16:54:15 +00:00
|
|
|
$(BUILDDIR)/$(BINARY): $$(OBJ)
|
|
|
|
@echo LD $(BINARY)
|
2010-02-25 12:28:30 +00:00
|
|
|
$(SILENT)$(HOSTCC) $(SIMFLAGS) $(LIBS) -o $@ $+
|
2009-10-07 16:54:15 +00:00
|
|
|
|
|
|
|
$(BUILDDIR)/tools/database/../../uisimulator/%.o: $(ROOTDIR)/uisimulator/%.c
|
|
|
|
$(SILENT)mkdir -p $(dir $@)
|
|
|
|
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(SIMFLAGS) -c $< -o $@
|
2009-10-07 18:09:04 +00:00
|
|
|
|
|
|
|
$(BUILDDIR)/tools/database/database.o: $(APPSDIR)/database.c
|
|
|
|
$(SILENT)mkdir -p $(dir $@)
|
|
|
|
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(SIMFLAGS) -c $< -o $@
|