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 | |
Thomas Martitz | 54e00c1 | 2012-03-26 23:16:48 +0200 | [diff] [blame] | 33 | $(BUILDDIR)/$(BINARY): $$(OBJ) $(FIRMLIB) $(VOICESPEEXLIB) $(CORE_LIBS) $(SIMLIB) |
Frank Gevaerts | 0adc32d | 2012-06-20 01:14:40 +0200 | [diff] [blame] | 34 | $(call PRINTS,LD $(BINARY))$(CC) -o $@ -Wl,--start-group $^ -Wl,--end-group $(LDOPTS) $(GLOBAL_LDOPTS) \ |
Thomas Martitz | 6d19275 | 2012-01-17 15:08:08 +0100 | [diff] [blame] | 35 | -Wl,-Map,$(BUILDDIR)/rockbox.map |
Thomas Martitz | 4b56ee0 | 2012-04-04 21:43:22 +0200 | [diff] [blame] | 36 | $(SILENT)$(call objcopy,$@,$@) |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 37 | |
| 38 | $(BUILDDIR)/uisimulator/%.o: $(ROOTDIR)/uisimulator/%.c |
| 39 | $(SILENT)mkdir -p $(dir $@) |
| 40 | $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(SIMFLAGS) -c $< -o $@ |
| 41 | |
Rafaël Carré | 279ce89 | 2010-05-18 12:46:09 +0000 | [diff] [blame] | 42 | $(UIBMP): $(ROOTDIR)/uisimulator/bitmaps/UI-$(MODELNAME).bmp |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 43 | $(call PRINTS,CP $(@F))cp $< $@ |