]> rtime.felk.cvut.cz Git - omk.git/commitdiff
Document AM_*FLAGS and relation to *FLAGS
authorMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 12 Nov 2013 09:51:36 +0000 (10:51 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 12 Nov 2013 09:52:11 +0000 (10:52 +0100)
doc/omk-manual.texinfo

index c7f649436e6838e37014f9a0179832bd0c510981..93604efa02b1c5e3cb117162b6a0db61e994b768 100644 (file)
@@ -169,6 +169,7 @@ about the process of modularization.
 * Invoking OMK::
 * Compiling Programs::
 * Compiling Libraries::
+* Compiler Flags::
 * Recursing into Subdirectories::
 * Dependency Tracking::
 * Configuration and Conditional Compilation::
@@ -320,7 +321,7 @@ To tell OMK to compile a program, you need to set some variables in
 @file{Makefile.omk} (usually) in the directory where program sources are
 located.
 
-In the example bellow program @command{test} will be compiled from
+In the example bellow program @command{test} will be compiled from
 source @file{test.c}.
 
 @example
@@ -382,33 +383,7 @@ source @file{test.c}.
   instead of lib_LOADLIBES.
 @end defvar
 
-@defvar INCLUDES
-  Directives passed to the C or C++ compiler with additional directories
-  to be searched for header files. In most cases you need to specify an
-  absolute path. To specify a directory relative to the source
-  directory, you can use the @code{$(SOURCES_DIR)} variable, which
-  refers to the directory, where @file{Makefile.omk} is located. This
-  variable applies to all compilations invoked in the current directory.
-
-  @example
-  INCLUDES = -I$(SOURCES_DIR)/my_include_dir
-  @end example
-@end defvar
-
-@defvar DEFS
-  Directives passed to the C or C++ compiler with preprocessor macro
-  definitions. This variable applies to all compilations invoked in the
-  current directory.
-
-  @example
-  DEFS = -DDEBUG=1
-  @end example
-@end defvar
-
-
-@c FIXME: INCLUDES variable should not be set by rtlinux rules.
-
-@node Compiling Libraries, Recursing into Subdirectories, Compiling Programs, User's Manual
+@node Compiling Libraries, Compiler Flags, Compiling Programs, User's Manual
 @section Compiling Libraries
 
 
@@ -515,7 +490,49 @@ and what is their destination file name.
   top level configuration file @file{config.omk} or on command line.
 @end defvar
 
-@node Recursing into Subdirectories, Dependency Tracking, Compiling Libraries, User's Manual
+@node  Compiler Flags, Recursing into Subdirectories, Compiling Libraries, User's Manual
+@section Compiler Flags
+
+OMK follows the same philosophy for flag variables as does Automake. The
+variables with AM_ prefix (e.g. AM_CPPFLAGS) are supposed to be used by
+the package developer and variable without that prefix (e.g. CPPFLAGS)
+are reserved for the user. The following
+
+@defvar AM_CPPFLAGS
+Preprocessor switches.
+@end defvar
+
+@defvar AM_CFLAGS
+C compiler switches.
+@end defvar
+
+
+@defvar INCLUDES
+  Directives passed to the C or C++ compiler with additional directories
+  to be searched for header files. In most cases you need to specify an
+  absolute path. To specify a directory relative to the source
+  directory, you can use the @code{$(SOURCES_DIR)} variable, which
+  refers to the directory, where @file{Makefile.omk} is located. This
+  variable applies to all compilations invoked in the current directory.
+
+  @example
+  INCLUDES = -I$(SOURCES_DIR)/my_include_dir
+  @end example
+@end defvar
+
+@defvar DEFS
+  Directives passed to the C or C++ compiler with preprocessor macro
+  definitions. This variable applies to all compilations invoked in the
+  current directory.
+
+  @example
+  DEFS = -DDEBUG=1
+  @end example
+@end defvar
+
+@c FIXME: INCLUDES variable should not be set by rtlinux rules.
+
+@node Recursing into Subdirectories, Dependency Tracking, Compiler Flags, User's Manual
 @section Recursing into Subdirectories
 
 OMK is probably most useful in projects consisting of multiple