blob: d30a9db9aed0f5ec437a721b400ef5c811265136 [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
Thomas Martitz59d26032010-06-06 09:11:52 +000010INCLUDES += -I$(ROOTDIR)/uisimulator/bitmaps -I$(ROOTDIR)/uisimulator/common -I$(ROOTDIR)/uisimulator/buttonmap $\
Thomas Martitz3d0cee82010-05-15 21:02:47 +000011 -I$(FIRMDIR)/include -I$(FIRMDIR)/export $(TARGET_INC) -I$(BUILDDIR) -I$(APPSDIR)
Björn Stenbergc6b3d382008-11-20 11:27:31 +000012
Thomas Martitz3d0cee82010-05-15 21:02:47 +000013SIMFLAGS += $(INCLUDES) $(DEFINES) -DHAVE_CONFIG_H $(GCCOPTS)
Björn Stenbergc6b3d382008-11-20 11:27:31 +000014
Björn Stenbergc6b3d382008-11-20 11:27:31 +000015SIMSRC += $(call preprocess, $(ROOTDIR)/uisimulator/common/SOURCES)
Thomas Martitz59d26032010-06-06 09:11:52 +000016SIMSRC += $(call preprocess, $(ROOTDIR)/uisimulator/buttonmap/SOURCES)
Björn Stenbergc6b3d382008-11-20 11:27:31 +000017SIMOBJ = $(call c2obj,$(SIMSRC))
18OTHER_SRC += $(SIMSRC)
19
20SIMLIB = $(BUILDDIR)/uisimulator/libuisimulator.a
Dave Chapman376c9f32011-02-27 11:37:39 +000021ifeq (yes,$(APPLICATION))
Thomas Martitz31b5c472010-07-06 15:11:56 +000022UIBMP=
23else
24UIBMP=$(BUILDDIR)/UI256.bmp
25endif
Björn Stenbergc6b3d382008-11-20 11:27:31 +000026
27.SECONDEXPANSION: # $$(OBJ) is not populated until after this
28
29$(SIMLIB): $$(SIMOBJ) $(UIBMP)
Björn Stenberg7bdf9a32008-11-20 16:51:13 +000030 $(SILENT)$(shell rm -f $@)
Jens Arnold6421f942009-03-01 09:04:15 +000031 $(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null
Björn Stenbergc6b3d382008-11-20 11:27:31 +000032
Jonathan Gordon8d3dbb82010-06-17 12:59:43 +000033$(BUILDDIR)/$(BINARY): $$(OBJ) $(SIMLIB) $(VOICESPEEXLIB) $(FIRMLIB) $(SKINLIB)
Frank Gevaertsb8286d42010-07-03 20:58:22 +000034 $(call PRINTS,LD $(BINARY))$(CC) -o $@ $^ $(SIMLIB) $(LDOPTS) $(GLOBAL_LDOPTS)
Björn Stenbergc6b3d382008-11-20 11:27:31 +000035
36$(BUILDDIR)/uisimulator/%.o: $(ROOTDIR)/uisimulator/%.c
37 $(SILENT)mkdir -p $(dir $@)
38 $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(SIMFLAGS) -c $< -o $@
39
Rafaël Carré279ce892010-05-18 12:46:09 +000040$(UIBMP): $(ROOTDIR)/uisimulator/bitmaps/UI-$(MODELNAME).bmp
Björn Stenbergc6b3d382008-11-20 11:27:31 +000041 $(call PRINTS,CP $(@F))cp $< $@