summaryrefslogtreecommitdiffstats
path: root/tools/makesrc.inc
blob: 846df8cb9e03900e1c1a9483c178e7af5353fead (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# -*- 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.

SRC := $(shell cat SOURCES | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) \
$(TARGET) $(DEFINES) $(EXTRA_DEFINES) -E -P -include "config.h" - 2>/dev/null \
| grep -v "^\#")