summaryrefslogtreecommitdiff
path: root/extras/chassis_id/Makefile
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2005-02-05 02:36:54 +0100
committerGreg KH <gregkh@suse.de>2005-04-26 23:24:19 -0700
commit9172c95c77e8f1377b6c8becc84995e6e28a61eb (patch)
treeecc549e85a5669c5180885ccd7e9aeb84e0ce027 /extras/chassis_id/Makefile
parent61599bdd06b059e7a5792b0417828d0a87541038 (diff)
[PATCH] chassis_id: clean compilation and fix bad function parameter passing
Adding prototypes for functions resulted in an error, cause: table_find_disk(disk_snum, &chassis_num, &slot_num); is called but the function is defined as: int table_find_disk(char *serialnumber , int *host_num, int *chassis_num, int *slot_num) which can obviously not work correctly. Using popen() is not klibc compatible, so skip the compilation if a klibc compile is requested.
Diffstat (limited to 'extras/chassis_id/Makefile')
-rw-r--r--extras/chassis_id/Makefile24
1 files changed, 17 insertions, 7 deletions
diff --git a/extras/chassis_id/Makefile b/extras/chassis_id/Makefile
index 141d23c7b8..ae5c95961c 100644
--- a/extras/chassis_id/Makefile
+++ b/extras/chassis_id/Makefile
@@ -20,7 +20,7 @@
# * Authors: Atul Sabharwal
# *
# *
-CFLAGS = -g
+
TARGET = chassis_id
exec_prefix = ${prefix}
@@ -28,14 +28,24 @@ sbindir = ${exec_prefix}/sbin
INSTALL = /usr/bin/install -c
INSTALL_PROGRAM = ${INSTALL}
INSTALL_DATA = ${INSTALL} -m 644
-all: chassis_id
+all: chassis_id
+ifneq ($(strip $(USE_KLIBC)),true)
chassis_id: chassis_id.c table.c
- gcc -o $(TARGET) $(CFLAGS) chassis_id.c table.c
-
-clean:
- rm -rf core a.out $(TARGET)
+ $(QUIET) $(CC) -o $(TARGET) $(CFLAGS) chassis_id.c table.c
install: all
$(INSTALL_PROGRAM) $(TARGET) $(DESTDIR)$(sbindir)/$(TARGET)
-
+else
+chassis_id:
+ @echo
+ @echo "!!! chassis_id is incompatible with klibc !!!"
+ @echo
+ @exit 0
+
+install: all
+endif
+
+clean:
+ rm -rf core a.out $(TARGET)
+