diff options
author | lethal@linux-sh.org <lethal@linux-sh.org> | 2003-08-05 01:10:01 -0700 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-04-26 21:01:40 -0700 |
commit | b137e367bb833ca82b396622997f512f5c856a41 (patch) | |
tree | 3c0d50550416977c6c5a745d71d7f132170bc015 | |
parent | [PATCH] minor cleanups. (diff) | |
download | systemd-b137e367bb833ca82b396622997f512f5c856a41.tar.gz systemd-b137e367bb833ca82b396622997f512f5c856a41.tar.bz2 systemd-b137e367bb833ca82b396622997f512f5c856a41.zip |
[PATCH] udev/libsysfs cross compile fixes
I noticed that libsysfs doesn't inherently grab cross compilation arguments
that are set in the top-level Makefile, so I've come up with the following
patch to fix this. With the patch, I can succesfully cross compile for other
architectures (such as sh) by doing 'make ARCH=sh CROSS=sh-linux-' in the
top-level directory.
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | libsysfs/Makefile | 6 |
2 files changed, 4 insertions, 4 deletions
@@ -38,7 +38,9 @@ CROSS = #/usr/i386-linux-uclibc/usr/bin/i386-uclibc- CC = $(CROSS)gcc AR = $(CROSS)ar STRIP = $(CROSS)strip +RANLIB = $(CROSS)ranlib +export CROSS CC AR STRIP RANLIB # code taken from uClibc to determine the current arch ARCH := ${shell $(CC) -dumpmachine | sed -e s'/-.*//' -e 's/i.86/i386/' -e 's/sparc.*/sparc/' \ diff --git a/libsysfs/Makefile b/libsysfs/Makefile index cf07a842b..79cc53395 100644 --- a/libsysfs/Makefile +++ b/libsysfs/Makefile @@ -1,8 +1,6 @@ # Makefile for libsysfs.a # Copyright (c) International Business Machines Corp., 2003 -CC=gcc - H_INCLUDE=../include LIB_INCLUDE=. OBJS=sysfs_bus.o sysfs_class.o sysfs_device.o sysfs_dir.o sysfs_driver.o \ @@ -19,8 +17,8 @@ LIBSYSFS=libsysfs.a RM=rm -f libsysfs.a: $(OBJS) - ar cru $(LIBSYSFS) $(OBJS) - ranlib $(LIBSYSFS) + $(AR) cru $(LIBSYSFS) $(OBJS) + $(RANLIB) $(LIBSYSFS) sysfs_bus.o: sysfs_bus.c $(CC) -I$(H_INCLUDE) -I$(LIB_INCLUDE) $(CFLAGS) -c sysfs_bus.c |