rockbox/tools/makesrc.inc
Daniel Stenberg c30ee8bc90 Fix this to better deal with non-existing file names entered in the SOURCES
file as it otherwise seriously screws up the build system and creates very
odd errors that are hard to track down.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13414 a1c6a512-1295-4272-9138-f99709370657
2007-05-19 17:28:52 +00:00

18 lines
747 B
Makefile

# -*- Makefile -*-
# return the list of sources to build in the SRC variable
# This uses the native 'gcc' compiler and not $(CC) since we use the -include
# option and older gcc compiler doesn't have that. We use one such older
# compiler for the win32 cross-compiles on Linux.
#
# The weird grep -v thing in here is due to Apple's stupidities and is needed
# to make this do right when used on Mac OS X.
#
# The usage of ls is only to make sure that we only output existing file names
# to not confuse make and to produce a fairly decent error message to the
# terminal.
SRC := $(shell cat SOURCES | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) \
$(TARGET) $(DEFINES) $(EXTRA_DEFINES) -E -P -include "config.h" - | \
grep -v "^\#" | xargs ls)