-# 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)
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) $(LIBUDEV)
+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)
clean:
rm -f $(PROG) $(OBJS)
spotless: clean
-install: all
- $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(usrsbindir)/$(PROG)
-
-uninstall:
- - rm $(DESTDIR)$(usrsbindir)/$(PROG)
+install-bin: all
+ $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG)
+uninstall-bin:
+ - rm $(DESTDIR)$(sbindir)/$(PROG)