OBJCOPY = i386-elf-objcopy
endif
-# GCC 3.3 specifies directories for #include <> as "-I- -Idir"
-# GCC 4.x specifies directories for #include <> as "-isystem dir"
-# Figure out which format to use.
-ifeq (0, $(shell $(CC) -v 2>&1 | grep 'gcc version 4' >/dev/null 2>&1; echo $$?))
-SYSINCFLAGS = $(patsubst %,-isystem %,$(SYSINCDIRS))
-else
-SYSINCFLAGS = -I- $(patsubst %,-I%,$(SYSINCDIRS))
-endif
-
# Compiler and assembler invocation.
DEFINES =
WARNINGS = -Wall -W -Wstrict-prototypes -Wmissing-prototypes -Wsystem-headers
CFLAGS = -g -MMD -msoft-float -masm=intel
-SYSINCDIRS = $(SRCDIR)/lib
-CPPFLAGS = -nostdinc -I$(SRCDIR) $(SYSINCFLAGS)
+CPPFLAGS = -nostdinc -I$(SRCDIR) -isystem $(SRCDIR)/lib
ASFLAGS = -Wa,--gstabs -MMD
LDFLAGS =
include ../../tests/Make.tests
# Compiler and assembler options.
-os.dsk: SYSINCDIRS += $(SRCDIR)/lib/kernel
+os.dsk: CPPFLAGS += -isystem $(SRCDIR)/lib/kernel
# Core kernel.
threads_SRC = threads/init.c # Main program.
include $(SRCDIR)/Make.config
-$(PROGS): SYSINCDIRS += $(SRCDIR)/lib/user
+$(PROGS): CPPFLAGS += -isystem $(SRCDIR)/lib/user
# Linker flags.
$(PROGS): LDFLAGS = -nostdlib -static -Wl,-T,$(LDSCRIPT)