summaryrefslogtreecommitdiff
path: root/tools/makesubdirs.inc
diff options
context:
space:
mode:
Diffstat (limited to 'tools/makesubdirs.inc')
-rw-r--r--tools/makesubdirs.inc14
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/makesubdirs.inc b/tools/makesubdirs.inc
new file mode 100644
index 0000000000..b233430f78
--- /dev/null
+++ b/tools/makesubdirs.inc
@@ -0,0 +1,14 @@
1# -*- Makefile -*-
2
3# return the list of extra sub-directories to build in the SUBDIRS variable
4
5# This uses the native 'gcc' compiler and not $(CC) since we use the -include
6# option and older gcc compiler doesn't have that. We use one such older
7# compiler for the win32 cross-compiles on Linux.
8#
9# The weird grep -v thing in here is due to Apple's stupidities and is needed
10# to make this do right when used on Mac OS X.
11
12SUBDIRS := $(shell cat SUBDIRS | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) \
13$(TARGET) $(DEFINES) $(EXTRA_DEFINES) -E -P -include "config.h" - | \
14grep -v "^\#")