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