AR = $(CROSS_COMPILE)ar
RANLIB = $(CROSS_COMPILE)ranlib
HOSTCC = gcc
-STRIP = $(CROSS_COMPILE)strip
-STRIPCMD = $(STRIP) -s
CFLAGS = -g -Wall -pipe -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
WARNINGS = -Wstrict-prototypes -Wsign-compare -Wshadow \
# if DEBUG is enabled, then we do not strip
ifeq ($(strip $(DEBUG)),true)
CFLAGS += -DDEBUG
- STRIPCMD =
endif
ifeq ($(strip $(USE_GCOV)),true)
CFLAGS="$(CFLAGS)" \
LD="$(LD)" \
LDFLAGS="$(LDFLAGS)" \
- STRIPCMD="$(STRIPCMD)" \
LIB_OBJS="$(LIB_OBJS)" \
LIBUDEV="$(PWD)/$(LIBUDEV)" \
-C $$target $@ || exit 1; \
$(PROGRAMS): %: $(HEADERS) $(GEN_HEADERS) $(LIBUDEV) %.o
$(E) " LD " $@
$(Q) $(LD) $(LDFLAGS) $@.o -o $@ $(LIBUDEV) $(LIB_OBJS)
-ifneq ($(STRIPCMD),)
- $(E) " STRIP " $@
- $(Q) $(STRIPCMD) $@
-endif
$(LIBUDEV): $(HEADERS) $(GEN_HEADERS) $(UDEV_OBJS)
$(Q) rm -f $@
@ rm $@.tmp
gcov-all:
- $(MAKE) clean all STRIPCMD= USE_GCOV=true
+ $(MAKE) clean all USE_GCOV=true
@ echo
@ echo "binaries built with gcov support."
@ echo "run the tests and analyze with 'make udev_gcov.txt'"
If set to 'true', very verbose debugging messages will be compiled
into the udev binaries. The actual level of debugging is specified
in the udev config file.
- STRIPCMD
- If udev is compiled for packaging an empty string can be passed
- to disable the stripping of the binaries.
USE_SELINUX
If set to 'true', udev will be built with SELinux support
enabled. This is disabled by default.
$(PROG): %: $(HEADERS) %.o $(OBJS)
$(E) " LD " $@
$(Q) $(LD) $(LDFLAGS) $@.o $(OBJS) -o $@ $(LIBUDEV) $(LIB_OBJS)
-ifneq ($(strip $(STRIPCMD)),)
- $(E) " STRIP " $@
- $(Q) $(STRIPCMD) $@
-endif
# man pages
%.8: %.xml
$(PROG): %: $(HEADERS) %.o $(OBJS)
$(E) " LD " $@
$(Q) $(LD) $(LDFLAGS) $@.o $(OBJS) -o $@ $(LIBUDEV) $(LIB_OBJS)
-ifneq ($(strip $(STRIPCMD)),)
- $(E) " STRIP " $@
- $(Q) $(STRIPCMD) $@
-endif
# man pages
%.8: %.xml
$(PROG): %: $(HEADERS) %.o $(OBJS)
$(E) " LD " $@
$(Q) $(LD) $(LDFLAGS) $@.o $(OBJS) -o $@ $(LIBUDEV) $(LIB_OBJS)
-ifneq ($(strip $(STRIPCMD)),)
- $(E) " STRIP " $@
- $(Q) $(STRIPCMD) $@
-endif
# man pages
%.8: %.xml
$(PROG): %: $(HEADERS) %.o $(OBJS)
$(E) " LD " $@
$(Q) $(LD) $(LDFLAGS) $@.o $(OBJS) -o $@ $(LIBUDEV) $(LIB_OBJS)
-ifneq ($(strip $(STRIPCMD)),)
- $(E) " STRIP " $@
- $(Q) $(STRIPCMD) $@
-endif
# man pages
%.8: %.xml
$(PROG): %: $(HEADERS) %.o $(OBJS)
$(E) " LD " $@
$(Q) $(LD) $(LDFLAGS) $@.o $(OBJS) -o $@ $(LIBUDEV) $(LIB_OBJS)
-ifneq ($(strip $(STRIPCMD)),)
- $(E) " STRIP " $@
- $(Q) $(STRIPCMD) $@
-endif
# man pages
%.8: %.xml
$(PROG): %: $(HEADERS) %.o $(OBJS)
$(E) " LD " $@
$(Q) $(LD) $(LDFLAGS) $@.o $(OBJS) -o $@ $(LIBUDEV) $(LIB_OBJS)
-ifneq ($(strip $(STRIPCMD)),)
- $(E) " STRIP " $@
- $(Q) $(STRIPCMD) $@
-endif
# man pages
%.8: %.xml
$(PROG): %: $(HEADERS) %.o $(OBJS)
$(E) " LD " $@
$(Q) $(LD) $(LDFLAGS) $@.o $(OBJS) -o $@ $(LIBUDEV) $(LIB_OBJS)
-ifneq ($(strip $(STRIPCMD)),)
- $(E) " STRIP " $@
- $(Q) $(STRIPCMD) $@
-endif
# man pages
%.8: %.xml
$(PROG): %: $(HEADERS) %.o $(OBJS)
$(E) " LD " $@
$(Q) $(LD) $(LDFLAGS) $@.o $(OBJS) -o $@ $(LIBUDEV) $(LIB_OBJS)
-ifneq ($(STRIPCMD),)
- $(E) " STRIP " $@
- $(Q) $(STRIPCMD) $@
-endif
scsi_id_version.h:
$(E) " GENHDR " $@
$(PROG): %: $(HEADERS) %.o $(OBJS)
$(E) " LD " $@
$(Q) $(LD) $(LDFLAGS) $@.o $(OBJS) -o $@ $(LIBUDEV) $(LIB_OBJS)
-ifneq ($(strip $(STRIPCMD)),)
- $(E) " STRIP " $@
- $(Q) $(STRIPCMD) $@
-endif
# man pages
%.8: %.xml
else
$(Q) $(LD) $(LDFLAGS) -o $@ $@.o $(LIBUDEV) -Llib -lvolume_id $(LIB_OBJS)
endif
-ifneq ($(strip $(STRIPCMD)),)
- $(E) " STRIP " $@
- $(Q) $(STRIPCMD) $@
-endif
# man pages
%.8: %.xml