]> git.ipfire.org Git - thirdparty/systemd.git/blame - Makefile
[PATCH] 042 release
[thirdparty/systemd.git] / Makefile
CommitLineData
8dfc8dbe 1# Makefile for udev
f0083e3d 2#
e7c4f85f 3# Copyright (C) 2003,2004 Greg Kroah-Hartman <greg@kroah.com>
f0083e3d
GKH
4#
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; version 2 of the License.
8#
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12# General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with this program; if not, write to the Free Software
16# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17#
18
54988802
KS
19# Set the following to control the use of syslog
20# Set it to `false' to remove all logging
05230184 21USE_LOG = true
54988802
KS
22
23# Set the following to `true' to log the debug
24# and make a unstripped, unoptimized binary.
f0083e3d 25# Leave this set to `false' for production use.
29b82deb 26DEBUG = false
f0083e3d 27
9825617b
HH
28# Set this to compile with Security-Enhanced Linux support.
29USE_SELINUX = false
f0083e3d
GKH
30
31ROOT = udev
7fafc032
KS
32DAEMON = udevd
33SENDER = udevsend
e56f0058 34INFO = udevinfo
eb10f97f 35TESTER = udevtest
82b9a637 36STARTER = udevstart
a8b5267a 37WAIT = wait_for_sysfs
1a04bce1 38VERSION = 042
f0083e3d 39INSTALL_DIR = /usr/local/bin
1e7a3f9e 40RELEASE_NAME = $(ROOT)-$(VERSION)
6d88260a 41LOCAL_CFG_DIR = etc/udev
8e2229c4 42HOTPLUG_EXEC = $(ROOT)
f0083e3d 43
4360a56d 44DESTDIR =
977083c2
GKH
45
46KERNEL_DIR = /lib/modules/${shell uname -r}/build
47
6739707d 48# override this to make udev look in a different location for it's config files
9f53b06a
GKH
49prefix =
50exec_prefix = ${prefix}
51etcdir = ${prefix}/etc
52sbindir = ${exec_prefix}/sbin
e56f0058 53usrbindir = ${exec_prefix}/usr/bin
9f53b06a
GKH
54mandir = ${prefix}/usr/share/man
55hotplugdir = ${etcdir}/hotplug.d/default
aef6bb13
KS
56configdir = ${etcdir}/udev
57initdir = ${etcdir}/init.d
58dev_ddir = ${etcdir}/dev.d
9f53b06a
GKH
59srcdir = .
60
61INSTALL = /usr/bin/install -c
62INSTALL_PROGRAM = ${INSTALL}
63INSTALL_DATA = ${INSTALL} -m 644
64INSTALL_SCRIPT = ${INSTALL_PROGRAM}
65
eadb1bbc
PM
66# To build any of the extras programs, run with:
67# make EXTRAS="extras/a extras/b"
68EXTRAS=
6739707d
GKH
69
70# place to put our device nodes
18a0d652 71udevdir = ${prefix}/udev
f0083e3d
GKH
72
73# Comment out this line to build with something other
74# than the local version of klibc
66626948 75#USE_KLIBC = true
f0083e3d 76
c04a1647
GKH
77# make the build silent (well, at least the udev part) Set this
78# to something else to make it noisy again.
79V=false
80
89067448
GKH
81# set up PWD so that older versions of make will work with our build.
82PWD = $(shell pwd)
83
f0083e3d 84# If you are running a cross compiler, you may want to set this
e64280b8 85# to something more interesting, like "arm-linux-". If you want
f0083e3d
GKH
86# to compile vs uClibc, that can be done here as well.
87CROSS = #/usr/i386-linux-uclibc/usr/bin/i386-uclibc-
88CC = $(CROSS)gcc
74894b53 89LD = $(CROSS)gcc
f0083e3d
GKH
90AR = $(CROSS)ar
91STRIP = $(CROSS)strip
b137e367 92RANLIB = $(CROSS)ranlib
c04a1647 93HOSTCC = gcc
f0083e3d 94
eadb1bbc 95export CROSS CC AR STRIP RANLIB CFLAGS LDFLAGS LIB_OBJS ARCH_LIB_OBJS CRT0
f0083e3d
GKH
96
97# code taken from uClibc to determine the current arch
98ARCH := ${shell $(CC) -dumpmachine | sed -e s'/-.*//' -e 's/i.86/i386/' -e 's/sparc.*/sparc/' \
bfd8a5d0 99 -e 's/arm.*/arm/g' -e 's/m68k.*/m68k/' -e 's/powerpc/ppc/g'}
f0083e3d
GKH
100
101# code taken from uClibc to determine the gcc include dir
1352a36f 102GCCINCDIR := ${shell LC_ALL=C $(CC) -print-search-dirs | sed -ne "s/install: \(.*\)/\1include/gp"}
f0083e3d
GKH
103
104# code taken from uClibc to determine the libgcc.a filename
105GCC_LIB := $(shell $(CC) -print-libgcc-file-name )
106
107# use '-Os' optimization if available, else use -O2
108OPTIMIZATION := ${shell if $(CC) -Os -S -o /dev/null -xc /dev/null >/dev/null 2>&1; \
109 then echo "-Os"; else echo "-O2" ; fi}
110
7bfd1a56 111# add -Wredundant-decls when libsysfs gets cleaned up
eea34a0e 112WARNINGS := -Wall
f0083e3d 113
e5a5b54a 114CFLAGS := -pipe
12901d99
GKH
115
116# set up the proper tdb spinlock code if we can
117ifeq ($(strip $(ARCH)),i386)
118 CFLAGS += -DUSE_SPINLOCKS -DINTEL_SPINLOCKS
f0083e3d
GKH
119endif
120
05230184 121ifeq ($(strip $(USE_LOG)),true)
54988802
KS
122 CFLAGS += -DLOG
123endif
124
f0083e3d
GKH
125# if DEBUG is enabled, then we do not strip or optimize
126ifeq ($(strip $(DEBUG)),true)
eea34a0e 127 CFLAGS += -O1 -g -DDEBUG -D_GNU_SOURCE
f0083e3d
GKH
128 LDFLAGS += -Wl,-warn-common
129 STRIPCMD = /bin/true -Since_we_are_debugging
130else
eea34a0e 131 CFLAGS += $(OPTIMIZATION) -fomit-frame-pointer -D_GNU_SOURCE
f0083e3d
GKH
132 LDFLAGS += -s -Wl,-warn-common
133 STRIPCMD = $(STRIP) -s --remove-section=.note --remove-section=.comment
134endif
135
fb43c2b2
GKH
136# If we are using our version of klibc, then we need to build, link it, and then
137# link udev against it statically.
138# Otherwise, use glibc and link dynamically.
66626948 139ifeq ($(strip $(USE_KLIBC)),true)
f8c1ccde 140 KLIBC_FIXUPS_DIR= $(PWD)/klibc_fixups
eadb1bbc
PM
141 KLIBC_BASE = $(PWD)/klibc
142 KLIBC_DIR = $(KLIBC_BASE)/klibc
e7c4f85f 143 INCLUDE_DIR := $(KLIBC_BASE)/include
977083c2 144 LINUX_INCLUDE_DIR := $(KERNEL_DIR)/include
74894b53 145 include $(KLIBC_DIR)/arch/$(ARCH)/MCONFIG
f0083e3d
GKH
146 # arch specific objects
147 ARCH_LIB_OBJS = \
eadb1bbc 148 $(KLIBC_DIR)/libc.a
f0083e3d 149
f0083e3d 150
2d5b6886 151 CRT0 = $(KLIBC_DIR)/crt0.o
e7c4f85f 152 LIBC = $(ARCH_LIB_OBJS) $(LIB_OBJS) $(CRT0)
f8c1ccde
KS
153 CFLAGS += $(WARNINGS) -nostdinc \
154 $(OPTFLAGS) \
155 -D__KLIBC__ -fno-builtin-printf \
156 -I$(KLIBC_FIXUPS_DIR) \
157 -include $(KLIBC_FIXUPS_DIR)/klibc_fixups.h \
158 -I$(INCLUDE_DIR) \
159 -I$(INCLUDE_DIR)/arch/$(ARCH) \
160 -I$(INCLUDE_DIR)/bits$(BITSIZE) \
161 -I$(GCCINCDIR) \
eea34a0e 162 -I$(LINUX_INCLUDE_DIR)
2d5b6886 163 LIB_OBJS =
7f2ea6a3 164 LDFLAGS = --static --nostdlib -nostartfiles -nodefaultlibs
f0083e3d 165else
eea34a0e 166 WARNINGS += -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
2d5b6886 167 CRT0 =
e7c4f85f 168 LIBC =
eea34a0e 169 CFLAGS += $(WARNINGS) -I$(GCCINCDIR)
f0083e3d 170 LIB_OBJS = -lc
fb43c2b2 171 LDFLAGS =
f0083e3d
GKH
172endif
173
9825617b
HH
174ifeq ($(strip $(USE_SELINUX)),true)
175 CFLAGS += -DUSE_SELINUX
176 LIB_OBJS += -lselinux
177endif
178
993a633a
KS
179CFLAGS += -I$(PWD)/libsysfs/sysfs \
180 -I$(PWD)/libsysfs
eadb1bbc 181
b8898800 182# config files automatically generated
183GEN_CONFIGS = $(LOCAL_CFG_DIR)/udev.conf
184
185all: $(ROOT) $(SENDER) $(DAEMON) $(INFO) $(TESTER) $(WAIT) $(GEN_CONFIGS)
49cd31b3 186 @extras="$(EXTRAS)" ; for target in $$extras ; do \
eadb1bbc 187 echo $$target ; \
977083c2
GKH
188 $(MAKE) prefix=$(prefix) \
189 LD="$(LD)" \
125930b4 190 SYSFS="$(SYSFS)" \
977083c2 191 KERNEL_DIR="$(KERNEL_DIR)" \
396bb4c3 192 QUIET="@$(PWD)/ccdv" \
eadb1bbc
PM
193 -C $$target $@ ; \
194 done ; \
f0083e3d 195
871ea775
PM
196$(ARCH_LIB_OBJS) : $(CRT0)
197
198$(CRT0):
e7c4f85f
GKH
199 @if [ ! -r klibc/linux ]; then \
200 ln -f -s $(KERNEL_DIR) klibc/linux; \
201 fi
202 $(MAKE) -C klibc SUBDIRS=klibc
f0083e3d 203
5c75a3ec
GKH
204TDB = tdb/tdb.o \
205 tdb/spinlock.o
206
125930b4
PM
207SYSFS = $(PWD)/libsysfs/sysfs_bus.o \
208 $(PWD)/libsysfs/sysfs_class.o \
209 $(PWD)/libsysfs/sysfs_device.o \
210 $(PWD)/libsysfs/sysfs_dir.o \
211 $(PWD)/libsysfs/sysfs_driver.o \
212 $(PWD)/libsysfs/sysfs_utils.o \
213 $(PWD)/libsysfs/dlist.o
a2822451 214
c81b35c0
KS
215OBJS = udev_lib.o \
216 udev_config.o \
c850706e
GKH
217 udev_add.o \
218 udev_remove.o \
f0713480 219 udev_sysfs.o \
a2822451 220 udevdb.o \
a2822451 221 namedev.o \
19feb351 222 namedev_parse.o \
dd64e26b 223 dev_d.o \
5c75a3ec 224 $(SYSFS) \
a2822451 225 $(TDB)
28972fe8 226
1f6d07b9 227HEADERS = udev.h \
c81b35c0 228 udev_lib.h \
869fc2f1
GKH
229 namedev.h \
230 udev_version.h \
869fc2f1 231 udevdb.h \
f0713480 232 udev_sysfs.h \
869fc2f1 233 logging.h \
9825617b 234 selinux.h \
993a633a 235 list.h
869fc2f1 236
66626948 237ifeq ($(strip $(USE_KLIBC)),true)
993a633a
KS
238 HEADERS += klibc_fixups/klibc_fixups.h \
239 klibc_fixups/mntent.h \
240 klibc_fixups/pwd.h
241
f8c1ccde
KS
242 OBJS += klibc_fixups/klibc_fixups.o
243 KLIBC_FIXUP = klibc_fixups/klibc_fixups.o
6a670d61
GKH
244endif
245
c04a1647
GKH
246ifeq ($(strip $(V)),false)
247 QUIET=@./ccdv
248 HOST_PROGS=ccdv
249else
250 QUIET=
251 HOST_PROGS=
252endif
253
f0083e3d
GKH
254# header files automatically generated
255GEN_HEADERS = udev_version.h
256
c04a1647
GKH
257ccdv:
258 @echo "Building ccdv"
259 @$(HOSTCC) -O1 ccdv.c -o ccdv
260
f0083e3d
GKH
261# Rules on how to create the generated header files
262udev_version.h:
c36f0ac3 263 @echo "Creating udev_version.h"
aef6bb13
KS
264 @echo \#define UDEV_VERSION \"$(VERSION)\" > $@
265 @echo \#define UDEV_ROOT \"$(udevdir)/\" >> $@
266 @echo \#define UDEV_DB \"$(udevdir)/.udev.tdb\" >> $@
267 @echo \#define UDEV_CONFIG_DIR \"$(configdir)\" >> $@
268 @echo \#define UDEV_CONFIG_FILE \"$(configdir)/udev.conf\" >> $@
269 @echo \#define UDEV_RULES_FILE \"$(configdir)/rules.d\" >> $@
270 @echo \#define UDEV_PERMISSION_FILE \"$(configdir)/permissions.d\" >> $@
271 @echo \#define UDEV_LOG_DEFAULT \"yes\" >> $@
272 @echo \#define UDEV_BIN \"$(DESTDIR)$(sbindir)/udev\" >> $@
273 @echo \#define UDEVD_BIN \"$(DESTDIR)$(sbindir)/udevd\" >> $@
f0083e3d 274
71896b56 275# Rules on how to create the generated config files
31a6e028
GKH
276$(LOCAL_CFG_DIR)/udev.conf:
277 sed -e "s:@udevdir@:$(udevdir):" -e "s:@configdir@:$(configdir):" < $(LOCAL_CFG_DIR)/udev.conf.in > $@
71896b56 278
08b5da6a
GKH
279GEN_MANPAGES = udev.8
280GEN_MANPAGESIN = udev.8.in
438ac360 281# Rules on how to create the man pages
31a6e028
GKH
282$(GEN_MANPAGES): $(GEN_MANPAGESIN)
283 sed -e "s:@udevdir@:$(udevdir):" < $@.in > $@
438ac360 284
05308343 285$(OBJS): $(GEN_HEADERS) $(HOST_PROGS)
c04a1647 286$(ROOT).o: $(GEN_HEADERS) $(HOST_PROGS)
c36f0ac3
GKH
287$(TESTER).o: $(GEN_HEADERS) $(HOST_PROGS)
288$(INFO).o: $(GEN_HEADERS) $(HOST_PROGS)
289$(DAEMON).o: $(GEN_HEADERS) $(HOST_PROGS)
290$(SENDER).o: $(GEN_HEADERS) $(HOST_PROGS)
291$(STARTER).o: $(GEN_HEADERS) $(HOST_PROGS)
292$(WAIT).o: $(GEN_HEADERS) $(HOST_PROGS)
f0083e3d 293
e7c4f85f 294$(ROOT): $(LIBC) $(ROOT).o $(STARTER).o $(OBJS) $(HEADERS) $(GEN_MANPAGES)
c04a1647
GKH
295 $(QUIET) $(LD) $(LDFLAGS) -o $@ $(CRT0) udev.o udevstart.o $(OBJS) $(LIB_OBJS) $(ARCH_LIB_OBJS)
296 $(QUIET) $(STRIPCMD) $@
869fc2f1 297
e7c4f85f 298$(TESTER): $(LIBC) $(TESTER).o $(OBJS) $(HEADERS)
c04a1647
GKH
299 $(QUIET) $(LD) $(LDFLAGS) -o $@ $(CRT0) udevtest.o $(OBJS) $(LIB_OBJS) $(ARCH_LIB_OBJS)
300 $(QUIET) $(STRIPCMD) $@
eb10f97f 301
e7c4f85f 302$(INFO): $(LIBC) $(INFO).o $(OBJS) $(HEADERS)
c04a1647
GKH
303 $(QUIET) $(LD) $(LDFLAGS) -o $@ $(CRT0) udevinfo.o udev_lib.o udev_config.o udevdb.o $(SYSFS) $(TDB) $(LIB_OBJS) $(ARCH_LIB_OBJS)
304 $(QUIET) $(STRIPCMD) $@
f0083e3d 305
e7c4f85f 306$(DAEMON): $(LIBC) $(DAEMON).o $(OBJS) udevd.h
c04a1647
GKH
307 $(QUIET) $(LD) $(LDFLAGS) -o $@ $(CRT0) udevd.o udev_lib.o $(KLIBC_FIXUP) $(LIB_OBJS) $(ARCH_LIB_OBJS)
308 $(QUIET) $(STRIPCMD) $@
7fafc032 309
e7c4f85f 310$(SENDER): $(LIBC) $(SENDER).o $(OBJS) udevd.h
c04a1647
GKH
311 $(QUIET) $(LD) $(LDFLAGS) -o $@ $(CRT0) udevsend.o udev_lib.o $(LIB_OBJS) $(ARCH_LIB_OBJS)
312 $(QUIET) $(STRIPCMD) $@
7fafc032 313
a8b5267a 314$(WAIT): $(WAIT).o $(OBJS) $(HEADERS) $(LIBC)
f0713480 315 $(QUIET) $(LD) $(LDFLAGS) -o $@ $(CRT0) $(WAIT).o udev_sysfs.o udev_lib.o udev_config.o $(SYSFS) $(LIB_OBJS) $(ARCH_LIB_OBJS)
c04a1647
GKH
316 $(QUIET) $(STRIPCMD) $@
317
318#.c.o:
319# $(CC) $(CFLAGS) $(DEFS) $(CPPFLAGS) -c -o $@ $<
320.c.o:
321 $(QUIET) $(CC) $(CFLAGS) -c -o $@ $<
322
a8b5267a 323
f0083e3d
GKH
324clean:
325 -find . \( -not -type d \) -and \( -name '*~' -o -name '*.[oas]' \) -type f -print \
326 | xargs rm -f
32935a50 327 -rm -f core $(ROOT) $(GEN_HEADERS) $(GEN_CONFIGS) $(GEN_MANPAGES) $(INFO) $(DAEMON) $(SENDER) $(TESTER) $(WAIT)
c36f0ac3 328 -rm -f ccdv
f0083e3d 329 $(MAKE) -C klibc clean
49cd31b3 330 @extras="$(EXTRAS)" ; for target in $$extras ; do \
eadb1bbc
PM
331 echo $$target ; \
332 $(MAKE) prefix=$(prefix) LD="$(LD)" SYSFS="$(SYSFS)" \
333 -C $$target $@ ; \
334 done ; \
f0083e3d 335
2761f9b9 336spotless: clean
93e6b62c 337 $(MAKE) -C klibc spotless
e7c4f85f 338 -rm -f klibc/linux
2761f9b9 339
e64280b8 340DISTFILES = $(shell find . \( -not -name '.' \) -print | grep -v -e CVS -e "\.tar\.gz$" -e "\/\." -e releases -e BitKeeper -e SCCS -e "\.tdb$" -e test/sys | sort )
f0083e3d
GKH
341DISTDIR := $(RELEASE_NAME)
342srcdir = .
54e3a5d3 343release: clean
e9b2679f
GKH
344 -rm -rf $(DISTDIR)
345 mkdir $(DISTDIR)
346 chmod 777 $(DISTDIR)
347 bk export $(DISTDIR)
348 tar -c $(DISTDIR) | gzip -9 > $(RELEASE_NAME).tar.gz
349 rm -rf $(DISTDIR)
350 @echo "$(RELEASE_NAME).tar.gz created"
54e3a5d3
GKH
351
352
353small_release: $(DISTFILES) clean
f0083e3d
GKH
354# @echo $(DISTFILES)
355 @-rm -rf $(DISTDIR)
356 @mkdir $(DISTDIR)
357 @-chmod 777 $(DISTDIR)
358 @for file in $(DISTFILES); do \
359 if test -d $$file; then \
360 mkdir $(DISTDIR)/$$file; \
361 else \
362 cp -p $$file $(DISTDIR)/$$file; \
363 fi; \
364 done
365 @tar -c $(DISTDIR) | gzip -9 > $(RELEASE_NAME).tar.gz
366 @rm -rf $(DISTDIR)
367 @echo "Built $(RELEASE_NAME).tar.gz"
9f53b06a
GKH
368
369
218f11bc 370install-initscript: etc/init.d/udev etc/init.d/udev.init.LSB
c58f8c30 371 @if [ -f /etc/redhat-release ]; then \
dfe421a9 372 $(INSTALL_DATA) -D etc/init.d/udev $(DESTDIR)$(initdir)/udev; \
c58f8c30 373 elif [ -f /etc/SuSE-release ]; then \
dfe421a9 374 $(INSTALL_DATA) -D etc/init.d/udev.init.LSB $(DESTDIR)$(initdir)/udev; \
c58f8c30 375 fi
376
b8898800 377install-config:
aef6bb13
KS
378 $(INSTALL) -d $(DESTDIR)$(configdir)/rules.d
379 $(INSTALL) -d $(DESTDIR)$(configdir)/permissions.d
380 @if [ ! -r $(DESTDIR)$(configdir)/udev.conf ]; then \
6d88260a
GKH
381 echo $(INSTALL_DATA) $(LOCAL_CFG_DIR)/udev.conf $(DESTDIR)$(configdir); \
382 $(INSTALL_DATA) $(LOCAL_CFG_DIR)/udev.conf $(DESTDIR)$(configdir); \
7591c18a 383 fi
aef6bb13
KS
384 @if [ ! -r $(DESTDIR)$(configdir)/rules.d/50-udev.rules ]; then \
385 echo $(INSTALL_DATA) $(LOCAL_CFG_DIR)/udev.rules $(DESTDIR)$(configdir)/rules.d/50-udev.rules; \
386 $(INSTALL_DATA) $(LOCAL_CFG_DIR)/udev.rules $(DESTDIR)$(configdir)/rules.d/50-udev.rules; \
7591c18a 387 fi
aef6bb13
KS
388 @if [ ! -r $(DESTDIR)$(configdir)/permissions.d/50-udev.permissions ]; then \
389 echo $(INSTALL_DATA) $(LOCAL_CFG_DIR)/udev.permissions $(DESTDIR)$(configdir)/permissions.d/50-udev.permissions; \
390 $(INSTALL_DATA) $(LOCAL_CFG_DIR)/udev.permissions $(DESTDIR)$(configdir)/permissions.d/50-udev.permissions; \
7591c18a
KS
391 fi
392
df73b398 393install-dev.d:
aef6bb13
KS
394 $(INSTALL) -d $(DESTDIR)$(dev_ddir)/default
395 $(INSTALL_PROGRAM) -D etc/dev.d/net/hotplug.dev $(DESTDIR)$(dev_ddir)/net/hotplug.dev
42e4b681
GKH
396
397uninstall-dev.d:
aef6bb13
KS
398 - rm $(dev_ddir)/net/hotplug.dev
399 - rmdir $(dev_ddir)/net
400 - rmdir $(dev_ddir)/default
42e4b681 401 - rmdir $(dev_ddir)
df73b398 402
487c1b35 403install-man:
438ac360
GKH
404 $(INSTALL_DATA) -D udev.8 $(DESTDIR)$(mandir)/man8/udev.8
405 $(INSTALL_DATA) -D udevinfo.8 $(DESTDIR)$(mandir)/man8/udevinfo.8
406 $(INSTALL_DATA) -D udevtest.8 $(DESTDIR)$(mandir)/man8/udevtest.8
407 $(INSTALL_DATA) -D udevstart.8 $(DESTDIR)$(mandir)/man8/udevstart.8
408 $(INSTALL_DATA) -D udevd.8 $(DESTDIR)$(mandir)/man8/udevd.8
409 - ln -f -s udevd.8 $(DESTDIR)$(mandir)/man8/udevsend.8
410
411uninstall-man:
412 - rm $(mandir)/man8/udev.8
413 - rm $(mandir)/man8/udevinfo.8
414 - rm $(mandir)/man8/udevtest.8
415 - rm $(mandir)/man8/udevstart.8
416 - rm $(mandir)/man8/udevd.8
417 - rm $(mandir)/man8/udevsend.8
418
419install: install-initscript install-config install-man install-dev.d all
7591c18a 420 $(INSTALL) -d $(DESTDIR)$(udevdir)
4360a56d
OH
421 $(INSTALL) -d $(DESTDIR)$(hotplugdir)
422 $(INSTALL_PROGRAM) -D $(ROOT) $(DESTDIR)$(sbindir)/$(ROOT)
8e2229c4
KS
423 $(INSTALL_PROGRAM) -D $(DAEMON) $(DESTDIR)$(sbindir)/$(DAEMON)
424 $(INSTALL_PROGRAM) -D $(SENDER) $(DESTDIR)$(sbindir)/$(SENDER)
e56f0058 425 $(INSTALL_PROGRAM) -D $(INFO) $(DESTDIR)$(usrbindir)/$(INFO)
8a0acf85 426 $(INSTALL_PROGRAM) -D $(TESTER) $(DESTDIR)$(usrbindir)/$(TESTER)
a8b5267a
KS
427 $(INSTALL_PROGRAM) -D $(WAIT) $(DESTDIR)$(sbindir)/$(WAIT)
428 - ln -f -s $(sbindir)/udev $(DESTDIR)$(sbindir)/$(STARTER)
cb7c281b 429 - ln -f -s $(sbindir)/$(SENDER) $(DESTDIR)$(hotplugdir)/10-udev.hotplug
e629ca3f 430 - ln -f -s $(sbindir)/$(WAIT) $(DESTDIR)$(hotplugdir)/05-wait_for_sysfs.hotplug
f070df16
KS
431ifndef DESTDIR
432 - killall udevd
433 - rm -f $(udevdir)/.udev.tdb
434endif
49cd31b3 435 @extras="$(EXTRAS)" ; for target in $$extras ; do \
eadb1bbc
PM
436 echo $$target ; \
437 $(MAKE) prefix=$(prefix) LD="$(LD)" SYSFS="$(SYSFS)" \
438 -C $$target $@ ; \
439 done ; \
6785820d 440
438ac360 441uninstall: uninstall-man uninstall-dev.d
cb7c281b 442 - rm $(hotplugdir)/10-udev.hotplug
e629ca3f 443 - rm $(hotplugdir)/05-wait_for_sysfs.hotplug
aef6bb13
KS
444 - rm $(configdir)/rules.d/50-udev.rules
445 - rm $(configdir)/permissions.d/50-udev.permissions
e8baccca 446 - rm $(configdir)/udev.conf
aef6bb13
KS
447 - rmdir $(configdir)/rules.d
448 - rmdir $(configdir)/permissions.d
449 - rmdir $(configdir)
316c5150 450 - rm $(initdir)/udev
6785820d 451 - rm $(sbindir)/$(ROOT)
8e2229c4
KS
452 - rm $(sbindir)/$(DAEMON)
453 - rm $(sbindir)/$(SENDER)
aef6bb13 454 - rm $(sbindir)/$(STARTER)
e56f0058 455 - rm $(usrbindir)/$(INFO)
aef6bb13 456 - rm $(usrbindir)/$(TESTER)
a8b5267a 457 - rm $(usrbindir)/$(WAIT)
6785820d 458 - rmdir $(hotplugdir)
552a4d42 459 - rm $(udevdir)/.udev.tdb
6785820d 460 - rmdir $(udevdir)
49cd31b3 461 @extras="$(EXTRAS)" ; for target in $$extras ; do \
eadb1bbc
PM
462 echo $$target ; \
463 $(MAKE) prefix=$(prefix) LD="$(LD)" SYSFS="$(SYSFS)" \
464 -C $$target $@ ; \
465 done ; \