Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 1 | # __________ __ ___. |
| 2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ |
| 3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / |
| 4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < |
| 5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ |
| 6 | # \/ \/ \/ \/ \/ |
Björn Stenberg | a091d20 | 2008-11-25 19:54:23 +0000 | [diff] [blame] | 7 | # $Id$ |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 8 | # |
| 9 | |
Thomas Martitz | 59d2603 | 2010-06-06 09:11:52 +0000 | [diff] [blame] | 10 | INCLUDES += -I$(ROOTDIR)/uisimulator/bitmaps -I$(ROOTDIR)/uisimulator/common -I$(ROOTDIR)/uisimulator/buttonmap $\ |
Thomas Martitz | 3d0cee8 | 2010-05-15 21:02:47 +0000 | [diff] [blame] | 11 | -I$(FIRMDIR)/include -I$(FIRMDIR)/export $(TARGET_INC) -I$(BUILDDIR) -I$(APPSDIR) |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 12 | |
Thomas Martitz | 3d0cee8 | 2010-05-15 21:02:47 +0000 | [diff] [blame] | 13 | SIMFLAGS += $(INCLUDES) $(DEFINES) -DHAVE_CONFIG_H $(GCCOPTS) |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 14 | |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 15 | SIMSRC += $(call preprocess, $(ROOTDIR)/uisimulator/common/SOURCES) |
Thomas Martitz | 59d2603 | 2010-06-06 09:11:52 +0000 | [diff] [blame] | 16 | SIMSRC += $(call preprocess, $(ROOTDIR)/uisimulator/buttonmap/SOURCES) |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 17 | SIMOBJ = $(call c2obj,$(SIMSRC)) |
| 18 | OTHER_SRC += $(SIMSRC) |
| 19 | |
| 20 | SIMLIB = $(BUILDDIR)/uisimulator/libuisimulator.a |
Dave Chapman | 376c9f3 | 2011-02-27 11:37:39 +0000 | [diff] [blame] | 21 | ifeq (yes,$(APPLICATION)) |
Thomas Martitz | 31b5c47 | 2010-07-06 15:11:56 +0000 | [diff] [blame] | 22 | UIBMP= |
| 23 | else |
| 24 | UIBMP=$(BUILDDIR)/UI256.bmp |
| 25 | endif |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 26 | |
| 27 | .SECONDEXPANSION: # $$(OBJ) is not populated until after this |
| 28 | |
| 29 | $(SIMLIB): $$(SIMOBJ) $(UIBMP) |
Björn Stenberg | 7bdf9a3 | 2008-11-20 16:51:13 +0000 | [diff] [blame] | 30 | $(SILENT)$(shell rm -f $@) |
Jens Arnold | 6421f94 | 2009-03-01 09:04:15 +0000 | [diff] [blame] | 31 | $(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 32 | |
Jonathan Gordon | 8d3dbb8 | 2010-06-17 12:59:43 +0000 | [diff] [blame] | 33 | $(BUILDDIR)/$(BINARY): $$(OBJ) $(SIMLIB) $(VOICESPEEXLIB) $(FIRMLIB) $(SKINLIB) |
Frank Gevaerts | b8286d4 | 2010-07-03 20:58:22 +0000 | [diff] [blame] | 34 | $(call PRINTS,LD $(BINARY))$(CC) -o $@ $^ $(SIMLIB) $(LDOPTS) $(GLOBAL_LDOPTS) |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 35 | |
| 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é | 279ce89 | 2010-05-18 12:46:09 +0000 | [diff] [blame] | 40 | $(UIBMP): $(ROOTDIR)/uisimulator/bitmaps/UI-$(MODELNAME).bmp |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 41 | $(call PRINTS,CP $(@F))cp $< $@ |