2 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
3 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 INCLUDES
+= -I
$(ROOTDIR
)/uisimulator
/bitmaps
-I
$(ROOTDIR
)/uisimulator
/common
-I
$(ROOTDIR
)/uisimulator
/buttonmap
$\
11 -I
$(FIRMDIR
)/include -I
$(FIRMDIR
)/export $(TARGET_INC
) -I
$(BUILDDIR
) -I
$(APPSDIR
)
13 SIMFLAGS
+= $(INCLUDES
) $(DEFINES
) -DHAVE_CONFIG_H
$(GCCOPTS
)
15 SIMSRC
+= $(call preprocess
, $(ROOTDIR
)/uisimulator
/common
/SOURCES
)
16 SIMSRC
+= $(call preprocess
, $(ROOTDIR
)/uisimulator
/buttonmap
/SOURCES
)
17 SIMOBJ
= $(call c2obj
,$(SIMSRC
))
18 OTHER_SRC
+= $(SIMSRC
)
20 SIMLIB
= $(BUILDDIR
)/uisimulator
/libuisimulator.a
21 UIBMP
= $(BUILDDIR
)/UI256.bmp
23 .SECONDEXPANSION
: # $$(OBJ) is not populated until after this
25 $(SIMLIB
): $$(SIMOBJ
) $(UIBMP
)
26 $(SILENT
)$(shell rm -f
$@
)
27 $(call PRINTS
,AR
$(@F
))$(AR
) rcs
$@
$^
>/dev
/null
29 # SIMLIB needs to be linked twice for some reason
30 $(BUILDDIR
)/$(BINARY
): $$(OBJ
) $(SIMLIB
) $(VOICESPEEXLIB
) $(FIRMLIB
)
31 $(call PRINTS
,LD
$(BINARY
))$(CC
) -o
$@
$^
$(SIMLIB
) $(LDOPTS
)
33 $(BUILDDIR
)/uisimulator
/%.o
: $(ROOTDIR
)/uisimulator
/%.c
34 $(SILENT
)mkdir
-p
$(dir $@
)
35 $(call PRINTS
,CC
$(subst $(ROOTDIR
)/,,$<))$(CC
) $(SIMFLAGS
) -c
$< -o
$@
37 $(UIBMP
): $(ROOTDIR
)/uisimulator
/bitmaps
/UI-
$(MODELNAME
).bmp
38 $(call PRINTS
,CP
$(@F
))cp
$< $@