]> sourceware.org Git - lvm2.git/blame - make.tmpl.in
lvrename (without reactivation)
[lvm2.git] / make.tmpl.in
CommitLineData
795ca3e5
AK
1# @configure_input@
2#
3# Copyright (C) 2001 Sistina Software
4#
5# This LVM library is free software; you can redistribute it and/or
6# modify it under the terms of the GNU Library General Public
7# License as published by the Free Software Foundation; either
8# version 2 of the License, or (at your option) any later version.
9#
10# This LVM library is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13# Library General Public License for more details.
14#
15# You should have received a copy of the GNU Library General Public
16# License along with this LVM library; if not, write to the Free
17# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
18# MA 02111-1307, USA
19
20SHELL = /bin/sh
21
22@SET_MAKE@
23
24CC = @CC@
25RANLIB = @RANLIB@
26SHELL = /bin/sh
27INSTALL = @INSTALL@
28LN_S = @LN_S@
29
30# Setup directory variables
31prefix = @prefix@
32exec_prefix = @exec_prefix@
33bindir = @bindir@
34staticlibdir = ${prefix}/lib
35libdir = @libdir@
36sbindir = @sbindir@
37infodir = @infodir@
38mandir = @mandir@
39
40# setup misc variables
41# define the ownership variables for the binaries and man pages
42OWNER=@OWNER@
43GROUP=@GROUP@
44
45# The number of jobs to run, if blank, defaults to the make standard
46ifndef MAKEFLAGS
47MAKEFLAGS = @JOBS@
48endif
49
50SUFFIXES=
51SUFFIXES=.c .d .o
52
a4c0d9c2 53CFLAGS+=-Wall
cfd658da 54#CFLAGS+=-O2
a4c0d9c2 55CFLAGS+=-g -fno-omit-frame-pointer
03a8a07d 56
a4c0d9c2 57#CFLAGS+=-pg
03a8a07d
AK
58#LD_FLAGS=-pg
59
4790fce2
AK
60CFLAGS+=-DDEBUG_MEM -DDEBUG
61#CFLAGS+=-DBOUNDS_CHECK
03a8a07d 62
fa42e649 63INCLUDES+=-I. -I$(top_srcdir)/include
7eee377d 64INC_LNS=$(top_srcdir)/include/.symlinks_created
795ca3e5
AK
65
66ifeq ("@READLINE@", "yes")
67 CFLAGS += -DREADLINE_SUPPORT
68 EXTRA_LIBS += -lreadline
69endif
70
71OBJECTS=$(SOURCES:%.c=%.o)
72
73SUBDIRS.install := $(SUBDIRS:=.install)
74SUBDIRS.clean := $(SUBDIRS:=.clean)
75SUBDIRS.distclean := $(SUBDIRS:=.distclean)
76
77.PHONY: all install distclean clean
78.PHONY: $(SUBDIRS) $(SUBDIRS.install) $(SUBDIRS.clean) $(SUBDIRS.distclean)
79
80all: $(SUBDIRS) $(TARGETS)
81
82install: all $(SUBDIRS.install)
83
84$(SUBDIRS):
85 $(MAKE) -C $@
86
87$(SUBDIRS.install):
88 $(MAKE) -C $(@:.install=) install
89
90$(SUBDIRS.clean):
91 $(MAKE) -C $(@:.clean=) clean
92
93$(SUBDIRS.distclean):
94 $(MAKE) -C $(@:.distclean=) distclean
95
96%.o: %.c
97 $(CC) -c $(INCLUDES) $(CFLAGS) $< -o $@
98
99%.d: %.c
1589a7a4 100 set -e; FILE=`echo $@ | sed 's/\\//\\\\\\//g;s/\\.d//g'`; \
7eee377d 101 INC_LNS=`echo $(INC_LNS) | sed -e 's/\\//\\\\\\//g'`; \
fa42e649 102 $(CC) -MM $(INCLUDES) $< | \
7eee377d 103 sed "s/\(.*\)\.o[ :]*/$$FILE.o $$FILE.d : $$INC_LNS /g" > $@; \
795ca3e5
AK
104 [ -s $@ ] || $(RM) $@
105
106clean: $(SUBDIRS.clean)
107 $(RM) $(OBJECTS) $(TARGETS) $(SOURCES:%.c=%.d)
108
109distclean: $(SUBDIRS.distclean)
110 $(RM) $(OBJECTS) $(TARGETS) $(SOURCES:%.c=%.d)
111 $(RM) config.cache config.log config.status
112 $(RM) Makefile make.tmpl
113
114ifneq ($(MAKECMDGOALS),clean)
115 ifneq ($(MAKECMDGOALS),distclean)
116 ifdef SOURCES
117 -include $(SOURCES:.c=.d)
118 endif
119 endif
120endif
121
This page took 0.032863 seconds and 5 git commands to generate.