michael@13: ##
michael@13: ## rpm-config -- OpenPKG RPM Library Build Utility
michael@13: ## Copyright (c) 2000-2007 OpenPKG Foundation e.V.
michael@13: ## Copyright (c) 2000-2007 Ralf S. Engelschall
michael@13: ##
michael@13: ## Permission to use, copy, modify, and distribute this software for
michael@13: ## any purpose with or without fee is hereby granted, provided that
michael@13: ## the above copyright notice and this permission notice appear in all
michael@13: ## copies.
michael@13: ##
michael@13: ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
michael@13: ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
michael@13: ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
michael@13: ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
michael@13: ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
michael@13: ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
michael@13: ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
michael@13: ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
michael@13: ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
michael@13: ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
michael@13: ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
michael@13: ## SUCH DAMAGE.
michael@13: ##
michael@13: ## rpm-config.pod: manual page
michael@13: ##
michael@13:
michael@13: =pod
michael@13:
michael@13: =head1 NAME
michael@13:
michael@13: B - OpenPKG RPM library build utility
michael@13:
michael@13: =head1 VERSION
michael@13:
michael@13: OpenPKG RPM RPM_VERSION
michael@13:
michael@13: =head1 SYNOPSIS
michael@13:
michael@13: B
michael@13: [B<--help>]
michael@13: [B<--version>]
michael@13: [B<--cc>]
michael@13: [B<--cppflags>]
michael@13: [B<--cflags>]
michael@13: [B<--ldflags>]
michael@13: [B<--libs>]
michael@13:
michael@13: =head1 DESCRIPTION
michael@13:
michael@13: The B program is a little helper utility for easy
michael@13: configuring and building applications based on the OpenPKG RPM library.
michael@13: It can be used to query the C compiler and linker flags which are
michael@13: required to correctly compile and link the application against the
michael@13: RPM library.
michael@13:
michael@13: =head1 OPTIONS
michael@13:
michael@13: B accepts the following options:
michael@13:
michael@13: =over 4
michael@13:
michael@13: =item B<--help>
michael@13:
michael@13: Prints the short usage information.
michael@13:
michael@13: =item B<--version>
michael@13:
michael@13: Prints the version number and date of the installed RPM library.
michael@13:
michael@13: =item B<--cc>
michael@13:
michael@13: =item B<--cppflags>
michael@13:
michael@13: Prints the C pre-processor flags (C<-I>) which are needed to compile the
michael@13: RPM-based application. The output is usually added to the C
michael@13: variable of the applications C.
michael@13:
michael@13: =item B<--cflags>
michael@13:
michael@13: Prints the C compiler flags which are needed to compile the RPM-based
michael@13: application. The output is usually added to the C variable of the
michael@13: applications C.
michael@13:
michael@13: =item B<--ldflags>
michael@13:
michael@13: Prints the linker flags (C<-L>) which are needed to link the application with
michael@13: the RPM library. The output is usually added to the C variable of
michael@13: the applications C.
michael@13:
michael@13: =item B<--libs>
michael@13:
michael@13: Prints the library flags (C<-l>) which are needed to link the application with
michael@13: the RPM library. The output is usually added to the C variable of the
michael@13: applications C.
michael@13:
michael@13: =back
michael@13:
michael@13: =head1 EXAMPLE
michael@13:
michael@13: CC = `rpm-config --cc`
michael@13: CPPFLAGS = `rpm-config --cppflags`
michael@13: CFLAGS = `rpm-config --cflags`
michael@13: LDFLAGS = `rpm-config --ldflags`
michael@13: LIBS = `rpm-config --libs`
michael@13:
michael@13: all: foo
michael@13:
michael@13: foo: foo.o
michael@13: $(CC) $(LDFLAGS) -o foo foo.o $(LIBS)
michael@13:
michael@13: foo.o: foo.c
michael@13: $(CC) $(CPPFLAGS) $(CFLAGS) -o foo.o -c foo.c
michael@13:
michael@13: =head1 SEE ALSO
michael@13:
michael@13: rpm(1), cc(1).
michael@13:
michael@13: =head1 AUTHOR
michael@13:
michael@13: Ralf S. Engelschall
michael@13: rse@engelschall.com
michael@13: www.engelschall.com
michael@13:
michael@13: =cut
michael@13: