chiark / gitweb /
[PATCH] The following patch fixes some warnings when compiling volume_id
[elogind.git] / extras / volume_id / Makefile
index d0c6e40..efec58f 100644 (file)
@@ -28,24 +28,13 @@ INSTALL_PROGRAM = ${INSTALL}
 INSTALL_DATA  = ${INSTALL} -m 644
 INSTALL_SCRIPT = ${INSTALL_PROGRAM}
 
-override CFLAGS+=-Wall -fno-builtin -Wchar-subscripts -Wmissing-declarations \
-                -Wnested-externs -Wpointer-arith -Wcast-align \
-                -Wsign-compare
+override CFLAGS+=-D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
 
-override CFLAGS+=-D_FILE_OFFSET_BITS=64
+VOLUME_ID_BASE=volume_id
+include $(VOLUME_ID_BASE)/Makefile.inc
 
-SYSFS =        ../../libsysfs/sysfs_bus.o      \
-       ../../libsysfs/sysfs_class.o    \
-       ../../libsysfs/sysfs_device.o   \
-       ../../libsysfs/sysfs_dir.o      \
-       ../../libsysfs/sysfs_driver.o   \
-       ../../libsysfs/sysfs_utils.o    \
-       ../../libsysfs/dlist.o
-
-
-
-OBJS = volume_id.o udev_volume_id.o dasdlabel.o $(SYSFS)
-HEADERS = volume_id.h dasdlabel.h
+OBJS = udev_volume_id.o $(VOLUME_ID_OBJS) $(SYSFS)
+HEADERS = $(VOLUME_ID_HEADERS)
 
 $(OBJS): $(HEADERS)
 
@@ -61,8 +50,7 @@ clean:
 spotless: clean
 
 install: all
-       $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(usrsbindir)/$(PROG)
+       $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG)
 
 uninstall:
-       - rm $(DESTDIR)$(usrsbindir)/$(PROG)
-
+       - rm $(DESTDIR)$(sbindir)/$(PROG)