]> sourceware.org Git - lvm2.git/blame - make.tmpl.in
Add %PVS extents option to lvresize, lvextend, and lvcreate.
[lvm2.git] / make.tmpl.in
CommitLineData
795ca3e5
AK
1# @configure_input@
2#
6606c3ae
AK
3# Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
4# Copyright (C) 2004 Red Hat, Inc. All rights reserved.
795ca3e5 5#
6606c3ae 6# This file is part of the LVM2.
795ca3e5 7#
6606c3ae
AK
8# This copyrighted material is made available to anyone wishing to use,
9# modify, copy, or redistribute it subject to the terms and conditions
10# of the GNU General Public License v.2.
795ca3e5 11#
6606c3ae
AK
12# You should have received a copy of the GNU General Public License
13# along with this program; if not, write to the Free Software Foundation,
14# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
795ca3e5
AK
15
16SHELL = /bin/sh
17
18@SET_MAKE@
19
20CC = @CC@
21RANLIB = @RANLIB@
22SHELL = /bin/sh
23INSTALL = @INSTALL@
69792976 24MSGFMT = @MSGFMT@
795ca3e5 25LN_S = @LN_S@
5f68d858 26LIBS = @LIBS@
72b2cb61 27DEFS += @DEFS@
e8fad838 28CFLAGS += @CFLAGS@
84510264 29CLDFLAGS += @CLDFLAGS@
80992638
AK
30LDDEPS += @LDDEPS@
31LDFLAGS += @LDFLAGS@
e4c11ad1 32LIB_SUFFIX = @LIB_SUFFIX@
795ca3e5
AK
33
34# Setup directory variables
639c84c1
AK
35prefix = @prefix@
36exec_prefix = @exec_prefix@
37bindir = $(DESTDIR)@bindir@
4a7f3eb2 38confdir = $(DESTDIR)@CONFDIR@/lvm
84510264 39includedir = $(DESTDIR)@includedir@
639c84c1
AK
40libdir = $(DESTDIR)@libdir@
41sbindir = $(DESTDIR)@sbindir@
42infodir = $(DESTDIR)@infodir@
43mandir = $(DESTDIR)@mandir@
44localedir = $(DESTDIR)@LOCALEDIR@
0a62c911 45staticdir = $(DESTDIR)@STATICDIR@
795ca3e5
AK
46
47# setup misc variables
48# define the ownership variables for the binaries and man pages
84510264
AK
49OWNER = @OWNER@
50GROUP = @GROUP@
795ca3e5
AK
51
52# The number of jobs to run, if blank, defaults to the make standard
53ifndef MAKEFLAGS
54MAKEFLAGS = @JOBS@
55endif
56
8a2fc586 57.SUFFIXES: .c .d .o .so .a .po .pot .mo .dylib
795ca3e5 58
7c03887b 59CFLAGS += -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wmissing-noreturn -Wformat-security
03a8a07d 60
72b2cb61
AK
61#CFLAGS += -W -Wconversion -Wpointer-arith -Wredundant-decls -Wbad-function-cast -Wcast-qual
62#CFLAGS += -pedantic -std=gnu99
8ef2b021 63
8ce0cbda
AK
64CFLAGS += @COPTIMISE_FLAG@
65
8ef2b021 66ifeq ("@DEBUG@", "yes")
8a2fc586
AK
67 CFLAGS += -g -fno-omit-frame-pointer
68 DEFS += -DDEBUG
69 DEFS += -DDEBUG_MEM
8ef2b021 70endif
03a8a07d 71
69792976 72ifeq ("@INTL@", "yes")
8a2fc586 73 DEFS += -DINTL_PACKAGE=\"@INTL_PACKAGE@\" -DLOCALEDIR=\"@LOCALEDIR@\"
69792976
AK
74endif
75
33f732c5
AK
76ifneq ("@DMDIR@", "")
77 LDFLAGS += -L@DMDIR@/lib/ioctl
3b007b27
AK
78 ifeq ("@DMEVENTD@", "yes")
79 LDFLAGS += -L@DMDIR@/dmeventd
80 endif
33f732c5
AK
81endif
82
80992638 83LDFLAGS += -L$(top_srcdir)/lib -L$(libdir)
03a8a07d 84
8a2fc586
AK
85#DEFS += -DDEBUG_POOL
86#DEFS += -DBOUNDS_CHECK
84510264
AK
87
88#CFLAGS += -pg
80992638 89#LDFLAGS += -pg
84510264
AK
90
91STRIP=
92#STRIP = -s
8ef2b021 93
5a52dca9
AK
94LIB_VERSION := $(shell cat $(top_srcdir)/VERSION | \
95 awk -F '.' '{printf "%s.%s",$$1,$$2}')
96
1bf5aae9 97INCLUDES += -I$(top_srcdir)/include
795ca3e5 98
33f732c5
AK
99ifneq ("@DMDIR@", "")
100 INCLUDES += -I@DMDIR@/include
101endif
102
4af6dc96 103ifdef DESTDIR
84510264 104 INCLUDES += -I$(DESTDIR)/usr/include
4af6dc96
AK
105endif
106
84510264 107INC_LNS = $(top_srcdir)/include/.symlinks_created
a03f2320 108
84510264 109DEPS = $(top_srcdir)/make.tmpl $(top_srcdir)/VERSION Makefile $(INC_LNS)
14c61d2d 110
84510264
AK
111OBJECTS = $(SOURCES:%.c=%.o)
112POTFILES = $(SOURCES:%.c=%.pot)
795ca3e5 113
8a2fc586 114.PHONY: all install install_cluster pofile distclean clean cflow
cab8ea7c 115.PHONY: $(SUBDIRS) $(SUBDIRS.install) $(SUBDIRS.clean) $(SUBDIRS.distclean)
8a2fc586 116.PHONY: $(SUBDIRS.pofile) $(SUBDIRS.install_cluster) $(SUBDIRS.cflow)
cab8ea7c 117
795ca3e5 118SUBDIRS.install := $(SUBDIRS:=.install)
cab8ea7c 119SUBDIRS.install_cluster := $(SUBDIRS:=.install_cluster)
69792976 120SUBDIRS.pofile := $(SUBDIRS:=.pofile)
8a2fc586 121SUBDIRS.cflow := $(SUBDIRS:=.cflow)
795ca3e5
AK
122SUBDIRS.clean := $(SUBDIRS:=.clean)
123SUBDIRS.distclean := $(SUBDIRS:=.distclean)
124
d68a82ec
AK
125TARGETS += $(LIB_SHARED) $(LIB_STATIC)
126
795ca3e5
AK
127all: $(SUBDIRS) $(TARGETS)
128
129install: all $(SUBDIRS.install)
cab8ea7c 130install_cluster: all $(SUBDIRS.install_cluster)
795ca3e5
AK
131
132$(SUBDIRS):
133 $(MAKE) -C $@
134
3ba1348c 135$(SUBDIRS.install): $(SUBDIRS)
795ca3e5
AK
136 $(MAKE) -C $(@:.install=) install
137
cab8ea7c
AK
138$(SUBDIRS.install_cluster): $(SUBDIRS)
139 $(MAKE) -C $(@:.install_cluster=) install_cluster
140
795ca3e5 141$(SUBDIRS.clean):
5a52dca9 142 -$(MAKE) -C $(@:.clean=) clean
795ca3e5
AK
143
144$(SUBDIRS.distclean):
5a52dca9 145 -$(MAKE) -C $(@:.distclean=) distclean
795ca3e5 146
69792976
AK
147ifeq ("@INTL@", "yes")
148pofile: $(SUBDIRS.pofile) $(POTFILES)
149
150$(SUBDIRS.pofile):
151 $(MAKE) -C $(@:.pofile=) pofile
152endif
153
8a2fc586
AK
154ifneq ("@CFLOW_CMD@", "")
155cflow: $(SUBDIRS.cflow)
156
157$(SUBDIRS.cflow):
158 $(MAKE) -C $(@:.cflow=) cflow
159endif
160
84510264
AK
161$(TARGETS): $(OBJECTS)
162
795ca3e5 163%.o: %.c
8a2fc586 164 $(CC) -c $(INCLUDES) $(DEFS) $(CFLAGS) $< -o $@
795ca3e5 165
c5ff6dfa 166%.pot: %.c Makefile
84510264 167 $(CC) -E $(INCLUDES) -include $(top_srcdir)/include/pogen.h \
8a2fc586 168 $(DEFS) $(CFLAGS) $< > $@
69792976 169
5a52dca9 170%.so: %.o
8a2fc586 171 $(CC) -c $(INCLUDES) $(DEFS) $(CFLAGS) $< -o $@
5a52dca9 172
e4c11ad1 173ifeq ("@LIB_SUFFIX@","so")
80992638 174$(LIB_SHARED): $(OBJECTS) $(LDDEPS)
e4c11ad1 175 $(CC) -shared -Wl,-soname,$(notdir $@).$(LIB_VERSION) \
3b007b27 176 $(CFLAGS) $(CLDFLAGS) $(OBJECTS) $(LIBS) -o $@
e4c11ad1
AK
177endif
178
179ifeq ("@LIB_SUFFIX@","dylib")
180$(LIB_SHARED): $(OBJECTS) $(LDDEPS)
181 $(CC) -dynamiclib -dylib_current_version,$(LIB_VERSION) \
3b007b27 182 $(CFLAGS) $(CLDFLAGS) $(OBJECTS) $(LIBS) -o $@
e4c11ad1 183endif
84510264 184
f0c9fe01
AK
185%.so: %.a
186 $(CC) -shared -Wl,-soname,$(notdir $@).$(LIB_VERSION) \
3b007b27
AK
187 $(CFLAGS) $(CLDFLAGS) $(LIBS) -o $@ \
188 @CLDWHOLEARCHIVE@ $< @CLDNOWHOLEARCHIVE@
f0c9fe01 189
84510264
AK
190$(LIB_STATIC): $(OBJECTS)
191 $(RM) $@
192 $(AR) rs $@ $(OBJECTS)
5a52dca9 193
795ca3e5 194%.d: %.c
84510264
AK
195 set -e; \
196 FILE=`echo $@ | sed 's/\\//\\\\\\//g;s/\\.d//g'`; \
197 DEPS=`echo $(DEPS) | sed -e 's/\\//\\\\\\//g'`; \
8a2fc586 198 $(CC) -MM $(INCLUDES) $(DEFS) $(CFLAGS) $< | \
84510264
AK
199 sed "s/\(.*\)\.o[ :]*/$$FILE.o $$FILE.d $$FILE.pot: $$DEPS /g" > $@; \
200 [ -s $@ ] || $(RM) $@
795ca3e5 201
69792976
AK
202%.mo: %.po
203 $(MSGFMT) -o $@ $<
204
795ca3e5 205clean: $(SUBDIRS.clean)
84510264 206 $(RM) $(OBJECTS) $(TARGETS) $(CLEAN_TARGETS) $(SOURCES:%.c=%.d) \
80992638 207 $(SOURCES:%.c=%.pot) $(LDDEPS)
795ca3e5
AK
208
209distclean: $(SUBDIRS.distclean)
aba30ebc
AK
210 $(RM) $(OBJECTS) $(TARGETS) $(CLEAN_TARGETS) $(DISTCLEAN_TARGETS) \
211 $(SOURCES:%.c=%.d) $(SOURCES:%.c=%.pot) $(LDDEPS) \
84510264
AK
212 config.cache config.log config.status \
213 Makefile make.tmpl core \
214 version.h lvm2.po
215
216.export.sym: .exported_symbols
217 set -e; (echo "Base {"; echo " global:"; \
218 sed "s/^/ /;s/$$/;/" < $<; \
219 echo " local:"; echo " *;"; echo "};") > $@
795ca3e5
AK
220
221ifneq ($(MAKECMDGOALS),clean)
222 ifneq ($(MAKECMDGOALS),distclean)
223 ifdef SOURCES
224 -include $(SOURCES:.c=.d)
225 endif
226 endif
227endif
228
This page took 0.069121 seconds and 5 git commands to generate.