blob: 1a78b755be87a8066487315f2af572b16c988d8d [file] [log] [blame]
Björn Stenbergc6b3d382008-11-20 11:27:31 +00001# __________ __ ___.
2# Open \______ \ ____ ____ | | _\_ |__ _______ ___
3# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6# \/ \/ \/ \/ \/
Björn Stenberga091d202008-11-25 19:54:23 +00007# $Id$
Björn Stenbergc6b3d382008-11-20 11:27:31 +00008#
9
10INCLUDES += -I$(ROOTDIR)/uisimulator/sdl -I$(ROOTDIR)/uisimulator/common \
11
12SIMINCLUDES += -I$(ROOTDIR)/uisimulator/sdl -I$(ROOTDIR)/uisimulator/common \
13 -I$(FIRMDIR)/export $(TARGET_INC) -I$(BUILDDIR) -I$(APPSDIR)
14
15SIMFLAGS += $(SIMINCLUDES) $(DEFINES) -DHAVE_CONFIG_H $(GCCOPTS)
16
17SIMSRC += $(call preprocess, $(ROOTDIR)/uisimulator/sdl/SOURCES)
18SIMSRC += $(call preprocess, $(ROOTDIR)/uisimulator/common/SOURCES)
19SIMOBJ = $(call c2obj,$(SIMSRC))
20OTHER_SRC += $(SIMSRC)
21
22SIMLIB = $(BUILDDIR)/uisimulator/libuisimulator.a
23UIBMP = $(BUILDDIR)/UI256.bmp
24
25.SECONDEXPANSION: # $$(OBJ) is not populated until after this
26
27$(SIMLIB): $$(SIMOBJ) $(UIBMP)
Björn Stenberg7bdf9a32008-11-20 16:51:13 +000028 $(SILENT)$(shell rm -f $@)
Björn Stenbergc6b3d382008-11-20 11:27:31 +000029 $(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1
30
31$(BUILDDIR)/$(BINARY): $$(OBJ) $(SIMLIB) $(VOICESPEEXLIB) $(FIRMLIB)
32 $(call PRINTS,LD $(BINARY))$(CC) -o $@ $^ $(LDOPTS)
33
34$(BUILDDIR)/uisimulator/%.o: $(ROOTDIR)/uisimulator/%.c
35 $(SILENT)mkdir -p $(dir $@)
36 $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(SIMFLAGS) -c $< -o $@
37
38$(UIBMP): $(ROOTDIR)/uisimulator/sdl/UI-$(MODELNAME).bmp
39 $(call PRINTS,CP $(@F))cp $< $@