chiark / gitweb /
fix GGC signed pointer warnings and switch volume_id to stdint
[elogind.git] / extras / volume_id / Makefile
index 6a3d2866c414ff7f325de3756668f4d060fc41b6..0fadbf5b0e1ec2782082e0f34b290d8142ffa55c 100644 (file)
@@ -1,13 +1,13 @@
-# Makefile for udev_volume_id
+# Makefile for volume_id
 #
-# Copyright (C) 2004 Kay Sievers <kay@vrfy.org>
+# Copyright (C) 2004, 2005 Kay Sievers <kay.sievers@vrfy.org>
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; version 2 of the License.
 #
 
-PROG = udev_volume_id
+PROG = vol_id
 
 all:   $(PROG)
 
@@ -28,14 +28,20 @@ INSTALL_PROGRAM = ${INSTALL}
 INSTALL_DATA  = ${INSTALL} -m 644
 INSTALL_SCRIPT = ${INSTALL_PROGRAM}
 
-override CFLAGS+=-Wall -fno-builtin
-OBJS = volume_id.o udev_volume_id.o
-HEADERS = volume_id.h
+VOLUME_ID_BASE=volume_id
+include $(VOLUME_ID_BASE)/Makefile.inc
+
+OBJS = vol_id.o $(VOLUME_ID_OBJS)
+LIB_OBJS=../../udev.a
+HEADERS = $(VOLUME_ID_HEADERS)
 
 $(OBJS): $(HEADERS)
 
+.c.o:
+       $(QUIET) $(CC) $(CFLAGS) -c -o $@ $<
+
 $(PROG): $(OBJS) $(HEADERS)
-       $(LD) $(LDFLAGS) -o $(PROG) $(CRT0) $(OBJS) $(LIB_OBJS) $(ARCH_LIB_OBJS)
+       $(QUIET) $(LD) $(LDFLAGS) -o $(PROG) $(OBJS) $(LIB_OBJS)
 
 clean:
        rm -f $(PROG) $(OBJS)
@@ -43,8 +49,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)