|
1 ## |
|
2 ## rpm-config -- OpenPKG RPM Library Build Utility |
|
3 ## Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/> |
|
4 ## Copyright (c) 2000-2007 Ralf S. Engelschall <http://engelschall.com/> |
|
5 ## |
|
6 ## Permission to use, copy, modify, and distribute this software for |
|
7 ## any purpose with or without fee is hereby granted, provided that |
|
8 ## the above copyright notice and this permission notice appear in all |
|
9 ## copies. |
|
10 ## |
|
11 ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
|
12 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
|
13 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
|
14 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
|
15 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
|
16 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
|
17 ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
|
18 ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
|
19 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
|
20 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
|
21 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
|
22 ## SUCH DAMAGE. |
|
23 ## |
|
24 ## rpm-config.pod: manual page |
|
25 ## |
|
26 |
|
27 =pod |
|
28 |
|
29 =head1 NAME |
|
30 |
|
31 B<rpm-config> - OpenPKG RPM library build utility |
|
32 |
|
33 =head1 VERSION |
|
34 |
|
35 OpenPKG RPM RPM_VERSION |
|
36 |
|
37 =head1 SYNOPSIS |
|
38 |
|
39 B<rpm-config> |
|
40 [B<--help>] |
|
41 [B<--version>] |
|
42 [B<--cc>] |
|
43 [B<--cppflags>] |
|
44 [B<--cflags>] |
|
45 [B<--ldflags>] |
|
46 [B<--libs>] |
|
47 |
|
48 =head1 DESCRIPTION |
|
49 |
|
50 The B<rpm-config> program is a little helper utility for easy |
|
51 configuring and building applications based on the OpenPKG RPM library. |
|
52 It can be used to query the C compiler and linker flags which are |
|
53 required to correctly compile and link the application against the |
|
54 RPM library. |
|
55 |
|
56 =head1 OPTIONS |
|
57 |
|
58 B<rpm-config> accepts the following options: |
|
59 |
|
60 =over 4 |
|
61 |
|
62 =item B<--help> |
|
63 |
|
64 Prints the short usage information. |
|
65 |
|
66 =item B<--version> |
|
67 |
|
68 Prints the version number and date of the installed RPM library. |
|
69 |
|
70 =item B<--cc> |
|
71 |
|
72 =item B<--cppflags> |
|
73 |
|
74 Prints the C pre-processor flags (C<-I>) which are needed to compile the |
|
75 RPM-based application. The output is usually added to the C<CPPFLAGS> |
|
76 variable of the applications C<Makefile>. |
|
77 |
|
78 =item B<--cflags> |
|
79 |
|
80 Prints the C compiler flags which are needed to compile the RPM-based |
|
81 application. The output is usually added to the C<CFLAGS> variable of the |
|
82 applications C<Makefile>. |
|
83 |
|
84 =item B<--ldflags> |
|
85 |
|
86 Prints the linker flags (C<-L>) which are needed to link the application with |
|
87 the RPM library. The output is usually added to the C<LDFLAGS> variable of |
|
88 the applications C<Makefile>. |
|
89 |
|
90 =item B<--libs> |
|
91 |
|
92 Prints the library flags (C<-l>) which are needed to link the application with |
|
93 the RPM library. The output is usually added to the C<LIBS> variable of the |
|
94 applications C<Makefile>. |
|
95 |
|
96 =back |
|
97 |
|
98 =head1 EXAMPLE |
|
99 |
|
100 CC = `rpm-config --cc` |
|
101 CPPFLAGS = `rpm-config --cppflags` |
|
102 CFLAGS = `rpm-config --cflags` |
|
103 LDFLAGS = `rpm-config --ldflags` |
|
104 LIBS = `rpm-config --libs` |
|
105 |
|
106 all: foo |
|
107 |
|
108 foo: foo.o |
|
109 $(CC) $(LDFLAGS) -o foo foo.o $(LIBS) |
|
110 |
|
111 foo.o: foo.c |
|
112 $(CC) $(CPPFLAGS) $(CFLAGS) -o foo.o -c foo.c |
|
113 |
|
114 =head1 SEE ALSO |
|
115 |
|
116 rpm(1), cc(1). |
|
117 |
|
118 =head1 AUTHOR |
|
119 |
|
120 Ralf S. Engelschall |
|
121 rse@engelschall.com |
|
122 www.engelschall.com |
|
123 |
|
124 =cut |
|
125 |