-# METAR_DIRS =
-METAR_DIRS = environment
-
EXTRA_DIST = simgear_config.h.vc5 simgear_config.h-msvc71 version.h.in
include_HEADERS = \
compiler.h constants.h sg_inlines.h version.h
-SUBDIRS = \
- $(compatibility_DIR) \
+if WANT_HEADLESS
+SG_EXTRA_DIRS =
+METAR_DIRS =
+else
+SG_EXTRA_DIRS = scene sound screen
+METAR_DIRS = environment
+endif
+
+if HAVE_THREADS
+SGTHREAD_DIR = threads
+else
+SGTHREAD_DIR =
+endif
+
+SUBDIRS_ALWAYS = \
xml \
debug \
misc \
io \
magvar \
math \
- $(METAR_DIRS) \
nasal \
props \
route \
- scene \
- screen \
serial \
- sound \
- threads \
timing
-DIST_SUBDIRS = $(SUBDIRS) compatibility
+SUBDIRS = $(SUBDIRS_ALWAYS) \
+ $(compatibility_DIR) \
+ $(METAR_DIRS) \
+ $(SG_EXTRA_DIRS) \
+ $(SGTHREAD_DIR)
+
+DIST_SUBDIRS = $(SUBDIRS_ALWAYS) compatibility scene sound screen environment threads
+