f4551b5
diff --git a/Makefile b/Makefile
f4551b5
index 2228844..4d4cc2c 100644
f4551b5
--- a/Makefile
f4551b5
+++ b/Makefile
f4551b5
@@ -21,19 +21,19 @@ shared relocatable: build_library_type/relocatable
f4551b5
 
f4551b5
 build_library_type/%: generate_sources do_links
f4551b5
 	@echo "====== Building $(@F) libraries ======"
f4551b5
-	${GPRBUILD} -m -j${PROCESSORS} -XLIBRARY_TYPE=$(@F) -Pgnatcoll_build -p
f4551b5
+	${GPRBUILD} -m -j${PROCESSORS} -XLIBRARY_TYPE=$(@F) -Pgnatcoll_build -p ${GNAT_OPTFLAGS}
f4551b5
 
f4551b5
 	@# Need to build libgnatcoll_gtk separately, because its project files
f4551b5
 	@# requires gtkada.gpr, which might not exist on the machine.
f4551b5
 ifeq (${WITH_GTK},yes)
f4551b5
-	${GPRBUILD} -m -j${PROCESSORS} -XLIBRARY_TYPE=$(@F) -Psrc/gnatcoll_gtk -p
f4551b5
+	${GPRBUILD} -m -j${PROCESSORS} -XLIBRARY_TYPE=$(@F) -Psrc/gnatcoll_gtk -p ${GNAT_OPTFLAGS}
f4551b5
 endif
f4551b5
 
f4551b5
 	@# Build the tools (the list is the project's Main attribute)
f4551b5
 	@# They are not build as part of the above because only the Main from
f4551b5
 	@# gnatcoll_build.gpr are build. We could use aggregate projects to speed
f4551b5
 	@# things up.
f4551b5
-	${GPRBUILD} -q -m -j${PROCESSORS} -XLIBRARY_TYPE=$(@F) -Psrc/gnatcoll_tools
f4551b5
+	${GPRBUILD} -q -m -j${PROCESSORS} -XLIBRARY_TYPE=$(@F) -Psrc/gnatcoll_tools ${GNAT_OPTFLAGS}
f4551b5
 
f4551b5
 # Regenerate part of the sources. Unfortunately, this can be run only after
f4551b5
 # we have build GNATCOLL, and then its tools, even though GNATCOLL itself