~psusi/ubuntu/precise/dmraid/fix-gpt

« back to all changes in this revision

Viewing changes to 1.0.0.rc16/make.tmpl.in

  • Committer: Bazaar Package Importer
  • Author(s): Artur Rona
  • Date: 2010-02-04 21:34:22 UTC
  • mfrom: (1.1.4 upstream) (2.4.3 sid)
  • Revision ID: james.westby@ubuntu.com-20100204213422-tdag8lcxpr7ahmg4
Tags: 1.0.0.rc16-3ubuntu1
* Merge from debian testing. (LP: #503136)  Remaining changes:
  - debian/dmraid-activate: Remove the special-casing of the root
    device which breaks in many situations and leaves the raw devices
    exposed. This was introduced in Debian to accommodate some broken
    configurations which wanted to access "partitions" on the raid
    raw devices. In Ubuntu, broken configurations has not been supported.
  - debian/dmraid.postinst: Comment out "udevadm trigger" call in postinst
    for now as it has severeconsequences when mountall is installed
    (clears /tmp).  If dmraid is installed, then presumably the important
    system devices are up and one canbe bothered with a reboot to take 
    the change into account. Let update-initramfs flag the system
    as needing a reboot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# Copyright (C) 2004-2005  Heinz Mauelshagen, Red Hat GmbH. All rights reserved.
 
3
#
 
4
# See file LICENSE at the top of this source tree for license information.
 
5
#
 
6
 
 
7
SHELL = /bin/sh
 
8
 
 
9
@SET_MAKE@
 
10
 
 
11
CC = @CC@
 
12
RANLIB = @RANLIB@
 
13
SHELL = /bin/sh
 
14
INSTALL = @INSTALL@
 
15
LN_S = @LN_S@
 
16
LIBS = @LIBS@
 
17
CFLAGS += @CFLAGS@
 
18
CLDFLAGS += @CLDFLAGS@
 
19
LDFLAGS += @LDFLAGS@
 
20
LD_DEPS += @LD_DEPS@
 
21
SOFLAG += @SOFLAG@
 
22
 
 
23
# Setup directory variables
 
24
prefix = $(DESTDIR)@prefix@
 
25
exec_prefix = $(DESTDIR)@exec_prefix@
 
26
bindir = @bindir@
 
27
ifeq ("@KLIBC@", "no")
 
28
  libdir = @libdir@
 
29
  sbindir = @sbindir@
 
30
  includedir = @includedir@
 
31
  infodir = @infodir@
 
32
  mandir = @mandir@
 
33
else
 
34
  libdir = $(DESTDIR)@KLIBC_LIB_DIR@
 
35
  sbindir = $(DESTDIR)@KLIBC_SBIN_DIR@
 
36
  includedir = $(DESTDIR)@KLIBC_INCLUDE_DIR@
 
37
  infodir = @infodir@
 
38
  mandir = @mandir@
 
39
endif
 
40
 
 
41
 
 
42
# setup misc variables
 
43
# define the ownership variables for the binaries and man pages
 
44
OWNER = @OWNER@
 
45
GROUP = @GROUP@
 
46
DMRAID_LIB_VERSION = @DMRAID_LIB_VERSION@
 
47
 
 
48
# The number of jobs to run, if blank, defaults to the make standard
 
49
ifndef MAKEFLAGS
 
50
MAKEFLAGS = @JOBS@
 
51
endif
 
52
 
 
53
SUFFIXES=.c .o .so .a
 
54
 
 
55
CFLAGS+=-fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline
 
56
 
 
57
ifeq ("@KLIBC@", "yes")
 
58
  # These ones make klibc compiles very loud
 
59
  CFLAGS+=-Wshadow -Wmissing-prototypes -Wmissing-declarations -Wnested-externs
 
60
endif
 
61
 
 
62
ifeq ("@DMRAID_TEST@", "yes")
 
63
  CFLAGS+=-DDMRAID_TEST
 
64
endif
 
65
 
 
66
# Don't allow for linking against DSO with static binary.
 
67
ifeq ("@STATIC_LINK@", "no")
 
68
        CFLAGS+=-DDMRAID_AUTOREGISTER
 
69
endif
 
70
 
 
71
ifeq ("@DEBUG@", "yes")
 
72
  CFLAGS+=-g -fno-omit-frame-pointer -DDEBUG
 
73
else
 
74
  ifeq ("@KLIBC@", "no")
 
75
    CFLAGS+=-O2
 
76
  else
 
77
    CFLAGS+=-Os
 
78
  endif
 
79
endif
 
80
 
 
81
ifeq ("@DEBUG_MALLOC@", "yes")
 
82
  CFLAGS+=-DDEBUG_MALLOC
 
83
endif
 
84
 
 
85
CFLAGS+=-D_LARGEFILE64_SOURCE
 
86
 
 
87
INCLUDES+=-I. -I$(top_srcdir)/include -I$(top_srcdir)/lib
 
88
 
 
89
STRIP=
 
90
 
 
91
ifdef DESTDIR
 
92
  INCLUDES+=-I$(DESTDIR)/usr/include
 
93
endif
 
94
 
 
95
DEPS=$(top_srcdir)/make.tmpl $(top_srcdir)/tools/VERSION Makefile
 
96
 
 
97
OBJECTS=$(SOURCES:%.c=%.o)
 
98
 
 
99
SUBDIRS.install := $(SUBDIRS:=.install)
 
100
SUBDIRS.remove := $(SUBDIRS:=.remove)
 
101
SUBDIRS.clean := $(SUBDIRS:=.clean)
 
102
SUBDIRS.distclean := $(SUBDIRS:=.distclean)
 
103
 
 
104
.PHONY: all install distclean clean
 
105
.PHONY: $(SUBDIRS) $(SUBDIRS.install) $(SUBDIRS.clean) $(SUBDIRS.distclean)
 
106
.PHONY: $(SUBDIRS.remove)
 
107
 
 
108
all: $(SUBDIRS) $(TARGETS)
 
109
 
 
110
install: all $(SUBDIRS.install)
 
111
 
 
112
remove: $(SUBDIRS.remove)
 
113
 
 
114
$(SUBDIRS):
 
115
        $(MAKE) -C $@
 
116
 
 
117
$(SUBDIRS.install): $(SUBDIRS)
 
118
        $(MAKE) -C $(@:.install=) install
 
119
 
 
120
$(SUBDIRS.remove): $(SUBDIRS)
 
121
        $(MAKE) -C $(@:.remove=) remove
 
122
 
 
123
$(SUBDIRS.clean):
 
124
        -$(MAKE) -C $(@:.clean=) clean
 
125
 
 
126
$(SUBDIRS.distclean):
 
127
        -$(MAKE) -C $(@:.distclean=) distclean
 
128
 
 
129
$(TARGETS): $(OBJECTS)
 
130
 
 
131
%.o: %.c
 
132
        $(CC) -MM -MF ${@:%.o=%.d} $(INCLUDES) $(CFLAGS) $<; \
 
133
        $(CC) -c $(INCLUDES) $(CFLAGS) $< -o $@
 
134
 
 
135
%.so: $(OBJECTS) .export.sym
 
136
 
 
137
%.so: $(OBJECTS)
 
138
        $(CC) -shared -Wl,-soname,$(notdir $@).$(DMRAID_LIB_VERSION) \
 
139
        -Wl,--version-script,.export.sym $(OBJECTS) -o $@ -ldevmapper-event
 
140
 
 
141
$(LIB_STATIC): $(OBJECTS)
 
142
        $(RM) $@
 
143
        $(AR) r $@ $(OBJECTS)
 
144
        $(RANLIB) $@
 
145
 
 
146
clean: $(SUBDIRS.clean)
 
147
        $(RM) $(OBJECTS) $(TARGETS) $(CLEAN_TARGETS) $(SOURCES:%.c=%.d)
 
148
 
 
149
distclean: $(SUBDIRS.distclean)
 
150
        $(RM) $(OBJECTS) $(TARGETS) $(CLEAN_TARGETS) $(SOURCES:%.c=%.d) \
 
151
              cscope.out \
 
152
              config.cache config.log config.status \
 
153
              Makefile make.tmpl core tools/version.h
 
154
 
 
155
ifneq ($(MAKECMDGOALS),clean)
 
156
  ifneq ($(MAKECMDGOALS),distclean)
 
157
    ifdef SOURCES
 
158
       -include $(SOURCES:.c=.d)
 
159
    endif
 
160
  endif
 
161
endif