]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/conf/Makefile.i386
xnu-1228.tar.gz
[apple/xnu.git] / osfmk / conf / Makefile.i386
index 763f8a3e8814023128e20bac1c9add78fa7b9090..c3c05a7d78c155f14c8033c56e2cbc2674a9d157 100644 (file)
@@ -5,6 +5,36 @@
 CFLAGS+= -DAT386=1
 SFLAGS+= -DAT386=1
 
+# Enable -Werror for i386 builds
+CFLAGS+= $(WERROR)
+CWARNFLAGS= $(filter-out -Wbad-function-cast, $(CWARNFLAGS_STD))
+
+# Objects that don't compile cleanly:
+OBJS_NO_WERROR=                                \
+       UNDRequest.o                    \
+       db_examine.o                    \
+       db_macro.o                      \
+       db_print.o                      \
+       db_sym.o                        \
+       db_variables.o                  \
+       db_disasm.o                     \
+       db_interface.o                  \
+       db_trace.o                      \
+       loose_ends.o                    \
+       gssd_mach.o                     \
+       mp.o
+
+OBJS_WERROR=$(filter-out $(OBJS_NO_WERROR),$(OBJS))
+
+$(OBJS_WERROR):                WERROR=-Werror
+
+# Files that must go in the __HIB segment:
+UNCONFIGURED_HIB_FILES=                                        \
+           hibernate_restore.o          \
+           gdt.o                        \
+           idt.o
+HIB_FILES=$(filter $(UNCONFIGURED_HIB_FILES),$(OBJS))
+
 ######################################################################
 #END   Machine dependent Makefile fragment for i386
 ######################################################################