diff --git a/uisimulator/common/Makefile b/uisimulator/common/Makefile index e2b6b2a4f8..62a124ac97 100644 --- a/uisimulator/common/Makefile +++ b/uisimulator/common/Makefile @@ -25,8 +25,9 @@ DEBUG = -g # Use this for simulator-only files INCLUDES = -I. -I$(OBJDIR) -I$(FIRMDIR)/export -I$(APPSDIR) -I$(ROOTDIR)/uisimulator/$(SIMVER) -SRC := $(shell cat SOURCES | gcc -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) \ - $(TARGET) $(DEFINES) $(EXTRA_DEFINES) -E -P -include "config.h" - ) +# This sets up 'SRC' based on the files mentioned in SOURCES +include $(TOOLSDIR)/makesrc.inc + OBJS := $(SRC:%.c=$(OBJDIR)/%.o) DEFINES := -DHAVE_CONFIG_H -DGETTIMEOFDAY_TWO_ARGS -DSIMULATOR \ diff --git a/uisimulator/win32/Makefile b/uisimulator/win32/Makefile index f429cad8b5..f04a54bdd4 100644 --- a/uisimulator/win32/Makefile +++ b/uisimulator/win32/Makefile @@ -29,8 +29,9 @@ INCLUDES = -I. -I$(SIMCOMMON) -I$(OBJDIR) -I$(FIRMDIR)/export -I$(APPSDIR) DEFINES = -DHAVE_CONFIG_H -DGETTIMEOFDAY_TWO_ARGS -DSIMULATOR \ $(TARGET) -DAPPSVERSION=\"$(VERSION)\" -DMEM=${MEMORYSIZE} $(EXTRA_DEFINES) -SRC := $(shell cat SOURCES | gcc -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) \ - $(TARGET) $(DEFINES) $(EXTRA_DEFINES) -E -P -include "config.h" - ) +# This sets up 'SRC' based on the files mentioned in SOURCES +include $(TOOLSDIR)/makesrc.inc + OBJS := $(SRC:%.c=$(OBJDIR)/%.o) SOURCES = $(SRC) diff --git a/uisimulator/x11/Makefile b/uisimulator/x11/Makefile index 0c0c31183d..f032c664be 100644 --- a/uisimulator/x11/Makefile +++ b/uisimulator/x11/Makefile @@ -27,8 +27,9 @@ DEBUG = -g # Use this for simulator-only files INCLUDES = -I. -I$(SIMCOMMON) -I$(OBJDIR) -I$(FIRMDIR)/export -I$(APPSDIR) -SRC := $(shell cat SOURCES | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) \ - $(TARGET) $(DEFINES) $(EXTRA_DEFINES) -E -P -include "config.h" - ) +# This sets up 'SRC' based on the files mentioned in SOURCES +include $(TOOLSDIR)/makesrc.inc + OBJS := $(SRC:%.c=$(OBJDIR)/%.o) DEFINES := -DHAVE_CONFIG_H -DGETTIMEOFDAY_TWO_ARGS -DSIMULATOR \