1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
lvm2/make.tmpl.in

196 lines
4.8 KiB
Cheetah
Raw Normal View History

2001-09-21 16:37:43 +04:00
# @configure_input@
#
2004-03-30 23:35:44 +04:00
# Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
# Copyright (C) 2004 Red Hat, Inc. All rights reserved.
2001-09-21 16:37:43 +04:00
#
2004-03-30 23:35:44 +04:00
# This file is part of the LVM2.
2001-09-21 16:37:43 +04:00
#
2004-03-30 23:35:44 +04:00
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions
# of the GNU General Public License v.2.
2001-09-21 16:37:43 +04:00
#
2004-03-30 23:35:44 +04:00
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2001-09-21 16:37:43 +04:00
SHELL = /bin/sh
@SET_MAKE@
CC = @CC@
RANLIB = @RANLIB@
SHELL = /bin/sh
INSTALL = @INSTALL@
2004-02-14 01:56:45 +03:00
MSGFMT = @MSGFMT@
2001-09-21 16:37:43 +04:00
LN_S = @LN_S@
LIBS = @LIBS@
2003-10-22 01:59:42 +04:00
CFLAGS += @CFLAGS@
2004-03-26 16:21:12 +03:00
CLDFLAGS += @CLDFLAGS@
CLDWHOLEARCHIVE += @CLDWHOLEARCHIVE@
CLDNOWHOLEARCHIVE += @CLDNOWHOLEARCHIVE@
LDDEPS += @LDDEPS@
LDFLAGS += @LDFLAGS@
2004-03-26 16:21:12 +03:00
SOFLAG += @SOFLAG@
2001-09-21 16:37:43 +04:00
# Setup directory variables
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = $(DESTDIR)@bindir@
confdir = $(DESTDIR)@CONFDIR@/lvm
2004-03-26 16:21:12 +03:00
includedir = $(DESTDIR)@includedir@
libdir = $(DESTDIR)@libdir@
sbindir = $(DESTDIR)@sbindir@
infodir = $(DESTDIR)@infodir@
mandir = $(DESTDIR)@mandir@
localedir = $(DESTDIR)@LOCALEDIR@
staticdir = $(DESTDIR)@STATICDIR@
2001-09-21 16:37:43 +04:00
# setup misc variables
# define the ownership variables for the binaries and man pages
2004-03-26 16:21:12 +03:00
OWNER = @OWNER@
GROUP = @GROUP@
2001-09-21 16:37:43 +04:00
# The number of jobs to run, if blank, defaults to the make standard
ifndef MAKEFLAGS
MAKEFLAGS = @JOBS@
endif
2004-03-26 16:21:12 +03:00
SUFFIXES = .c .d .o .so .a .po .pot .mo
2001-09-21 16:37:43 +04:00
2004-03-26 16:21:12 +03:00
CFLAGS += -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline
2004-03-26 16:21:12 +03:00
#CFLAGS += -W -Wconversion -Wpointer-arith -Wredundant-decls -Wbad-function-cast -Wcast-qual -Wmissing-noreturn
CFLAGS += @COPTIMISE_FLAG@
ifeq ("@DEBUG@", "yes")
2004-03-26 16:21:12 +03:00
CFLAGS += -g -fno-omit-frame-pointer -DDEBUG
CFLAGS += -DDEBUG_MEM
endif
2004-02-14 01:56:45 +03:00
ifeq ("@INTL@", "yes")
2004-03-26 16:21:12 +03:00
CFLAGS += -DINTL_PACKAGE=\"@INTL_PACKAGE@\" -DLOCALEDIR=\"@LOCALEDIR@\"
2004-02-14 01:56:45 +03:00
endif
LDFLAGS += -L$(top_srcdir)/lib -L$(libdir)
2004-03-26 16:21:12 +03:00
#CFLAGS += -DDEBUG_POOL
#CFLAGS += -DBOUNDS_CHECK
#CFLAGS += -pg
#LDFLAGS += -pg
2004-03-26 16:21:12 +03:00
STRIP=
#STRIP = -s
2002-11-18 17:04:08 +03:00
LIB_VERSION := $(shell cat $(top_srcdir)/VERSION | \
awk -F '.' '{printf "%s.%s",$$1,$$2}')
2004-03-26 16:21:12 +03:00
INCLUDES += -I. -I$(top_srcdir)/include
2001-09-21 16:37:43 +04:00
ifdef DESTDIR
2004-03-26 16:21:12 +03:00
INCLUDES += -I$(DESTDIR)/usr/include
endif
2004-03-26 16:21:12 +03:00
INC_LNS = $(top_srcdir)/include/.symlinks_created
2004-03-26 16:21:12 +03:00
DEPS = $(top_srcdir)/make.tmpl $(top_srcdir)/VERSION Makefile $(INC_LNS)
2001-11-28 18:00:49 +03:00
2004-03-26 16:21:12 +03:00
OBJECTS = $(SOURCES:%.c=%.o)
POTFILES = $(SOURCES:%.c=%.pot)
2001-09-21 16:37:43 +04:00
2004-08-18 22:57:40 +04:00
.PHONY: all install install_cluster pofile distclean clean
.PHONY: $(SUBDIRS) $(SUBDIRS.install) $(SUBDIRS.clean) $(SUBDIRS.distclean)
.PHONY: $(SUBDIRS.pofile) $(SUBDIRS.install_cluster)
2001-09-21 16:37:43 +04:00
SUBDIRS.install := $(SUBDIRS:=.install)
2004-08-18 22:57:40 +04:00
SUBDIRS.install_cluster := $(SUBDIRS:=.install_cluster)
2004-02-14 01:56:45 +03:00
SUBDIRS.pofile := $(SUBDIRS:=.pofile)
2001-09-21 16:37:43 +04:00
SUBDIRS.clean := $(SUBDIRS:=.clean)
SUBDIRS.distclean := $(SUBDIRS:=.distclean)
2004-04-05 20:29:37 +04:00
TARGETS += $(LIB_SHARED) $(LIB_STATIC)
2001-09-21 16:37:43 +04:00
all: $(SUBDIRS) $(TARGETS)
install: all $(SUBDIRS.install)
2004-08-18 22:57:40 +04:00
install_cluster: all $(SUBDIRS.install_cluster)
2001-09-21 16:37:43 +04:00
$(SUBDIRS):
$(MAKE) -C $@
2003-05-06 15:58:55 +04:00
$(SUBDIRS.install): $(SUBDIRS)
2001-09-21 16:37:43 +04:00
$(MAKE) -C $(@:.install=) install
2004-08-18 22:57:40 +04:00
$(SUBDIRS.install_cluster): $(SUBDIRS)
$(MAKE) -C $(@:.install_cluster=) install_cluster
2001-09-21 16:37:43 +04:00
$(SUBDIRS.clean):
2002-11-18 17:04:08 +03:00
-$(MAKE) -C $(@:.clean=) clean
2001-09-21 16:37:43 +04:00
$(SUBDIRS.distclean):
2002-11-18 17:04:08 +03:00
-$(MAKE) -C $(@:.distclean=) distclean
2001-09-21 16:37:43 +04:00
2004-02-14 01:56:45 +03:00
ifeq ("@INTL@", "yes")
pofile: $(SUBDIRS.pofile) $(POTFILES)
$(SUBDIRS.pofile):
$(MAKE) -C $(@:.pofile=) pofile
endif
2004-03-26 16:21:12 +03:00
$(TARGETS): $(OBJECTS)
2001-09-21 16:37:43 +04:00
%.o: %.c
$(CC) -c $(INCLUDES) $(CFLAGS) $< -o $@
2004-04-06 19:14:23 +04:00
%.pot: %.c Makefile
2004-03-26 16:21:12 +03:00
$(CC) -E $(INCLUDES) -include $(top_srcdir)/include/pogen.h \
2004-02-14 01:56:45 +03:00
$(CFLAGS) $< > $@
2002-11-18 17:04:08 +03:00
%.so: %.o
2004-04-06 19:14:23 +04:00
$(CC) -c $(INCLUDES) $(CFLAGS) $< -o $@
2002-11-18 17:04:08 +03:00
$(LIB_SHARED): $(OBJECTS) $(LDDEPS)
2004-03-26 16:21:12 +03:00
$(CC) $(SOFLAG) -Wl,-soname,$(notdir $@).$(LIB_VERSION) \
$(CLDFLAGS) $(OBJECTS) -o $@
$(LIB_STATIC): $(OBJECTS)
$(RM) $@
$(AR) rs $@ $(OBJECTS)
2002-11-18 17:04:08 +03:00
2001-09-21 16:37:43 +04:00
%.d: %.c
2004-03-26 16:21:12 +03:00
set -e; \
FILE=`echo $@ | sed 's/\\//\\\\\\//g;s/\\.d//g'`; \
DEPS=`echo $(DEPS) | sed -e 's/\\//\\\\\\//g'`; \
$(CC) -MM $(INCLUDES) $(CFLAGS) $< | \
sed "s/\(.*\)\.o[ :]*/$$FILE.o $$FILE.d $$FILE.pot: $$DEPS /g" > $@; \
[ -s $@ ] || $(RM) $@
2001-09-21 16:37:43 +04:00
2004-02-14 01:56:45 +03:00
%.mo: %.po
$(MSGFMT) -o $@ $<
2001-09-21 16:37:43 +04:00
clean: $(SUBDIRS.clean)
2004-03-26 16:21:12 +03:00
$(RM) $(OBJECTS) $(TARGETS) $(CLEAN_TARGETS) $(SOURCES:%.c=%.d) \
$(SOURCES:%.c=%.pot) $(LDDEPS)
2001-09-21 16:37:43 +04:00
distclean: $(SUBDIRS.distclean)
2004-03-26 16:21:12 +03:00
$(RM) $(OBJECTS) $(TARGETS) $(CLEAN_TARGETS) $(SOURCES:%.c=%.d) \
$(SOURCES:%.c=%.pot) $(LDDEPS) \
2004-03-26 16:21:12 +03:00
config.cache config.log config.status \
Makefile make.tmpl core \
version.h lvm2.po
.export.sym: .exported_symbols
set -e; (echo "Base {"; echo " global:"; \
sed "s/^/ /;s/$$/;/" < $<; \
echo " local:"; echo " *;"; echo "};") > $@
2001-09-21 16:37:43 +04:00
ifneq ($(MAKECMDGOALS),clean)
ifneq ($(MAKECMDGOALS),distclean)
ifdef SOURCES
-include $(SOURCES:.c=.d)
endif
endif
endif