chiark / gitweb /
5ad2bcf3e12717fe8084c8b89f8f9a246fcdf7de
[elogind.git] / extras / scsi_id / Makefile
1 #
2 # Copyright (C) 2003 IBM
3 #
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; version 2 of the License.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
17 VERSION=0.1
18
19 prefix =
20 sbindir =       ${prefix}/sbin
21
22 INSTALL  = /usr/bin/install -c
23 INSTALL_PROGRAM = ${INSTALL}
24 INSTALL_DATA  = ${INSTALL} -m 644
25
26 CFLAGS=-DVERSION=\"$(VERSION)\" $(DEBUG) -Wall
27
28 PROG=scsi_id
29
30 LIBSYSFS=-lsysfs
31 STRIP=-s
32 LDFLAGS=$(STRIP) --static
33
34 OBJS= scsi_id.o \
35         scsi_serial.o \
36
37 all:    $(PROG)
38
39 install: all
40         $(INSTALL_PROGRAM) -D $(PROG) $(sbindir)/$(PROG)
41         
42 uninstall:
43         -rm $(sbindir)/$(PROG)
44
45 $(OBJS): scsi_id.h scsi.h
46
47 clean:
48         rm -f $(PROG) $(OBJS)
49
50 $(PROG):        $(OBJS)
51         $(CC) $(OBJS) $(LDFLAGS) $(LIBSYSFS) -o $(PROG)