ADDITIONAL_OBJCFLAGS += -WextraThis simply adds the -Wextra flag when compiling, which causes GCC to print a lot more warnings than it would normally do. In general, you would use a GNUmakefile.preamble to add any additional flags you need (to tell the compiler/linker to search additional directories upon compiling/linking, to link with additional libraries, etc).
Now, you would want your GNUmakefile to include the contents of your GNUmakefile.preamble before any processing. This is usually done as follows:
include $(GNUSTEP_MAKEFILES)/common.make APP_NAME = PanelTest PanelTest_OBJC_FILES = source.m include GNUmakefile.preamble include $(GNUSTEP_MAKEFILES)/application.make
The most important thing to notice is that the GNUmakefile.preamble is included before application.make. That is why is called a preamble.
Sometimes you also see people using
-include GNUmakefile.preamble(with a hyphen, -, prepended). The hyphen before include tells the make tool not to complain if the file GNUmakefile.preamble is not found. If you want to make sure that the GNUmakefile.preamble is included, you should better not use the hyphen.
If you want to perform any special operation after the GNUmakefile package has done its work, you usually put them in a GNUmakefile.postamble file. The GNUmakefile.postamble is included after application.make; that is why is called a postamble:
include $(GNUSTEP_MAKEFILES)/common.make APP_NAME = PanelTest PanelTest_OBJC_FILES = source.m include GNUmakefile.preamble include $(GNUSTEP_MAKEFILES)/application.make include GNUmakefile.postamble
Here is a concrete example of a GNUmakefile.postamble:
after-install:: $(MKINSTALLDIRS) /home/nicola/SpecialTools; \ cd $(GNUSTEP_OBJ_DIR); \ $(INSTALL) myTool /home/nicola/SpecialTools;(make sure you start each indented line with TAB). This will install the tool myTool in the directory /home/nicola/SpecialTools after the standard installation has been performed.
You rarely need to use GNUmakefile.postambles, and they were mentioned mainly to give you a complete picture.